Skip to content

Switch to ExpectUserDeprecationMessageTrait#58314

Merged
derrabus merged 1 commit into
symfony:7.2from
derrabus:chore/deprecation-trait
Sep 19, 2024
Merged

Switch to ExpectUserDeprecationMessageTrait#58314
derrabus merged 1 commit into
symfony:7.2from
derrabus:chore/deprecation-trait

Conversation

@derrabus

Copy link
Copy Markdown
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

stof commented Sep 19, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
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

stof commented Sep 19, 2024

Copy link
Copy Markdown
Member

@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
Copy Markdown
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
Copy Markdown
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
@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