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
+61-6Lines changed: 61 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,64 @@ This projects adheres to [Keep a CHANGELOG](http://keepachangelog.com/) and uses
9
9
10
10
_Nothing yet._
11
11
12
+
## [2.0.0] - 2023-06-06
13
+
14
+
### PHPUnit 10 support
15
+
16
+
This release updates the PHPUnit Polyfills to allow for _"writing your tests for PHPUnit 10 and running them all the way back to PHPUnit 5"_.
17
+
18
+
Please keep in mind that the PHPUnit Polyfills provide _forward_-compatibility. This means that features which PHPUnit no longer supports in PHPUnit 10.x, like expecting PHP deprecation notices or warnings, are also no longer supported in the 2.0 release of the PHPUnit Polyfills.
19
+
20
+
Please refer to the [PHPUnit 10 release notification] and [PHPUnit 10 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 and 2.x series side-by-side, like so `composer require --dev yoast/phpunit-polyfills:"^1.0 || ^2.0"`.
> :warning:**Important: about the TestListener polyfill**:warning:
28
+
>
29
+
> The TestListener polyfill in PHPUnit Polyfills 2.0 is **[not (yet) compatible with PHPUnit 10.0.0][polyfill-ticket]**.
30
+
>
31
+
> If you need the TestListener polyfill, it is recommended to stay on the PHPUnit Polyfills 1.x series for the time being and to watch the [related ticket][polyfill-ticket].
*`Yoast\PHPUnitPolyfills\Polyfills\AssertIgnoringLineEndings` trait to polyfill the `Assert::assertStringEqualsStringIgnoringLineEndings()` and the `Assert::assertStringContainsStringIgnoringLineEndings()` methods as introduced in PHPUnit 10.0.0. PR [#109].
40
+
*`Yoast\PHPUnitPolyfills\Polyfills\AssertIsList` trait to polyfill the `Assert::assertIsList()` method as introduced in PHPUnit 10.0.0. PR [#110].
41
+
*`Yoast\PHPUnitPolyfills\Polyfills\AssertObjectProperty` trait to polyfill the `Assert::assertObjectHasProperty()` and the `Assert::assertObjectNotHasProperty()` methods as introduced in PHPUnit 10.1.0. PR [#116].
42
+
43
+
#### Changed
44
+
* Composer: allow for installation of PHPUnit 10.x. PR [#130]
45
+
* Nearly all assertion methods are now `final`. This alignes them with the same change made upstream in PHPUnit 10.0.0. PR [#104].
46
+
* General housekeeping.
47
+
48
+
#### Removed
49
+
* Support for PHP < 5.6. PR [#102].
50
+
* Support for PHPUnit < 5.7.21. PR [#102].
51
+
* Support for expecting PHP deprecations, notices, warnings and error via the `Yoast\PHPUnitPolyfills\Polyfills\ExpectPHPException` trait. PR [#108].
52
+
The trait has been removed completely as PHPUnit 10 no longer supports this functionality.
53
+
* The `Yoast\PHPUnitPolyfills\Polyfills\AssertNumericType` trait which is no longer needed now support for PHPUnit < 5.7 has been dropped. PR [#102].
54
+
* The `Yoast\PHPUnitPolyfills\Polyfills\ExpectException` trait which is no longer needed now support for PHPUnit < 5.7 has been dropped. PR [#102].
55
+
* The `Yoast\PHPUnitPolyfills\Polyfills\AssertFileDirectory` trait which is no longer needed now support for PHPUnit < 5.7 has been dropped. PR [#102].
* A custom `$message` parameter passed to an assertion, will no longer overrule an emulated "assertion failed" message, but will be prefixed to it instead. PR [#97]
69
+
* A custom `$message` parameter passed to an assertion, will no longer overrule an emulated "assertion failed" message, but will be prefixed to it instead. PR [#97].
16
70
This applies to the following polyfills:
17
71
-`assertIsClosedResource()`
18
72
-`assertIsNotClosedResource()`
@@ -27,9 +81,9 @@ _Nothing yet._
27
81
28
82
### Changed
29
83
* The `develop` branch has been removed. Development will now take place in the `1.x` and `2.x` branches.
30
-
* README: links to the PHPUnit manual now point explicitly to the PHPUnit 9.x documentation. PR [#94]
31
-
* README: new sub-section about PHPUnit version support. PR [#99]
32
-
* README: various minor improvements. PRs [#92], [#93]
84
+
* README: links to the PHPUnit manual now point explicitly to the PHPUnit 9.x documentation. PR [#94].
85
+
* README: new sub-section about PHPUnit version support. PR [#99].
86
+
* README: various minor improvements. PRs [#92], [#93].
@@ -70,14 +124,14 @@ This is a maintenance release.
70
124
As of version 2.15.0 of the `shivammathur/setup-php` action for GitHub Actions, the PHPUnit Polyfills can be installed directly from this action using the `tools` key.
71
125
72
126
### Added
73
-
* README: FAQ section about installing and using the library via the `shivammathur/setup-php` action. PR [#52]
127
+
* README: FAQ section about installing and using the library via the `shivammathur/setup-php` action. PR [#52].
74
128
75
129
### Changed
76
130
* README: minor textual clarifications and improvements. PRs [#52], [#54], props [Pierre Gordon].
77
131
* General housekeeping.
78
132
79
133
### Fixed
80
-
* Autoloader: improved compatibility with packages which create a `class_alias` for the `PHPUnit_Runner_Version` or `PHPUnit\Runner\Version` class. PR [#59]
134
+
* Autoloader: improved compatibility with packages which create a `class_alias` for the `PHPUnit_Runner_Version` or `PHPUnit\Runner\Version` class. PR [#59].
0 commit comments