.php-cs-fixer.php-highest.php 972 B

12345678910111213141516171819202122232425262728293031
  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_03_00 || PHP_VERSION_ID >= 8_04_00) {
  13. fwrite(STDERR, "PHP CS Fixer's config for PHP-HIGHEST can be executed only on highest supported PHP version - 8.3.*.\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. '@PHP83Migration' => true,
  20. '@PHP82Migration:risky' => true,
  21. 'fully_qualified_strict_types' => ['import_symbols' => true],
  22. 'php_unit_attributes' => false, // as is not yet supported by PhpCsFixerInternal/configurable_fixer_template
  23. ]));
  24. return $config;