.php-cs-fixer.php-highest.php 790 B

123456789101112131415161718192021222324252627
  1. <?php
  2. /*
  3. * This file is part of PHP CS Fixer.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. * Dariusz Rumiński <dariusz.ruminski@gmail.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. if (PHP_VERSION_ID <= 80001 || PHP_VERSION_ID >= 80100) {
  12. fwrite(STDERR, "PHP CS Fixer's config for PHP-HIGHEST can be executed only on highest supported PHP version - 8.0.*.\n");
  13. fwrite(STDERR, "Running it on lower PHP version would prevent calling migration rules.\n");
  14. exit(1);
  15. }
  16. $config = require '.php-cs-fixer.dist.php';
  17. $config->setRules(array_merge($config->getRules(), [
  18. '@PHP80Migration' => true,
  19. '@PHP80Migration:risky' => true,
  20. 'heredoc_indentation' => false,
  21. ]));
  22. return $config;