Skip to content

Switch to ExpectUserDeprecationMessageTrait #58314

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

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

derrabus
Copy link
Member

Q A
Branch? 7.2
Bug fix? no
New feature? no
Deprecations? no
Issues N/A
License MIT

This PR switches some tests added after #54593 to our new trait, allowing us to run those under PHPUnit 11 as well.

@derrabus derrabus requested a review from dunglas as a code owner September 19, 2024 07:59
@carsonbot carsonbot added this to the 7.2 milestone Sep 19, 2024
@stof
Copy link
Member

stof commented Sep 19, 2024

Please work first on making this a proper polyfill before migrating to it (so that you don't hide cases where the test would pass only because of the non-standard behavior of the polyfill). See the discussion on the PR adding that trait.

@derrabus
Copy link
Member Author

This is not a blocker. We already have migrated to the new polyfill. This PR merely fixes an inconsistency and the polyfill works good enough for our tests.

@stof
Copy link
Member

stof commented Sep 19, 2024

@derrabus the polyfill works for our tests because it behaves like ExpectDeprecationTrait and so does not change the behavior of the method. And that's precisely the issue: it does not ensure the test will work with PHPunit 11 because it does not apply the PHPUnit 11 behavior.

@derrabus
Copy link
Member Author

Well, we make zero use of that fuzzy matching feature, so the behavior is the same for our tests. You're right that we need to fix the polyfill, but it's not a blocker for this PR.

@derrabus
Copy link
Member Author

But here you go: #58317

@derrabus derrabus force-pushed the chore/deprecation-trait branch from 4333bed to d923c28 Compare September 19, 2024 09:48
@derrabus derrabus merged commit 5306b92 into symfony:7.2 Sep 19, 2024
7 of 10 checks passed
@derrabus derrabus deleted the chore/deprecation-trait branch September 19, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants