Skip to content

RegexGroupParser: Ignore whitespaces on "x"-modified patterns #3291

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

Merged
merged 11 commits into from
Aug 5, 2024

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Aug 5, 2024

support "x" pattern modifier

refs phpstan/phpstan#11360

@@ -328,7 +328,7 @@ function (string $size): void {
function bug11277a(string $value): void
{
if (preg_match('/^\[(.+,?)*\]$/', $value, $matches)) {
assertType('array{0: string, 1?: non-falsy-string}', $matches);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these were too optimistic before (.+,?) can be 0

@staabm staabm marked this pull request as ready for review August 5, 2024 11:29
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit 2acc115 into phpstan:1.11.x Aug 5, 2024
453 of 462 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

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.

3 participants