You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+40Lines changed: 40 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,45 @@ This projects adheres to [Keep a CHANGELOG](http://keepachangelog.com/) and uses
9
9
10
10
_Nothing yet._
11
11
12
+
## [4.0.0] - 2025-02-09
13
+
14
+
### PHPUnit 12 support
15
+
16
+
This release updates the PHPUnit Polyfills to allow for _"writing your tests for PHPUnit 12 and running them all the way back to PHPUnit 7"_. \[*\]
17
+
18
+
Please keep in mind that the PHPUnit Polyfills provide _forward_-compatibility. This means that features which PHPUnit no longer supports in PHPUnit 12.x, are also no longer supported in the 4.0 release of the PHPUnit Polyfills.
19
+
20
+
Please refer to the [PHPUnit 12 release notification] and [PHPUnit 12 changelog] to inform your decision on whether or not to upgrade (yet).
21
+
22
+
Projects which don't use any of the new or removed functionality in their test suite, can, of course, use the PHPUnit Polyfills 1.x, 2.x, 3.x and 4.x series side-by-side, like so `composer require --dev yoast/phpunit-polyfills:"^1.0 || ^2.0 || ^3.0 || ^4.0"`.
\[*\]: _Note: Releases from the PHPUnit Polyfills 4.x branch will support running tests on PHPUnit 7.5.0 - 9.x, 11.x and 12.x, but will not allow for running tests on PHPUnit 10 (for reasons explained in [#200])._
28
+
_In practical terms, the net effect of this is that tests on PHP 8.1 will run on PHPUnit 9 instead of PHPUnit 10. Other than that, there is no impact._
29
+
30
+
31
+
### Changelog
32
+
33
+
#### Changed
34
+
* Composer: allow for installation of PHPUnit 12.x. PR [#247]
35
+
* Scalar parameter type declarations and return type declarations are now used where possible. PR [#241]
36
+
* General housekeeping.
37
+
38
+
#### Removed
39
+
* Support for PHP < 7.1. PR [#238].
40
+
* Support for PHPUnit < 7.5.0. PR [#239].
41
+
* The `Yoast\PHPUnitPolyfills\Polyfills\AssertIsType` trait which is no longer needed now support for PHPUnit < 7.5 has been dropped. PR [#239].
42
+
* The `Yoast\PHPUnitPolyfills\Polyfills\AssertStringContains` trait which is no longer needed now support for PHPUnit < 7.5 has been dropped. PR [#239].
43
+
* The `Yoast\PHPUnitPolyfills\Polyfills\AssertEqualsSpecializations` trait which is no longer needed now support for PHPUnit < 7.5 has been dropped. PR [#239].
This library is set up to allow for creating PHPUnit cross-version compatible tests by offering a number of polyfills for functionality which was introduced, split up or renamed in PHPUnit.
66
66
67
-
### Write your tests for PHPUnit 11.x and run them on PHPUnit 7.5 - 11.x
67
+
### Write your tests for PHPUnit 12.x and run them on PHPUnit 7.5 - 12.x
68
68
69
69
The polyfills have been setup to allow tests to be _forward_-compatible. What that means is, that your tests can use the assertions supported by the _latest_ PHPUnit version, even when running on older PHPUnit versions.
### Q: Why don't the PHPUnit Polyfills 3.x versions support running tests on PHPUnit 10 ?
701
+
### Q: Why don't the PHPUnit Polyfills 3.x and 4.x versions support running tests on PHPUnit 10 ?
702
702
703
703
PHPUnit 11.0 introduced the `expectUserDeprecationMessage*()` methods. To polyfill these for PHPUnit 10 would mean that the Polyfills package could no longer be a "drop-in" helper package, but would need to set extra requirements on test suites using the polyfills when used with PHPUnit 10 (like hooking into events or compulsory use of the `TestCase`s provided by this package).
704
704
705
705
As it was deemed desirable enough to polyfill the methods, the releases from the 3.x branch of the PHPUnit Polyfills do not support running tests on PHPUnit 10.
706
706
707
707
The impact of this compromise is minimal, as, in the most common case of running the tests with Composer installed dependencies, this just and only means that test runs on PHP 8.1 will use PHPUnit 9 instead of PHPUnit 10. There is no other impact.
708
708
709
-
Keep in mind that functionality _added_ in PHPUnit 10, is still polyfilled and available in PHPUnit Polyfills 3.x.
709
+
Keep in mind that functionality _added_ in PHPUnit 10, is still polyfilled and available in PHPUnit Polyfills 3.x/4.x.
0 commit comments