.php-cs-fixer.php-highest.php 793 B

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