Skip to content

Commit cf3c4bf

Browse files
authored
Merge pull request #132 from Yoast/2.0/update-readme-changelog
Changelog and readme updates for the 2.0.0 release
2 parents 1521f98 + 182fc50 commit cf3c4bf

File tree

3 files changed

+149
-80
lines changed

3 files changed

+149
-80
lines changed

CHANGELOG.md

Lines changed: 61 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,64 @@ This projects adheres to [Keep a CHANGELOG](http://keepachangelog.com/) and uses
99

1010
_Nothing yet._
1111

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"`.
23+
24+
[PHPUnit 10 release notification]: https://phpunit.de/announcements/phpunit-10.html
25+
[PHPUnit 10 changelog]: https://github.com/sebastianbergmann/phpunit/blob/10.0.19/ChangeLog-10.0.md
26+
27+
> :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].
32+
33+
[polyfill-ticket]: https://github.com/Yoast/PHPUnit-Polyfills/issues/128
34+
35+
36+
### Changelog
37+
38+
#### Added
39+
* `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].
56+
57+
[#102]: https://github.com/Yoast/PHPUnit-Polyfills/pull/102
58+
[#104]: https://github.com/Yoast/PHPUnit-Polyfills/pull/104
59+
[#108]: https://github.com/Yoast/PHPUnit-Polyfills/pull/108
60+
[#109]: https://github.com/Yoast/PHPUnit-Polyfills/pull/109
61+
[#110]: https://github.com/Yoast/PHPUnit-Polyfills/pull/110
62+
[#116]: https://github.com/Yoast/PHPUnit-Polyfills/pull/116
63+
[#130]: https://github.com/Yoast/PHPUnit-Polyfills/pull/130
64+
65+
1266
## [1.0.5] - 2023-03-31
1367

1468
### Fixed
15-
* 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].
1670
This applies to the following polyfills:
1771
- `assertIsClosedResource()`
1872
- `assertIsNotClosedResource()`
@@ -27,9 +81,9 @@ _Nothing yet._
2781

2882
### Changed
2983
* 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].
3387
* General housekeeping.
3488

3589
[#92]: https://github.com/Yoast/PHPUnit-Polyfills/pull/92
@@ -70,14 +124,14 @@ This is a maintenance release.
70124
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.
71125

72126
### 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].
74128

75129
### Changed
76130
* README: minor textual clarifications and improvements. PRs [#52], [#54], props [Pierre Gordon].
77131
* General housekeeping.
78132

79133
### 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].
81135

82136
[#52]: https://github.com/Yoast/PHPUnit-Polyfills/pull/52
83137
[#54]: https://github.com/Yoast/PHPUnit-Polyfills/pull/54
@@ -156,6 +210,7 @@ Initial release.
156210

157211

158212
[Unreleased]: https://github.com/Yoast/PHPUnit-Polyfills/compare/main...HEAD
213+
[2.0.0]: https://github.com/Yoast/PHPUnit-Polyfills/compare/1.0.5...2.0.0
159214
[1.0.5]: https://github.com/Yoast/PHPUnit-Polyfills/compare/1.0.4...1.0.5
160215
[1.0.4]: https://github.com/Yoast/PHPUnit-Polyfills/compare/1.0.3...1.0.4
161216
[1.0.3]: https://github.com/Yoast/PHPUnit-Polyfills/compare/1.0.2...1.0.3

0 commit comments

Comments
 (0)