forked from PHP-CS-Fixer/PHP-CS-Fixer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.php-highest.php
38 lines (31 loc) · 1.18 KB
/
.php-cs-fixer.php-highest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiński <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
if (PHP_VERSION_ID < 8_03_00 || PHP_VERSION_ID >= 8_04_00) {
fwrite(STDERR, "PHP CS Fixer's config for PHP-HIGHEST can be executed only on highest supported PHP version - 8.3.*.\n");
fwrite(STDERR, "Running it on lower PHP version would prevent calling migration rules.\n");
exit(1);
}
$config = require __DIR__.'/.php-cs-fixer.dist.php';
$config->setRules(array_merge($config->getRules(), [
'@PHP83Migration' => true,
'@PHP82Migration:risky' => true,
'phpdoc_to_property_type' => [ // experimental
'types_map' => [
'TFixerInputConfig' => 'array',
'TFixerComputedConfig' => 'array',
'TFixer' => '\PhpCsFixer\AbstractFixer',
],
],
'fully_qualified_strict_types' => ['import_symbols' => true],
'php_unit_attributes' => false, // as is not yet supported by PhpCsFixerInternal/configurable_fixer_template
]));
return $config;