2026-05-02 02:15:06 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
$finder = (new PhpCsFixer\Finder())
|
2026-05-02 02:45:42 +02:00
|
|
|
->in([__DIR__ . '/src', __DIR__ . '/tests'])
|
|
|
|
|
// Maker templates use short-echo syntax and alternative-syntax control
|
|
|
|
|
// structures by design — cs-fixer's @Symfony rules would mangle them.
|
2026-05-02 16:03:41 +02:00
|
|
|
->notPath('Maker/templates')
|
|
|
|
|
// Maker-output snapshot baselines are the makers' exact output and
|
|
|
|
|
// must not be auto-rewritten; if they need updating, the maker
|
|
|
|
|
// template changes and the snapshot is regenerated explicitly.
|
|
|
|
|
// (notPath is relative to each `in()` dir, not the project root.)
|
|
|
|
|
->notPath('snapshot');
|
2026-05-02 02:15:06 +02:00
|
|
|
|
|
|
|
|
return (new PhpCsFixer\Config())
|
|
|
|
|
->setRiskyAllowed(true)
|
|
|
|
|
->setRules([
|
|
|
|
|
'@Symfony' => true,
|
|
|
|
|
'@Symfony:risky' => true,
|
|
|
|
|
'@PHP83Migration' => true,
|
|
|
|
|
'declare_strict_types' => true,
|
|
|
|
|
'native_function_invocation' => false,
|
|
|
|
|
'phpdoc_align' => false,
|
|
|
|
|
'binary_operator_spaces' => ['default' => 'align_single_space_minimal'],
|
|
|
|
|
])
|
|
|
|
|
->setFinder($finder);
|