{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":328225209,"defaultBranch":"main","name":"phpass","ownerLogin":"openwall","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2021-01-09T18:56:23.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/1579552?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1610218669.0","currentOid":""},"activityList":{"items":[{"before":"383b8b5812c0444930b0fb67dacfc2fc52983b50","after":"862287a9355bebb361e61d233b7a2906a6729b4f","ref":"refs/heads/main","pushedAt":"2023-03-23T22:17:33.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"solardiz","name":"Solar Designer","path":"/solardiz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/18089797?s=80&v=4"},"commit":{"message":".gitattributes: update for PHPUnit config\n\nFollow up on #6","shortMessageHtmlLink":".gitattributes: update for PHPUnit config"}},{"before":"75db62eaa3cfcedb93d879a96cd400cfbe590966","after":"383b8b5812c0444930b0fb67dacfc2fc52983b50","ref":"refs/heads/main","pushedAt":"2023-03-23T16:25:45.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"solardiz","name":"Solar Designer","path":"/solardiz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/18089797?s=80&v=4"},"commit":{"message":"Introduce initial unit test setup\n\nThis commit creates a basic unit test setup which runs the exact same\ntests as the original test script does, but uses the de-facto testing\nframework in the PHP world: [PHPUnit](https://phpunit.de/).\n\nUsing this test framework will make it more inviting and more\nstraight-forward for contributors to add additional tests, either by\nadding new test classes or by adding additional test methods to the\nexisting test class.\n\nIt will also allow for insight into the code coverage via tests, which\ncould help inform for which code additional tests should be added.\n\nTo run the tests, run:\n```bash\ncomposer update\ncomposer unit-test\n```\n\nNotes:\n* The test setup as currently created will allow for these tests to be run\n on PHP 5.3 to current (PHP 8.2 at the time of writing).\n Testing on PHP 5.0 - 5.2 is not supported in this setup and cannot be\n run via CI anyway.\n I've chosen not to spend time on getting that running as I can barely\n imagine anyone still using PHP 5.0 - 5.2 anyway.\n* PHPUnit has introduced quite some breaking changes across PHPUnit\n versions over the years.\n The basic functionality I've used in the current tests is not affected\n by these.\n If at some point tests would be added which would be affected by this,\n I'd recommend adding a dependency on the\n [PHPUnit Polyfills](https://github.com/Yoast/PHPUnit-Polyfills)\n package, which can mitigate this.\n* The configuration for the tests is in the `phpunit.xml.dist` file.\n The configuration has been set up to allow for seeing code coverage\n information providing [Xdebug](https://xdebug.org/) or PCOV is\n available.\n The configuration has also been set up to ensure the tests are run\n using the same configuration across PHPUnit versions by being explicit\n about various configuration settings, for which the default value has\n changed across PHPUnit versions.\n* Contributors can choose to run tests locally with an adjusted\n (stricter) configuration if they so choose by adding a `phpunit.xml`\n file, which overrules the `phpunit.xml.dist` file.\n To allow for this, I've added an entry to the `.gitignore` file to\n ignore `phpunit.xml` files as those should not be committed to\n the repo.\n* As of PHPUnit 8.x, PHPUnit generates a cache file. This file should also\n not be committed to the repo and has been added to the `.gitignore`\n file.\n* I've included scripts in the `composer.json` file to run the (unit)\n tests.\n* I've chosen - for now - not to remove the old `test.php` file, nor to\n remove the GH Actions workflow job for running them.\n Instead, I've chosen to _add_ a new test job to the GH Actions workflow\n to run the unit tests separately.\n\nRefs:\n* https://phpunit.de/supported-versions.html\n* https://docs.phpunit.de/en/9.6/","shortMessageHtmlLink":"Introduce initial unit test setup"}},{"before":"8654de645bc289a09892646b001869a4383eed3c","after":"75db62eaa3cfcedb93d879a96cd400cfbe590966","ref":"refs/heads/main","pushedAt":"2023-03-21T20:15:05.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"solardiz","name":"Solar Designer","path":"/solardiz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/18089797?s=80&v=4"},"commit":{"message":"CS: use curly braces for all control structures\n\nControl structures without curly braces are quite\nerror prone as they will only apply to the\n_first_ PHP statement after the condition.\nThis means that a second statement - even when\nindented the same - will be run _unconditionally_,\nbut it also means that anyone working with the code\nneeds a really good understanding of what\na \"statement\" is in PHP.\n\nIn other words, it's best practice by now\nto always use curly braces with control structures.\n\nRef:\n* PSR12: https://www.php-fig.org/psr/psr-12/#5-control-structures\n > The body of each structure MUST be enclosed by\n > braces. This standardizes how the structures\n > look and reduces the likelihood of introducing\n > errors as new lines get added to the body.","shortMessageHtmlLink":"CS: use curly braces for all control structures"}},{"before":"a37a163df1f0577394d5b3cbe1c6bf27dfcd56ea","after":"8654de645bc289a09892646b001869a4383eed3c","ref":"refs/heads/main","pushedAt":"2023-03-21T19:10:16.000Z","pushType":"pr_merge","commitsCount":2,"pusher":{"login":"solardiz","name":"Solar Designer","path":"/solardiz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/18089797?s=80&v=4"},"commit":{"message":"CS: use curly braces for all control structures\n\nControl structures without curly braces are quite\nerror prone as they will only apply to the\n_first_ PHP statement after the condition.\nThis means that a second statement - even when\nindented the same - will be run _unconditionally_,\nbut it also means that anyone working with the code\nneeds a really good understanding of what\na \"statement\" is in PHP.\n\nIn other words, it's best practice by now\nto always use curly braces with control structures.\n\nRef:\n* PSR12: https://www.php-fig.org/psr/psr-12/#5-control-structures\n > The body of each structure MUST be enclosed by\n > braces. This standardizes how the structures\n > look and reduces the likelihood of introducing\n > errors as new lines get added to the body.","shortMessageHtmlLink":"CS: use curly braces for all control structures"}},{"before":"118ec70fcfc3c54a820bd1dae721cfe5b89e5869","after":"a37a163df1f0577394d5b3cbe1c6bf27dfcd56ea","ref":"refs/heads/main","pushedAt":"2023-03-21T16:47:25.000Z","pushType":"pr_merge","commitsCount":4,"pusher":{"login":"solardiz","name":"Solar Designer","path":"/solardiz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/18089797?s=80&v=4"},"commit":{"message":"Add a .gitattributes file\n\nGitHub/Git allows for creating package archives as zip files.\nThose archives are also used by Packagist.\n\nIt is generally considered good practice for those package to only\ncontain source files.\nTests, CI related files and tooling configuration files should be\nexcluded from those archives to keep them lean.\n\nThis `.gitattributes` files does exactly that and prevents files which\nare not needed by dependencies from being included in the archives.\n\nAs a bonus, line ending normalization has been added as well.","shortMessageHtmlLink":"Add a .gitattributes file"}},{"before":"8dcaac8389a1b87c1a3e4342197df0bc44214d2f","after":"118ec70fcfc3c54a820bd1dae721cfe5b89e5869","ref":"refs/heads/main","pushedAt":"2023-03-20T17:17:57.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"solardiz","name":"Solar Designer","path":"/solardiz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/18089797?s=80&v=4"},"commit":{"message":"CI: add automated test runs via GH Actions\n\nThis adds a workflow to automatically run the tests against PHP 5.3 - 8.3 on all pushes and pull requests to this repo.\n\nNotes:\n* The test run against PHP 8.3 is allowed to fail (for now) as PHP 8.3 is not stable yet.\n* As the `setup-php` action runner does [not support PHP 5.0, 5.1 and 5.2](https://github.com/shivammathur/setup-php/#tada-php-support), the tests are not run against those PHP versions.\n\nThe commit includes a small change to the `test.php` script to send an exit code depending on whether the test run succeeded or failed.\nThis is necessary to allow GH Actions to mark a build as failed.","shortMessageHtmlLink":"CI: add automated test runs via GH Actions"}},{"before":"6ea9412592d50a6b69e9630f7da6e6c3ebd902b0","after":"8dcaac8389a1b87c1a3e4342197df0bc44214d2f","ref":"refs/heads/main","pushedAt":"2023-03-20T15:51:35.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"solardiz","name":"Solar Designer","path":"/solardiz","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/18089797?s=80&v=4"},"commit":{"message":"PHP 8.1 | gensalt_blowfish(): prevent deprecation notice\n\nThe PHP `chr()` function expects an integer as the input parameter, but the output of `ord('0') + $this->iteration_count_log2 / 10` might be a floating point number.\n\nWhile PHP type juggles between floats and integers, the number will likely loose precision when going from float to integer.\n\nAs of PHP 8.1, these type of \"implicit float to int\" conversions will throw a deprecation notice when precision is lost.\n\nAs this loss of precision is not an issue for this code, this small change make the type juggling explicit instead of implicit, which gets rid of the deprecation notice.\n\nRef:\n* https://www.php.net/manual/en/function.chr.php\n* https://www.php.net/manual/en/migration81.deprecated.php#migration81.deprecated.core.implicit-float-conversion","shortMessageHtmlLink":"PHP 8.1 | gensalt_blowfish(): prevent deprecation notice"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADChdblAA","startCursor":null,"endCursor":null}},"title":"Activity ยท openwall/phpass"}