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

PHPUnit Extension::bootstrap() called too late #916

Closed
nikophil opened this issue Dec 8, 2024 · 3 comments · Fixed by #917
Closed

PHPUnit Extension::bootstrap() called too late #916

nikophil opened this issue Dec 8, 2024 · 3 comments · Fixed by #917
Labels

Comments

@nikophil
Copy link
Contributor

nikophil commented Dec 8, 2024

Q A
ParaTest version 7.6.1
PHPUnit version 11.4
PHP version 8.4

Since PHPUnit 11.4, bootstrap() method is called before data provider, and data provider events are dispatched synchronously (before this, they were deferred).

Then, I'm wondering if this should not be reflected in paratest: otherwise, subscribers applying on data providers event will work without paratest, but will not have effect in paratest.

WDYT?

You'll find here some kind of a reproducer: running test suite of this lib with paratest fails, whereas it passes with regular phpunit run. The failures occur because the extension bootstrap is called too late.

@Slamdunk
Copy link
Member

Slamdunk commented Dec 9, 2024

Then, I'm wondering if this should not be reflected in paratest

It surely has to.

The fix is straightforward, but I need a reproducer in ParaTest's test suite, not trivial to code.
If you are able to propose a PR just with the test that would be super helpful

@nikophil
Copy link
Contributor Author

nikophil commented Dec 9, 2024

yes, let's do this :)

@nikophil
Copy link
Contributor Author

nikophil commented Dec 9, 2024

done, see #917

@Slamdunk Slamdunk linked a pull request Dec 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants