Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Roadmap v2 / PHPUnit 10 #95

Closed
9 of 11 tasks
jrfnl opened this issue Mar 11, 2023 · 3 comments
Closed
9 of 11 tasks

Roadmap v2 / PHPUnit 10 #95

jrfnl opened this issue Mar 11, 2023 · 3 comments

Comments

@jrfnl
Copy link
Collaborator

jrfnl commented Mar 11, 2023

PHPUnit 10 has been released beginning of February.

As this is a major release with breaking changes, upgrading should be a done deliberately and managed.
This effectively means that upgrading to a PHPUnit Polyfills version which supports PHPUnit 10 should also be done deliberately and managed, so the Polyfills should get a new major release.

To this end, the develop branch in this repo will be renamed to 1.x and a new 2.x branch will be added to contain the code for the 2.x series.

The intention is for the 1.x series to continue to be maintained, alongside the 2.x series, for as long as PHPUnit continues to make PHPUnit 9.x compatible with new PHP versions.

Refs:

Proposed Roadmap for PHPUnit Polyfills 2.0 / PHPUnit 10.0 support

Planning

Providing I manage to get everything working, release version 2.x before the end of March 2023.

Request for comments

This roadmap is open for comments and I'd especially like to hear opinions on the AssertAttributeHelper and about a potential PHPErrorHelper.

@jrfnl
Copy link
Collaborator Author

jrfnl commented Apr 1, 2023

Nearly there.... just some final touches needed for the test listener implementation.

Also, looks like PHPUnit 10.1 (expected mid-April) is introducing two new assertions assertObjectHasProperty() and assertObjectNotHasProperty(), so would be good to get those polyfilled as well.

@jrfnl
Copy link
Collaborator Author

jrfnl commented Jun 5, 2023

Status update

Assertions and expectations

PHPUnit 10.1 and 10.2 have been released in the mean time and the additional assertion method polyfills for PHPUnit 10.1 have been pulled & merged via #116.

TestListeners

As for the TestListeners... while I have the principle of it working without issues, the trouble I'm running into is the translation between the old Listener "events" and the new Events. There is no documentation available about this and finding which "old" events ended up triggering the test listener is not as straight forward as it seems (seemed).

I basically need a couple of days/week to research this in a lot more depth to make sure the implementation the Polyfills repo offers is comparable between PHPUnit < 10 and PHPUnit 10.x and what with there being quite a lot of other things on my plate, I haven't been able to find that time so far.

Implications

What this means is that the TestListener implementation being unfinished has been blocking the release.

Some quick code search checks finds that only three of the (public) dependents of the PHPUnit Polyfills use the TestListener Polyfill, while all other dependents only use the assertion/expectation polyfills.

Decision

So.. with the above in mind, I've decided to release the 2.0.0 version without a PHPUnit 10.x compatible TestListener implementation and to move the task of adding a PHPUnit 10.x compatible TestListener implementation to a future 2.x release of the PHPUnit Polyfills.

This will unblock the upgrade to PHPUnit 10.x for most dependents and buys me some time to ensure the PHPUnit 10.x compatible TestListener implementation will be correct and stable when it is released in a later 2.x version of the PHPUnit Polyfills.

jrfnl added a commit that referenced this issue Jun 6, 2023
The initial PHPUnit Polyfills 2.0.0 release will not contain a PHPUnit 10 compatible TestListener implementation.

This allows the tests to pass on PHPUnit 10 for now until that has been resolved.

Refs:
* #95 (comment)
* #128
@jrfnl
Copy link
Collaborator Author

jrfnl commented Jun 6, 2023

Closing as version 2.0.0 has been released.

A separate ticket is now open to track the PHPUnit 10 TestListener implementation: #128.

@jrfnl jrfnl closed this as completed Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant