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

Fix missing ltrim in regex parse #3495

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Sep 26, 2024

No description provided.

@staabm
Copy link
Contributor

staabm commented Sep 27, 2024

Needs cs fix

@mvorisek
Copy link
Contributor Author

what cs fix?

@staabm
Copy link
Contributor

staabm commented Sep 27, 2024

@mvorisek
Copy link
Contributor Author

tell me how, seems unrelated to me:
image

Copy link
Member

@ondrejmirtes ondrejmirtes left a comment

Choose a reason for hiding this comment

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

The test does no fail even if I revert changes from src/

@mvorisek
Copy link
Contributor Author

@ondrejmirtes as explained above, it cannot be currently tested

@ondrejmirtes
Copy link
Member

I don't get it what's the purpose of this PR then.

@mvorisek
Copy link
Contributor Author

@ondrejmirtes test added

@ondrejmirtes
Copy link
Member

Now we have a failing unit test but I still don't understand what kind of issue this PR fixes.

@mvorisek
Copy link
Contributor Author

mvorisek commented Sep 27, 2024

I understand that it does not currently fix a functional usecase, but it fixes internal hidden bug. It fixes a method behaviour that is needed for future implementations of regex shape narrowing as the initial delimiter needs to be properly removed per PCRE grammar.

@ondrejmirtes
Copy link
Member

Alright, I get it.

@ondrejmirtes ondrejmirtes merged commit 4168fe5 into phpstan:1.12.x Sep 27, 2024
481 of 499 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

@mvorisek mvorisek deleted the fix_missing_ltrim_regex branch September 27, 2024 11:06
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