Skip to content

Conversation

nikophil
Copy link
Contributor

@nikophil nikophil commented Aug 28, 2025

This will allow to only ignore specific deprecations, instead of all of them

@nikophil nikophil force-pushed the ignore-deprecations-by-regex branch from 82e35f3 to 8a5c9a3 Compare August 28, 2025 19:46
return true;
}

public function shouldIgnore(string $message): bool

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not comfortable with the fact that a value object, which is what a Metadata object is supposed to be, makes a decision like that.

This decision should be moved to ErrorHandler::deprecationIgnoredByTest(), for example.

Copy link
Contributor Author

@nikophil nikophil Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

I must mention that I did the same thing in IgnorePhpunitWarnings: https://github.com/sebastianbergmann/phpunit/blob/main/src/Metadata/IgnorePhpunitWarnings.php#L40

do you want that I change that too?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, please. This should be a separate PR to the 12.3 branch. Thanks!

@nikophil nikophil force-pushed the ignore-deprecations-by-regex branch from 8a5c9a3 to 8ab4448 Compare August 29, 2025 15:15
@nikophil nikophil force-pushed the ignore-deprecations-by-regex branch from 8ab4448 to afea22c Compare August 29, 2025 15:31
@sebastianbergmann sebastianbergmann changed the title Add regex pattern to #[IgnoreDeprecations] Add support for regular expressions to #[IgnoreDeprecations] Sep 23, 2025
@sebastianbergmann sebastianbergmann merged commit 1e68628 into sebastianbergmann:main Sep 23, 2025
25 checks passed
@sebastianbergmann sebastianbergmann changed the title Add support for regular expressions to #[IgnoreDeprecations] Support for regular expressions with #[IgnoreDeprecations] attribute Sep 23, 2025
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.

2 participants