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

feat: @PhpCsFixer ruleset - normalize implicit backslahes in single quoted strings #7965

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Apr 22, 2024

as requested in #7786 (review)

@mvorisek mvorisek changed the title Normalize implicit backslahes in single quoted strings internally chore: Normalize implicit backslahes in single quoted strings internally Apr 22, 2024
@Wirone

This comment was marked as outdated.

@mvorisek

This comment was marked as outdated.

@mvorisek mvorisek force-pushed the phpcsfixer_fix_implicit_backslashes_consistently_internal_only branch from aebabe8 to 8fe7f1d Compare April 23, 2024 09:33
@mvorisek

This comment was marked as spam.

@Wirone

This comment was marked as outdated.

@mvorisek

This comment was marked as outdated.

@Wirone

This comment was marked as outdated.

@mvorisek mvorisek marked this pull request as draft April 29, 2024 13:43
@mvorisek mvorisek changed the title chore: Normalize implicit backslahes in single quoted strings internally feat: @PhpCsFixer ruleset - normalize implicit backslahes in single quoted strings Apr 29, 2024
@mvorisek mvorisek force-pushed the phpcsfixer_fix_implicit_backslashes_consistently_internal_only branch from 8fe7f1d to cd21ad8 Compare April 30, 2024 07:21
@mvorisek mvorisek marked this pull request as ready for review April 30, 2024 07:24
@mvorisek mvorisek force-pushed the phpcsfixer_fix_implicit_backslashes_consistently_internal_only branch from cd21ad8 to 02d96a9 Compare May 3, 2024 08:00
@mvorisek
Copy link
Contributor Author

mvorisek commented May 3, 2024

Can this PR be approved?

It is unambiguous that backslashes are commonly & significantly not quoted * and thus this the new config is the only one preferred.

* here before #7786, Symfony, Lavarel, ...

@keradus
Copy link
Member

keradus commented May 4, 2024

if you say this is Symfony best practice, add it to Sf ruleset and not Fixer's own one.
Just ensure Sf is happy to have it as part of ruleset.

@@ -119,7 +119,7 @@ public function getRules(): array
'single_line_comment_style' => true,
'single_line_empty_body' => true,
'single_line_throw' => false,
'string_implicit_backslashes' => ['single_quoted' => 'ignore'],
'string_implicit_backslashes' => true,
Copy link
Member

Choose a reason for hiding this comment

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

for changing any ruleset, remember to update ruleset integration test

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.

None yet

3 participants