Browse Source

Merge branch 'master' into 3.0

# Conflicts:
#	.php-cs-fixer.dist.php
Dariusz Ruminski 3 years ago
parent
commit
9dee455e9e
2 changed files with 2 additions and 51 deletions
  1. 2 49
      .php-cs-fixer.dist.php
  2. 0 2
      .php_cs.dist

+ 2 - 49
.php-cs-fixer.dist.php

@@ -10,53 +10,6 @@
  * with this source code in the file LICENSE.
  */
 
-$header = <<<'EOF'
-This file is part of PHP CS Fixer.
+// @TODO 3.x: make this file the only distributed config file and remove `.php_cs.dist` file.
 
-(c) Fabien Potencier <fabien@symfony.com>
-    Dariusz Rumiński <dariusz.ruminski@gmail.com>
-
-This source file is subject to the MIT license that is bundled
-with this source code in the file LICENSE.
-EOF;
-
-$finder = PhpCsFixer\Finder::create()
-    ->exclude('tests/Fixtures')
-    ->in(__DIR__)
-    ->append([
-        __DIR__.'/dev-tools/doc.php',
-        // __DIR__.'/php-cs-fixer', disabled, as we want to be able to run bootstrap file even on lower PHP version, to show nice message
-    ])
-;
-
-$config = new PhpCsFixer\Config();
-$config
-    ->setRiskyAllowed(true)
-    ->setRules([
-        '@PHP71Migration:risky' => true,
-        '@PHPUnit75Migration:risky' => true,
-        '@PhpCsFixer' => true,
-        '@PhpCsFixer:risky' => true,
-        'header_comment' => ['header' => $header],
-    ])
-    ->setFinder($finder)
-;
-
-// special handling of fabbot.io service if it's using too old PHP CS Fixer version
-if (false !== getenv('FABBOT_IO')) {
-    try {
-        PhpCsFixer\FixerFactory::create()
-            ->registerBuiltInFixers()
-            ->registerCustomFixers($config->getCustomFixers())
-            ->useRuleSet(new PhpCsFixer\RuleSet($config->getRules()))
-        ;
-    } catch (PhpCsFixer\ConfigurationException\InvalidConfigurationException $e) {
-        $config->setRules([]);
-    } catch (UnexpectedValueException $e) {
-        $config->setRules([]);
-    } catch (InvalidArgumentException $e) {
-        $config->setRules([]);
-    }
-}
-
-return $config;
+return require '.php_cs.dist';

+ 0 - 2
.php_cs.dist

@@ -10,8 +10,6 @@
  * with this source code in the file LICENSE.
  */
 
-// HARD copy of .php-cs-fixer.dist.php file for fabbot.io compatibility for PHP CS Fixer v2
-
 $header = <<<'EOF'
 This file is part of PHP CS Fixer.