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.2
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 lets 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 4 times, most recently from d460d60 to c5093c3 Compare May 21, 2024 06:24
@derrabus derrabus force-pushed the feature/expect-deprecation-polyfill branch from c5093c3 to 4fd7256 Compare May 21, 2024 16:23
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