|
13 | 13 | exit(0);
|
14 | 14 | }
|
15 | 15 |
|
16 |
| -$fileHeaderComment = <<<'EOF' |
17 |
| -This file is part of the Symfony package. |
| 16 | +$fileHeaderParts = [ |
| 17 | + <<<'EOF' |
| 18 | + This file is part of the Symfony package. |
18 | 19 |
|
19 |
| -(c) Fabien Potencier <[email protected]> |
| 20 | + (c) Fabien Potencier <[email protected]> |
20 | 21 |
|
21 |
| -For the full copyright and license information, please view the LICENSE |
22 |
| -file that was distributed with this source code. |
23 |
| -EOF; |
| 22 | + EOF, |
| 23 | + <<<'EOF' |
| 24 | +
|
| 25 | + For the full copyright and license information, please view the LICENSE |
| 26 | + file that was distributed with this source code. |
| 27 | + EOF, |
| 28 | +]; |
24 | 29 |
|
25 | 30 | return (new PhpCsFixer\Config())
|
26 | 31 | ->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
|
27 | 32 | ->setRules([
|
| 33 | + '@PHP71Migration' => true, |
28 | 34 | '@PHPUnit75Migration:risky' => true,
|
29 | 35 | '@Symfony' => true,
|
30 | 36 | '@Symfony:risky' => true,
|
31 |
| - 'header_comment' => ['header' => $fileHeaderComment], |
32 |
| - 'trailing_comma_in_multiline' => ['elements' => ['arrays', 'match', 'parameters']], |
| 37 | + 'protected_to_private' => false, |
| 38 | + 'header_comment' => [ |
| 39 | + 'header' => implode('', $fileHeaderParts), |
| 40 | + 'validator' => implode('', [ |
| 41 | + '/', |
| 42 | + preg_quote($fileHeaderParts[0], '/'), |
| 43 | + '(?P<EXTRA>.*)??', |
| 44 | + preg_quote($fileHeaderParts[1], '/'), |
| 45 | + '/s', |
| 46 | + ]), |
| 47 | + ], |
| 48 | + // It breaks `Symfony\UX\LiveComponent\Tests\Integration\LiveComponentHydratorTest` when modifying the PHPDoc of `#[LiveProp]` from anonymous class properties |
| 49 | + 'fully_qualified_strict_types' => false, |
33 | 50 | ])
|
34 | 51 | ->setRiskyAllowed(true)
|
35 | 52 | ->setFinder(
|
|
0 commit comments