Skip to content

Commit 69e8b2f

Browse files
Sync php-cs-fixer config file with 7.2
1 parent 53a3024 commit 69e8b2f

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

.php-cs-fixer.dist.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@
2929
'@Symfony' => true,
3030
'@Symfony:risky' => true,
3131
'protected_to_private' => false,
32-
'native_constant_invocation' => ['strict' => false],
33-
'nullable_type_declaration_for_default_null_value' => true,
3432
'header_comment' => ['header' => $fileHeaderComment],
33+
// TODO: Remove once the "compiler_optimized" set includes "sprintf"
34+
'native_function_invocation' => ['include' => ['@compiler_optimized', 'sprintf'], 'scope' => 'namespaced', 'strict' => true],
35+
'nullable_type_declaration' => true,
36+
'nullable_type_declaration_for_default_null_value' => true,
3537
])
3638
->setRiskyAllowed(true)
3739
->setFinder(
@@ -40,29 +42,27 @@
4042
->append([__FILE__])
4143
->notPath('#/Fixtures/#')
4244
->exclude([
43-
// directories containing files with content that is autogenerated by `var_export`, which breaks CS in output code
44-
// fixture templates
45-
'Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom',
46-
// resource templates
47-
'Symfony/Bundle/FrameworkBundle/Resources/views/Form',
4845
// explicit trigger_error tests
4946
'Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/',
5047
'Symfony/Component/Intl/Resources/data/',
5148
])
49+
// explicit tests for ommited @param type, against `no_superfluous_phpdoc_tags`
50+
->notPath('Symfony/Component/PropertyInfo/Tests/Extractor/PhpDocExtractorTest.php')
51+
->notPath('Symfony/Component/PropertyInfo/Tests/Extractor/PhpStanExtractorTest.php')
5252
// Support for older PHPunit version
5353
->notPath('Symfony/Bridge/PhpUnit/SymfonyTestsListener.php')
5454
->notPath('#Symfony/Bridge/PhpUnit/.*Mock\.php#')
5555
->notPath('#Symfony/Bridge/PhpUnit/.*Legacy#')
5656
// file content autogenerated by `var_export`
5757
->notPath('Symfony/Component/Translation/Tests/fixtures/resources.php')
58-
// file content autogenerated by `VarExporter::export`
59-
->notPath('Symfony/Component/Serializer/Tests/Fixtures/serializer.class.metadata.php')
60-
// test template
61-
->notPath('Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php')
6258
// explicit trigger_error tests
6359
->notPath('Symfony/Component/ErrorHandler/Tests/DebugClassLoaderTest.php')
6460
// stop removing spaces on the end of the line in strings
6561
->notPath('Symfony/Component/Messenger/Tests/Command/FailedMessagesShowCommandTest.php')
62+
// svg
63+
->notPath('Symfony/Component/ErrorHandler/Resources/assets/images/symfony-ghost.svg.php')
64+
// HTML templates
65+
->notPath('#Symfony/.*\.html\.php#')
6666
)
6767
->setCacheFile('.php-cs-fixer.cache')
6868
;

0 commit comments

Comments
 (0)