-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[PhpUnitBridge] Deprecate @expectedDeprecation annotation #36034
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
[PhpUnitBridge] Deprecate @expectedDeprecation annotation #36034
Conversation
I couldn't easily add new tests (it would have been quite ironic to test the deprecation annotation is deprecated using the deprecation method) as |
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.
The Symfony test suite will fail (already fails?) as soon as the annotation is used? If yes, this should be updated and maybe this would be enough to consider this tested?
I don't think this is the reason it fails. Initially, I was thinking I should replace all However, I now realise the tests are being run only on the whole Symfony repo. And since this annotation is only for the tests, I guess we could replace all such annotations with the method in the Symfony tests code. Could you confirm this is the case? |
Any pointers on why this job failed? I see one error before the tests: https://travis-ci.org/github/symfony/symfony/jobs/661314551#L9698-L9700 But it seems it has not failed the job. I couldn't find a failing test. |
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 should also update the codebase to the new way.
src/Symfony/Bridge/PhpUnit/Legacy/SymfonyTestsListenerTrait.php
Outdated
Show resolved
Hide resolved
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.
(with a minor comment)
@nicolas-grekas Thank you for patiently walking me through the deprecation process! I looked at some previous deprecations to try to grasp it, but I guess I was looking at a slightly different case in a |
Thank you @hkdobrev. |
Addresses https://github.com/orgs/symfony/projects/1#card-32934769 as a follow-up to #35192.
Deprecating
@expectedDeprecation
annotation on tests in favour of theexpectDeprecation()
method similar to other PHPUnit deprecations of annotations in favour of methods.