Skip to content
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] Add ExpectUserDeprecationMessageTrait #54593

Open
wants to merge 1 commit into
base: 7.1
Choose a base branch
from

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Apr 13, 2024

Q A
Branch? 7.2
Bug fix? no
New feature? yes
Deprecations? no
Issues Part of #49069, replaces #54538
License MIT

PHPUnit 11 introduces a method expectUserDeprecationMessage() which let's us define which deprecation messages we expect the tested code to raise. This new method can replace our own expectDeprecation() method once we upgrade to PHPUnit 11.

This PR introduces a ExpectUserDeprecationMessageTrait that polyfills this method for older PHPUnit versions. This allowed me to run all tests that I've migrated to expectUserDeprecationMessage() with PHPUnit 11.

@derrabus derrabus force-pushed the feature/expect-deprecation-polyfill branch from 24ff1b6 to 66430f3 Compare May 3, 2024 13:06
@xabbuh xabbuh modified the milestones: 7.1, 7.2 May 15, 2024
@derrabus derrabus force-pushed the feature/expect-deprecation-polyfill branch 2 times, most recently from 435c552 to 6733c9b Compare May 17, 2024 18:30
@derrabus derrabus force-pushed the feature/expect-deprecation-polyfill branch from 6733c9b to d460d60 Compare May 17, 2024 18:41
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.

None yet

4 participants