Add option for ignoring different types of quotes (fixes #916)
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.
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 | |
|---|---|
| Change from base Build 9074337801: | 0.0% |
| Covered Lines: | 2580 |
| Relevant Lines: | 2580 |
đź’› - Coveralls
@BlueM this option addition is a good idea, can you update PR?
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 | |
|---|---|
| Change from base Build 10237316266: | 0.0% |
| Covered Lines: | 2579 |
| Relevant Lines: | 2579 |
đź’› - 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:
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.
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).
Thank you @BlueM, I will fix the issues and release the feature.
@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”.
@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.