-
Notifications
You must be signed in to change notification settings - Fork 504
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
Generated baseline can't be used if regex can't be compilated to UTF-8 chars #3835
base: 1.12.x
Are you sure you want to change the base?
Conversation
This pull request has been marked as ready for review. |
e2e/bug-12629/phpstan-baseline.neon
Outdated
path: src/bug-12629.php | ||
|
||
- | ||
message: '#^Regex pattern is invalid\: Compilation failed\: UTF\-8 error\: byte 2 top bits not 0x80 at offset 0 in pattern$#' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
before this fix this error message had the invalid pattern appended, which made the parser crash while loading the baseline later on
(sorry for too many pushes. trial and error debugging in github actions is sometimes not avoidable) |
I feel like this can happen in any rule that will report something about a ConstantStringType and prints it with VerbosityLevel::value(). This needs a fix in the neon library directly, or when encoding/decoding the value. Maybe in ConstantStringType::describe(). Not sure. |
I just found nette/neon#72 in which there was a similar discussion with other control characters. |
closes phpstan/phpstan#12629
observations: