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
@gharlan gharlan force-pushed the ignore-errors-raw-message branch from c8329e5 to 9aec04f Compare September 10, 2025 18:47
@gharlan
Copy link
Contributor Author

gharlan commented Sep 10, 2025

In a follow-up PR, I would like to change the baseline generation to use rawMessage instead of message.
Can I just change that? Or should it be configurable? Should it be part of bleedingEdge?

@ondrejmirtes ondrejmirtes merged commit 6f87293 into phpstan:2.1.x Sep 10, 2025
412 of 456 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

Yes, the change should be part of bleeding edge. Since both BaselinePhpErrorFormatter and BaselineNeonErrorFormatter are instantiated in AnalyseCommand, you should add a new featureToggles parameter and fetch it there through $container->getParameter().

@gharlan gharlan deleted the ignore-errors-raw-message branch September 10, 2025 19:15
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