-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Non-static data providers are deprecated in PHPUnit 10 #48281
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
Comments
Thanks for creating the issue. For your information, we are already aware of this and IIRC @OskarStark started working on making the data providers static. I'm not sure how we should handle the classes |
Yes 💪
Nor sure yet, but this should be handled in a separate PR, I would first replace all internal used data providers by a static one. |
Todo
|
@wouterj thanks, I'll keep this issue so we can keep track of the progress. @OskarStark Thanks for picking it up, really good job 🚀 |
For the record, @stof opened: |
… (OskarStark) This PR was squashed before being merged into the 5.4 branch. Discussion ---------- Migrate to `static` data providers using `rector/rector` | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | #48281 | License | MIT | Doc PR | n/a `@nicolas`-grekas it can be executed by running: ```bash tools/vendor/bin/rector process --config=tools/rector.php ``` Review commit by commit. We need to check now where we use object context in static providers and fix them manually, an maybe merge them manually, unmerge them and apply rector one by one to every branch. Commits ------- 2ec54e9 Migrate to `static` data providers using `rector/rector`
Thank you for this issue. |
Done |
Description
PHPUnit 10 (still unreleased) is deprecating non-static data providers (see sebastianbergmann/phpunit@9caafe2).
While this is still not a released change, it is worth preparing for upcoming change. It will not only affect Symfony tests, but also libraries and applications using base test classes (like
\Symfony\Component\Mailer\Test\TransportFactoryTestCase
, etc.).Example
No response
The text was updated successfully, but these errors were encountered: