Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromhkdobrev:phpunit-bridge-deprecate-deprecation-annotation
Mar 16, 2020
Merged

[PhpUnitBridge] Deprecate @expectedDeprecation annotation#36034

fabpot merged 1 commit intosymfony:masterfromhkdobrev:phpunit-bridge-deprecate-deprecation-annotation
Mar 16, 2020

Conversation

hkdobrev
Copy link
Contributor

QA
Branch?master
Bug fix?no
New feature?no
Deprecations?yes
TicketsN/A
LicenseMIT
Doc PRN/A

Addresseshttps://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.

@hkdobrev
Copy link
ContributorAuthor

I couldn't easily add new tests (it would have been quite ironic to test the deprecation annotation is deprecated using the deprecation method) asSymfonyListenerTestsTrait has very little tests itself. Should I just an additional test just for this deprecation which may not cover all of its pre-existing logic?

@hkdobrevhkdobrev changed the titleDeprecate @expectedDeprecation annotation[PhpUnitBridge] Deprecate @expectedDeprecation annotationMar 11, 2020
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment
edited
Loading

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?

@hkdobrev
Copy link
ContributorAuthor

@nicolas-grekas

The Symfony test suite will fail (already fails?) as soon as the annotation is used?

I don't think this is the reason it fails.

Initially, I was thinking I should replace all@expectedDeprecation annotations with the new method in the Symfony tests themselves.
But then I realised when used as separate components, the other ones do not require the PHPUnit Bridge where the trait lives.

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?

@hkdobrev
Copy link
ContributorAuthor

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.

Copy link
Member

@nicolas-grekasnicolas-grekas left a 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.

hkdobrev reacted with thumbs up emoji
@nicolas-grekasnicolas-grekas added this to thenext milestoneMar 12, 2020
@hkdobrevhkdobrev requested a review fromsroze as acode ownerMarch 12, 2020 21:40
Copy link
Member

@nicolas-grekasnicolas-grekas left a 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)

@hkdobrev
Copy link
ContributorAuthor

@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 ax.4.0 release. I hope to be able to help with future deprecations.

@fabpot
Copy link
Member

Thank you@hkdobrev.

hkdobrev reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@srozesrozeAwaiting requested review from sroze

Assignees
No one assigned
Projects
None yet
Milestone
5.1
Development

Successfully merging this pull request may close these issues.

4 participants
@hkdobrev@fabpot@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp