Add PHP 8.1 to shims and build (#1365)
* Add PHP 8.1 to shims and build * Lock psr/container version * Lock psr version * Restrict symfony component versions * Downgrade event-dispatcher-contracts * Update more package versions * php-cs fixes * style fix * cs-fixer file fix * Exclude resources dir from cs fixer * Ignore cs fixer env check * Update league/csvsnyk-fix-6e5aec4ee03ba2ab23a9aaa58911c45a
parent
c45d52dffa
commit
a3f110c0c0
@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of PHP CS Fixer.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
|
||||
*
|
||||
* This source file is subject to the MIT license that is bundled
|
||||
* with this source code in the file LICENSE.
|
||||
*/
|
||||
|
||||
$header = <<<'EOF'
|
||||
This file is part of PHP CS Fixer.
|
||||
(c) Fabien Potencier <fabien@symfony.com>
|
||||
Dariusz Rumiński <dariusz.ruminski@gmail.com>
|
||||
This source file is subject to the MIT license that is bundled
|
||||
with this source code in the file LICENSE.
|
||||
EOF;
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->ignoreVCSIgnored(true)
|
||||
->exclude('tests/data')
|
||||
->exclude('storage')
|
||||
->exclude('resources')
|
||||
->in(__DIR__)
|
||||
->append([
|
||||
__DIR__.'/dev-tools/doc.php',
|
||||
// __DIR__.'/php-cs-fixer', disabled, as we want to be able to run bootstrap file even on lower PHP version, to show nice message
|
||||
__FILE__,
|
||||
])
|
||||
;
|
||||
|
||||
$config = new PhpCsFixer\Config();
|
||||
$config
|
||||
->setRiskyAllowed(true)
|
||||
->setRules([
|
||||
'@PSR2' => true,
|
||||
'strict_param' => true,
|
||||
'no_php4_constructor' => true,
|
||||
'no_extra_blank_lines' => true,
|
||||
'no_superfluous_elseif' => true,
|
||||
'single_line_comment_style' => false,
|
||||
'simple_to_complex_string_variable' => true,
|
||||
'array_syntax' => [
|
||||
'syntax' => 'short',
|
||||
],
|
||||
'binary_operator_spaces' => [
|
||||
'operators' => [
|
||||
'=>' => 'align_single_space_minimal'
|
||||
]
|
||||
],
|
||||
/*
|
||||
'blank_line_before_statement' => [
|
||||
'statements' => [
|
||||
'declare',
|
||||
'for',
|
||||
'return',
|
||||
'throw',
|
||||
'try',
|
||||
],
|
||||
],
|
||||
*/
|
||||
])
|
||||
->setFinder($finder);
|
||||
|
||||
return $config;
|
@ -1,37 +0,0 @@
|
||||
<?php
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->in('app')
|
||||
->in('config');
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setHideProgress(true)
|
||||
->setUsingCache(false)
|
||||
->setRiskyAllowed(true)
|
||||
->setRules([
|
||||
'@PSR2' => true,
|
||||
'strict_param' => true,
|
||||
'no_php4_constructor' => true,
|
||||
'no_extra_blank_lines' => true,
|
||||
'no_superfluous_elseif' => true,
|
||||
'single_line_comment_style' => false,
|
||||
'simple_to_complex_string_variable' => true,
|
||||
'array_syntax' => [
|
||||
'syntax' => 'short',
|
||||
],
|
||||
'binary_operator_spaces' => [
|
||||
'align_double_arrow' => true,
|
||||
],
|
||||
/*
|
||||
'blank_line_before_statement' => [
|
||||
'statements' => [
|
||||
'declare',
|
||||
'for',
|
||||
'return',
|
||||
'throw',
|
||||
'try',
|
||||
],
|
||||
],
|
||||
*/
|
||||
])
|
||||
->setFinder($finder);
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue