Skip to content

Conversation

gharlan
Copy link
Contributor

@gharlan gharlan commented Jul 18, 2025

refs phpstan/phpstan#11178 (comment)

This pull request introduces the rawMessage key in ignoreErrors for non-regex raw error messages:

parameters:
	ignoreErrors:
		-
			rawMessage: 'Raw message without regex escaping etc.'
			identifier: ...

@gharlan gharlan force-pushed the ignore-errors-raw-message branch from 5181c1f to 7defb25 Compare July 21, 2025 14:35
paths: listOf(string())
?identifier: string()
?reportUnmatched: bool()
]),
Copy link
Member

Choose a reason for hiding this comment

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

This is quickly getting out of hand. You're missing some combinations, like with identifiers key.

Maybe we could validate these entries manually in

private function validateParameters(array $parameters, array $parametersSchema): void
instead of trying to have a huge declarative schema describing all combinations.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is quickly getting out of hand. You're missing some combinations, like with identifiers key.

identifiers didn't exist when I created the pull request. Added them now.

Maybe we could validate these entries manually in [...]

Should this be done here in the pr? Also reducing the existing combinations?

Copy link
Member

Choose a reason for hiding this comment

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

You can try sending a separate PR that would move the validation. And once it's merged, rebase this PR and adjust the new logic 😊 Thank you.

@gharlan gharlan force-pushed the ignore-errors-raw-message branch from 7defb25 to d0dd802 Compare August 30, 2025 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants