Skip to content
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

RegexArrayShapeMatcher - Support 'n' modifier #3271

Merged
merged 2 commits into from
Jul 27, 2024
Merged

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Jul 27, 2024

review commit by commit

@staabm
Copy link
Contributor Author

staabm commented Jul 27, 2024

@Seldaek with this PR we can now take regex pattern modifiers into account.
this should help with implementing phpstan/phpstan#11360

@staabm staabm marked this pull request as ready for review July 27, 2024 14:23
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

@ondrejmirtes ondrejmirtes merged commit bfef6da into phpstan:1.11.x Jul 27, 2024
446 of 455 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

Please next time instead of separate commits, send separate PRs.

@staabm staabm deleted the ref branch July 27, 2024 16:51
Copy link
Contributor

@Seldaek Seldaek left a comment

Choose a reason for hiding this comment

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

Looks good to me aside from some missing delimiter support

return null;
}

if ($delimiter === '{') {
Copy link
Contributor

Choose a reason for hiding this comment

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

() and [] are also valid reciprocal delimiters.
<> too but that's a shitty one to use really.. Still probably should support for completeness

https://www.php.net/manual/en/regexp.reference.delimiters.php

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.

4 participants