196086c513
* 3.4: [php_cs] disable fopen_flags [DI] fix error in dumped container [CS] Remove unused variables passed to closures [DI] fix dumping setters before their inlined instances [CS] Remove empty comment [CS] Enforces null type hint on last position in phpDocs [CS] Use combined assignment operators when possible Fix a typo in error messages Don't return early as this bypasses the auto exit feature [Console] Add missing null to input values allowed types [PHPUnitBridge] Fix microtime() format bumped Symfony version to 3.4.17 updated VERSION for 3.4.16 updated CHANGELOG for 3.4.16 bumped Symfony version to 2.8.47 update CONTRIBUTORS for 2.8.46 updated VERSION for 2.8.46 updated CHANGELOG for 2.8.46
54 lines
2.7 KiB
PHP
54 lines
2.7 KiB
PHP
<?php
|
|
|
|
if (!file_exists(__DIR__.'/src')) {
|
|
exit(0);
|
|
}
|
|
|
|
return PhpCsFixer\Config::create()
|
|
->setRules(array(
|
|
'@Symfony' => true,
|
|
'@Symfony:risky' => true,
|
|
'@PHPUnit48Migration:risky' => true,
|
|
'php_unit_no_expectation_annotation' => false, // part of `PHPUnitXYMigration:risky` ruleset, to be enabled when PHPUnit 4.x support will be dropped, as we don't want to rewrite exceptions handling twice
|
|
'array_syntax' => array('syntax' => 'long'),
|
|
'fopen_flags' => false,
|
|
'ordered_imports' => true,
|
|
'protected_to_private' => false,
|
|
// Part of @Symfony:risky in PHP-CS-Fixer 2.13.0. To be removed from the config file once upgrading
|
|
'native_function_invocation' => array('include' => array('@compiler_optimized'), 'scope' => 'namespaced'),
|
|
))
|
|
->setRiskyAllowed(true)
|
|
->setFinder(
|
|
PhpCsFixer\Finder::create()
|
|
->in(__DIR__.'/src')
|
|
->append(array(__FILE__))
|
|
->exclude(array(
|
|
// directories containing files with content that is autogenerated by `var_export`, which breaks CS in output code
|
|
'Symfony/Component/DependencyInjection/Tests/Fixtures',
|
|
'Symfony/Component/Routing/Tests/Fixtures/dumper',
|
|
// fixture templates
|
|
'Symfony/Component/Templating/Tests/Fixtures/templates',
|
|
'Symfony/Bundle/FrameworkBundle/Tests/Fixtures/TemplatePathsCache',
|
|
'Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom',
|
|
// generated fixtures
|
|
'Symfony/Component/VarDumper/Tests/Fixtures',
|
|
// resource templates
|
|
'Symfony/Bundle/FrameworkBundle/Resources/views/Form',
|
|
// explicit trigger_error tests
|
|
'Symfony/Bridge/PhpUnit/Tests/DeprecationErrorHandler/',
|
|
))
|
|
// Support for older PHPunit version
|
|
->notPath('Symfony/Bridge/PhpUnit/SymfonyTestsListener.php')
|
|
// file content autogenerated by `var_export`
|
|
->notPath('Symfony/Component/Translation/Tests/fixtures/resources.php')
|
|
// test template
|
|
->notPath('Symfony/Bundle/FrameworkBundle/Tests/Templating/Helper/Resources/Custom/_name_entry_label.html.php')
|
|
// explicit heredoc test
|
|
->notPath('Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Resources/views/translation.html.php')
|
|
// explicit trigger_error tests
|
|
->notPath('Symfony/Component/Debug/Tests/DebugClassLoaderTest.php')
|
|
// invalid annotations on purpose
|
|
->notPath('Symfony/Component/DependencyInjection/Tests/Fixtures/includes/autowiring_classes.php')
|
|
)
|
|
;
|