Browse Source

DX: make CI migration rules step ready for new 8.0 rules

Dariusz Ruminski 3 years ago
parent
commit
2246d7cea3
2 changed files with 4 additions and 3 deletions
  1. 1 1
      .github/workflows/ci.yml
  2. 3 2
      .php-cs-fixer.php-highest.php

+ 1 - 1
.github/workflows/ci.yml

@@ -109,7 +109,7 @@ jobs:
             composer update --optimize-autoloader --no-interaction --no-progress ${{ matrix.composer-flags }}
             composer info -D
 
-      - name: Execute migration rules
+      - name: Execute migration rules # we want to execute migration rules BEFORE we gonna run tests and self-fixing, so we know that our codebase is future-ready
         if: matrix.execute-migration-rules == 'yes'
         run: php php-cs-fixer fix --config .php-cs-fixer.php-highest.php -q
 

+ 3 - 2
.php-cs-fixer.php-highest.php

@@ -18,9 +18,10 @@ if (PHP_VERSION_ID <= 80001 || PHP_VERSION_ID >= 80100) {
 
 $config = require '.php-cs-fixer.dist.php';
 
-$config->setRules([
+$config->setRules(array_merge($config->getRules(), [
     '@PHP80Migration' => true,
     '@PHP80Migration:risky' => true,
-]);
+    'heredoc_indentation' => false,
+]));
 
 return $config;