-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
[Testing] Update tests to use attributes for data providers #20237
Conversation
best_practices.rst
Outdated
.. note:: | ||
|
||
The ``#[DataProvider]`` attribute is available in PHPUnit 10 and later versions. | ||
In previous versions, use the ``@dataProvider`` PHPdoc annotation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In previous versions, use the ``@dataProvider`` PHPdoc annotation. | |
In previous versions, use the ``@dataProvider`` PHPDoc annotation. |
To make DOCtor-RST happy :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Fixed. Thanks.
Let's ask @symfony/docs folks if they agree on using PHPUnit 10+ in 7.2 branch ... or if they prefer to wait ... or even if they prefer to use it in earlier branches. Thanks. |
I think our focus should be to be consistent with the PHPunit version across the documentation. And the main thing is then deprecation handling (e.g. https://symfony.com/doc/current/setup/upgrade_major.html#deprecations-in-phpunit). This means we should at least switch to PHPunit 11.3 and update articles like that one to use PHPunit's error handling features. If we do this, I think it's OK to keep using PHPunit 9 (with a big warning admonition) for the PhpUnitBridge documentation until we support it (probably in 7.3 or 7.4). For me, it's either that or keep using PHPunit 9 until we have support for PHPunit 11.3+ in the PhpUnitBridge. I don't see much value in only updating this attribute. |
OK, let's close this without merging and let's update PHPUnit to 11 in Symfony 7.3 or 7.4/8.0. Thanks! |
Fixes #20202.