php-cs-fixer-custom-fixers icon indicating copy to clipboard operation
php-cs-fixer-custom-fixers copied to clipboard

Add option for ignoring different types of quotes (fixes #916)

Open BlueM opened this issue 1 year ago • 1 comments

As described in https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues/916, a concatenation of single-quoted and double-quoted strings can be intentional to reduce quote escaping in the code.

This PR introduces a setting keep_concatenation_for_different_quotes which allows keeping such concatenations.

BlueM avatar May 17 '24 07:05 BlueM

Pull Request Test Coverage Report for Build 9124659909

Details

  • 9 of 9 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 9074337801: 0.0%
Covered Lines: 2580
Relevant Lines: 2580

đź’› - Coveralls

coveralls avatar May 17 '24 09:05 coveralls

@BlueM this option addition is a good idea, can you update PR?

kubawerlos avatar Jun 19 '24 21:06 kubawerlos

Pull Request Test Coverage Report for Build 10420238176

Details

  • 9 of 9 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 10237316266: 0.0%
Covered Lines: 2579
Relevant Lines: 2579

đź’› - Coveralls

coveralls avatar Aug 16 '24 13:08 coveralls

@kubawerlos: when I run composer verify with a fresh checkout of https://github.com/kubawerlos/php-cs-fixer-custom-fixers/’s main branch (i.e.: not a single change by me), I run into errors:

image

I get the same errors when I try to fix the cs issues in my PR, so it effectively prevents me from fixing whatever there is to fix. (What I found strange was that none of the files mentioned actually did contain trailing slashes. But I haven’t tried to investigate this, as I found/find the tooling not too intuitive.)

Another minor issue I ran into is: on the root level, there is a composer.json requiring ^7.4 || ^8.0, while in .dev-tools it’s ^8.3. Maybe you’re aware of this and maybe it’s intentional, but it’s confusing.

BlueM avatar Aug 16 '24 15:08 BlueM

I have no idea why those few lines are reported, they look totally random.

It is intentional that dev tools run only on the latest stable PHP version, they are not part of the library's distribution. The library itself works on PHP 7.4+ (as proved by tests).

kubawerlos avatar Aug 16 '24 18:08 kubawerlos

Thank you @BlueM, I will fix the issues and release the feature.

kubawerlos avatar Aug 16 '24 19:08 kubawerlos

@kubawerlos: cool, thanks. By the way, while taking at the code yesterday I spotted a typo in my PR: in NoSuperfluousConcatenationFixerTest.php, line 189: “concatendated”.

BlueM avatar Aug 17 '24 05:08 BlueM

@kubawerlos: cool, thanks. By the way, while taking at the code yesterday I spotted a typo in my PR: in NoSuperfluousConcatenationFixerTest.php, line 189: “concatendated”.

I've "spotted" it too, not in GitHub, but in PhpStorm.

kubawerlos avatar Aug 17 '24 05:08 kubawerlos