-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Replace PHPDoc dataProvider with attribute syntax #21612
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
Conversation
| /** | ||
| * @dataProvider urlProvider | ||
| */ | ||
| #[DataProvider('urlProvider')] |
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.
please make the data provider itself static, thanks
| /** | ||
| * @dataProvider urlProvider | ||
| */ | ||
| #[DataProvider('urlProvider')] |
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.
symfony-docs/validation/custom_constraint.rst
Line 584 in 3b6b704
| * @dataProvider provideInvalidConstraints |
Could also be updated ?
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.
@alamirault shall we create a DOCtor rule for using phpunit attributes and search and report the most common ones?
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.
We did this update while merging. Thanks!
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.
@alamirault shall we create a DOCtor rule for using phpunit attributes and search and report the most common ones?
Not yet, not enough occurrence
ce4883d to
6cc5b9c
Compare
|
I like this! Thanks Tom! We merged this in 7.3 and all the upper branches. |
The attribute syntax is supported in PHPUnit v10, v11, and v12. It should be encouraged in Symfony 8.x, and maybe backport to Symfony 7.x?