[friendsofphp/php-cs-fixer][php-cs-fixer/shim] Exclude config/reference.php from php-cs-fixer finder#1518
Conversation
|
Thanks for the PR 😍 How to test these changes in your application
Diff between recipe versionsIn order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. friendsofphp/php-cs-fixer2.2 vs 2.16diff --git a/friendsofphp/php-cs-fixer/2.2/.php_cs.dist b/friendsofphp/php-cs-fixer/2.16/.php_cs.dist
index afe11185..2aa712cb 100644
--- a/friendsofphp/php-cs-fixer/2.2/.php_cs.dist
+++ b/friendsofphp/php-cs-fixer/2.16/.php_cs.dist
@@ -8,7 +8,6 @@ $finder = PhpCsFixer\Finder::create()
return PhpCsFixer\Config::create()
->setRules([
'@Symfony' => true,
- 'array_syntax' => ['syntax' => 'short'],
])
->setFinder($finder)
;2.16 vs 2.17diff --git a/friendsofphp/php-cs-fixer/2.16/.php_cs.dist b/friendsofphp/php-cs-fixer/2.17/.php_cs.dist
index 2aa712cb..3788194c 100644
--- a/friendsofphp/php-cs-fixer/2.16/.php_cs.dist
+++ b/friendsofphp/php-cs-fixer/2.17/.php_cs.dist
@@ -1,11 +1,11 @@
<?php
-$finder = PhpCsFixer\Finder::create()
+$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude('var')
;
-return PhpCsFixer\Config::create()
+return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
])2.17 vs 2.19diff --git a/friendsofphp/php-cs-fixer/2.17/.php_cs.dist b/friendsofphp/php-cs-fixer/2.19/.php-cs-fixer.dist.php
similarity index 70%
rename from friendsofphp/php-cs-fixer/2.17/.php_cs.dist
rename to friendsofphp/php-cs-fixer/2.19/.php-cs-fixer.dist.php
index 3788194c..e63611e6 100644
--- a/friendsofphp/php-cs-fixer/2.17/.php_cs.dist
+++ b/friendsofphp/php-cs-fixer/2.19/.php-cs-fixer.dist.php
@@ -10,4 +10,5 @@ return (new PhpCsFixer\Config())
'@Symfony' => true,
])
->setFinder($finder)
+ ->setCacheFile('.php-cs-fixer.cache') // forward compatibility with 3.x line
;
diff --git a/friendsofphp/php-cs-fixer/2.17/manifest.json b/friendsofphp/php-cs-fixer/2.19/manifest.json
index 56096a3a..b24240a7 100644
--- a/friendsofphp/php-cs-fixer/2.17/manifest.json
+++ b/friendsofphp/php-cs-fixer/2.19/manifest.json
@@ -1,10 +1,10 @@
{
"aliases": ["cs-fixer", "php-cs-fixer"],
"copy-from-recipe": {
- ".php_cs.dist": ".php_cs.dist"
+ ".php-cs-fixer.dist.php": ".php-cs-fixer.dist.php"
},
"gitignore": [
- "/.php_cs",
- "/.php_cs.cache"
+ "/.php-cs-fixer.php",
+ "/.php-cs-fixer.cache"
]
}2.19 vs 3.0diff --git a/friendsofphp/php-cs-fixer/2.19/.php-cs-fixer.dist.php b/friendsofphp/php-cs-fixer/3.0/.php-cs-fixer.dist.php
index e63611e6..3788194c 100644
--- a/friendsofphp/php-cs-fixer/2.19/.php-cs-fixer.dist.php
+++ b/friendsofphp/php-cs-fixer/3.0/.php-cs-fixer.dist.php
@@ -10,5 +10,4 @@ return (new PhpCsFixer\Config())
'@Symfony' => true,
])
->setFinder($finder)
- ->setCacheFile('.php-cs-fixer.cache') // forward compatibility with 3.x line
;3.0 vs 3.39diff --git a/friendsofphp/php-cs-fixer/3.0/.php-cs-fixer.dist.php b/friendsofphp/php-cs-fixer/3.39/.php-cs-fixer.dist.php
index 3788194c..1c883f00 100644
--- a/friendsofphp/php-cs-fixer/3.0/.php-cs-fixer.dist.php
+++ b/friendsofphp/php-cs-fixer/3.39/.php-cs-fixer.dist.php
@@ -3,6 +3,10 @@
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude('var')
+ ->notPath([
+ 'config/bundles.php',
+ 'config/reference.php',
+ ])
;
return (new PhpCsFixer\Config()) |
|
Would it make sens to also skip |
It doesn't cause problems so I wouldn't without reasons. |
Head branch was pushed to by a user without write access
cd8e36c to
c1b2937
Compare
|
There is a problem with |
See symfony/symfony#62629 (comment)
3.39 is the earliest version of PHP-CS-Fixer co-installable with Symfony 7.4, while Symfony version compatibility is not a concern with the shim package.