-
Notifications
You must be signed in to change notification settings - Fork 13
Comparing changes
Open a pull request
base repository: Yoast/PHPUnit-Polyfills
base: 1.0.2
head repository: Yoast/PHPUnit-Polyfills
compare: 1.0.3
- 13 commits
- 17 files changed
- 2 contributors
Commits on Nov 3, 2021
-
GH Actions: split off lint workflow
Execute linting in a separate workflow from running the tests.
Configuration menu - View commit details
-
Copy full SHA for 8ee6910 - Browse repository at this point
Copy the full SHA 8ee6910View commit details -
GH Actions: further improve PHP ini settings
* `E_ALL` does not really contain **ALL** PHP notices across all PHP versions, in some `E_STRICT`, for instance, is excluded from `E_ALL`, so using `-1` is the better choice as that will always contain everything. * While assertions are (as far as I'm aware) not currently used in the code base, it's still a good idea to enable `zend_assertions` in case something would be changed in the test tooling used. This is one of the other ini settings which is not turned on by default in the `setup-php` action. Ref: https://www.php.net/manual/en/ini.core.php#ini.zend.assertionsConfiguration menu - View commit details
-
Copy full SHA for e082fe6 - Browse repository at this point
Copy the full SHA e082fe6View commit details -
GH Actions: auto-cancel previous builds for same branch
In Travis, when the same branch was pushed again and the "Auto cancellation" option on the "Settings" page had been turned on (as it was for most repos), any still running builds for the same branch would be stopped in favour of starting the build for the newly pushed version of the branch. To enable this behaviour in GH Actions, a `concurrency` configuration needs to be added to each workflow for which this should applied to. More than anything, this is a way to be kind to GitHub by not wasting resources which they so kindly provide to us for free. Refs: * https://github.blog/changelog/2021-04-19-github-actions-limit-workflow-run-or-job-concurrency/ * https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency
Configuration menu - View commit details
-
Copy full SHA for 38841dc - Browse repository at this point
Copy the full SHA 38841dcView commit details -
Merge pull request #63 from Yoast/feature/ghactions-various-improvements
GH Actions: various improvements
Configuration menu - View commit details
-
Copy full SHA for 33024ff - Browse repository at this point
Copy the full SHA 33024ffView commit details -
Tests: tweaks for PHPUnit 10.x compatibility
Initial tweaks to make the tests compatible with PHPUnit 10.x, which enforces a `mixed` return type for the `TestCase::runTest()` method. To test the TestListener, prior to PHPUnit 7.0, overloading the `runTest()` method works best, but as of PHPUnit 10.0, the `runTest()` method has a `mixed` return type declaration (PHP 8.0+). However, since PHPUnit 7.0, testing the TestListener also works when the test name with which the `TestCase` is instantiated is not `runTest()`. So either way, the fixtures used for the TestListener tests need to be duplicated and have two variations. Now the choice was which option to choose: * Duplicate the classes and add a return type to the `runTest()` method. * Duplicate the classes and rename the test method. I investigated both options and have decided to implement option 2 as `void` is not accepted as covariant with `mixed` and these methods are all `void` methods, so adding `mixed` as the return type would be misrepresenting the functionality. The toggle for which test class to load for the various tests has been implemented with a helper method.
Configuration menu - View commit details
-
Copy full SHA for fd6d557 - Browse repository at this point
Copy the full SHA fd6d557View commit details -
Merge pull request #64 from Yoast/feature/PHPUnit-10-tweak
Tests: tweaks for PHPUnit 10.x compatibility
Configuration menu - View commit details
-
Copy full SHA for 0670f2e - Browse repository at this point
Copy the full SHA 0670f2eView commit details
Commits on Nov 11, 2021
-
AssertClosedResource: improve error messages
The `sebastian/exporter` package has been a dependency of PHPUnit from before PHPUnit 4.8.x (minimum supported version by this library), so it is safe to use the same variable export methodology as PHPUnit itself uses. The class is prefixed via PHP_Scoper when it is includes as part of a PHPUnit Phar file and the toggle added will make sure the class can be loaded both when run via a Composer install, as well as when run via a Phar file. Also note that the Exporter reports closed resources as `NULL`. This has been reported upstream via sebastianbergmann/exporter#36 and for the polyfill a fix has been put in place to work around this. **Important**: While the `sebastian/exporter` package has , in effect, now become a direct dependency of the Polyfills, I'm not going to declare it as such in the `composer.json` file as for all supported PHPUnit versions, the package will already be available via PHPUnit itself, whether installed via Composer or as a PHAR. This prevent potential version conflicts when tests are run via the PHAR, while the Polyfills have been installed via Composer and saves hassle of having to take care of autoloading the Exporter file, while it will be loaded for PHPUnit itself anyway.
Configuration menu - View commit details
-
Copy full SHA for d7c0982 - Browse repository at this point
Copy the full SHA d7c0982View commit details -
Merge pull request #65 from Yoast/feature/assertclosedresource-improv…
…e-error-message AssertClosedResource: improve error messages
Configuration menu - View commit details
-
Copy full SHA for 8a5d6e4 - Browse repository at this point
Copy the full SHA 8a5d6e4View commit details
Commits on Nov 18, 2021
-
Test bootstrap: declare the
PHPUNIT_TESTSUITEconstantThis constant signals to PHPUnit that the tests themselves may run other tests and will prevent tests on older PHPUnit versions from being marked as "risky" for "closing more than just their own buffers".
Configuration menu - View commit details
-
Copy full SHA for 6732940 - Browse repository at this point
Copy the full SHA 6732940View commit details -
Merge pull request #66 from Yoast/feature/tests-minor-stabilization
Test bootstrap: declare the `PHPUNIT_TESTSUITE` constant
Configuration menu - View commit details
-
Copy full SHA for 0b45bcc - Browse repository at this point
Copy the full SHA 0b45bccView commit details
Commits on Nov 23, 2021
-
Includes updating the `VERSION` constant in the `Autoload` class.
Configuration menu - View commit details
-
Copy full SHA for 5cec6c0 - Browse repository at this point
Copy the full SHA 5cec6c0View commit details -
Merge pull request #67 from Yoast/feature/changelog-1.0.3
Changelog for release 1.0.3
Configuration menu - View commit details
-
Copy full SHA for a6d09df - Browse repository at this point
Copy the full SHA a6d09dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5ea3536 - Browse repository at this point
Copy the full SHA 5ea3536View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff 1.0.2...1.0.3