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 placeholders detection with multiline strings #658

Merged
merged 1 commit into from
Jun 4, 2024

Conversation

b-viguier
Copy link
Contributor

Fix #657

In #651, I included the . to mach any character. Actually, it matches any character except newline 😅

Here are several workarounds from stackoverflow

I choose to replace . by (?s:.), because it locally changes the regex flag to also match newline character, without adding too much noise....

Added a test 🎁

@b-viguier b-viguier marked this pull request as ready for review June 4, 2024 10:30
@staabm
Copy link
Owner

staabm commented Jun 4, 2024

Thanks!

@mitelg could you confirm this works for you

@mitelg
Copy link
Contributor

mitelg commented Jun 4, 2024

can confirm ✔️

thanks for the fix @b-viguier 👍

@staabm staabm merged commit 9b3f8f2 into staabm:main Jun 4, 2024
31 checks passed
@staabm
Copy link
Owner

staabm commented Jun 4, 2024

fix released in https://github.com/staabm/phpstan-dba/releases/tag/0.2.81

thank you guys!

@b-viguier b-viguier deleted the fix-multiline branch June 4, 2024 13:38
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.

Issue with update to 0.2.80: Query expects 0 placeholder, but 1 value is given
3 participants