-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
minor #5269 Prep work to migrate to PHPUnit 9.x (sanmai, keradus)
This PR was squashed before being merged into the 2.16 branch. Discussion ---------- Prep work to migrate to PHPUnit 9.x **This is a fully backward-compatible change.** The general idea is to make the package testable under PHP 5.6 - 7.x - 8.0. This requires using both PHPUnit 5.x and 9.x, because only the last works correctly under PHP 8 (as is - collects coverage report). But PHPUnit 9 has quite a lot of legacy methods removed, and PHPUnit 8 has these methods but with `void` return type. Therefore implementing these methods straight away is a no-go. This can be [with a version-dependent trait](https://github.com/symfony/phpunit-bridge/blob/5.x/Legacy/PolyfillAssertTrait.php), but for a small handful of functions used here it easier to do this by overloading them from `__call` and `__callStatic`. This is where `DeprecatedTestMethods` trait comes into play. And there are also `setUp(): void` etc. which are **not** taken care in this PR. - There's also above-mentioned `PolyfillAssertTrait` from `symfony/phpunit-bridge`, but it is tagged `@internal` so it's a risky game to use it. - And there's also [phpunitgoodpractices/polyfill](https://packagist.org/packages/phpunitgoodpractices/polyfill), but it should be trivial to switch to any of those down the line. --- Extracted from #5262 (it handles `setUp(): void` among other things) Commits ------- 3d8284e Prep work to migrate to PHPUnit 9.x
- Loading branch information
Showing
67 changed files
with
157 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.