Skip to content

Commit

Permalink
minor #39 Uprade to slevomat/coding-standard ^7.0 (LucaGallinari)
Browse files Browse the repository at this point in the history
This PR was merged into the 4.0-dev branch.

Discussion
----------

I upgraded some fixers based on the [PHP-CS-Fixer Upgrade-v3 file](https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/3.0/UPGRADE-v3.md)

Slevomat doesn't seems to provide fixes for 6.x version so an upgrade to 7.x is necessary but sylius coding standard has it locked to 6.x. 

Commits
-------

daf0f27 Uprade to slevomat/coding-standard ^7.0
  • Loading branch information
pamil authored Jul 27, 2021
2 parents b8f9476 + daf0f27 commit 8c52560
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"php": "^7.3 || ^8.0",
"slevomat/coding-standard": "^6.3",
"slevomat/coding-standard": "^7.0",
"symplify/easy-coding-standard": "^8.0 || ^9.0"
},
"conflict": {
Expand Down
34 changes: 19 additions & 15 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
use PhpCsFixer\Fixer\ArrayNotation\NormalizeIndexBraceFixer;
use PhpCsFixer\Fixer\ArrayNotation\NoTrailingCommaInSinglelineArrayFixer;
use PhpCsFixer\Fixer\ArrayNotation\NoWhitespaceBeforeCommaInArrayFixer;
use PhpCsFixer\Fixer\ArrayNotation\TrailingCommaInMultilineArrayFixer;
use PhpCsFixer\Fixer\ArrayNotation\TrimArraySpacesFixer;
use PhpCsFixer\Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer;
use PhpCsFixer\Fixer\Basic\BracesFixer;
use PhpCsFixer\Fixer\Basic\EncodingFixer;
use PhpCsFixer\Fixer\Basic\NonPrintableCharacterFixer;
use PhpCsFixer\Fixer\Casing\LowercaseConstantsFixer;
use PhpCsFixer\Fixer\Casing\ConstantCaseFixer;
use PhpCsFixer\Fixer\Casing\LowercaseKeywordsFixer;
use PhpCsFixer\Fixer\Casing\LowercaseStaticReferenceFixer;
use PhpCsFixer\Fixer\Casing\MagicConstantCasingFixer;
Expand All @@ -29,7 +28,6 @@
use PhpCsFixer\Fixer\CastNotation\ShortScalarCastFixer;
use PhpCsFixer\Fixer\ClassNotation\ClassAttributesSeparationFixer;
use PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer;
use PhpCsFixer\Fixer\ClassNotation\MethodSeparationFixer;
use PhpCsFixer\Fixer\ClassNotation\NoBlankLinesAfterClassOpeningFixer;
use PhpCsFixer\Fixer\ClassNotation\NoNullPropertyInitializationFixer;
use PhpCsFixer\Fixer\ClassNotation\NoPhp4ConstructorFixer;
Expand All @@ -38,7 +36,6 @@
use PhpCsFixer\Fixer\ClassNotation\SelfAccessorFixer;
use PhpCsFixer\Fixer\ClassNotation\SingleClassElementPerStatementFixer;
use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer;
use PhpCsFixer\Fixer\Comment\HashToSlashCommentFixer;
use PhpCsFixer\Fixer\Comment\NoEmptyCommentFixer;
use PhpCsFixer\Fixer\Comment\NoTrailingWhitespaceInCommentFixer;
use PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer;
Expand All @@ -53,6 +50,7 @@
use PhpCsFixer\Fixer\ControlStructure\NoUselessElseFixer;
use PhpCsFixer\Fixer\ControlStructure\SwitchCaseSemicolonToColonFixer;
use PhpCsFixer\Fixer\ControlStructure\SwitchCaseSpaceFixer;
use PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer;
use PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer;
use PhpCsFixer\Fixer\FunctionNotation\FunctionTypehintSpaceFixer;
use PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer;
Expand All @@ -67,28 +65,29 @@
use PhpCsFixer\Fixer\LanguageConstruct\CombineConsecutiveUnsetsFixer;
use PhpCsFixer\Fixer\LanguageConstruct\DeclareEqualNormalizeFixer;
use PhpCsFixer\Fixer\LanguageConstruct\DirConstantFixer;
use PhpCsFixer\Fixer\LanguageConstruct\ErrorSuppressionFixer;
use PhpCsFixer\Fixer\LanguageConstruct\FunctionToConstantFixer;
use PhpCsFixer\Fixer\LanguageConstruct\IsNullFixer;
use PhpCsFixer\Fixer\LanguageConstruct\SilencedDeprecationErrorFixer;
use PhpCsFixer\Fixer\ListNotation\ListSyntaxFixer;
use PhpCsFixer\Fixer\NamespaceNotation\BlankLineAfterNamespaceFixer;
use PhpCsFixer\Fixer\NamespaceNotation\NoLeadingNamespaceWhitespaceFixer;
use PhpCsFixer\Fixer\NamespaceNotation\SingleBlankLineBeforeNamespaceFixer;
use PhpCsFixer\Fixer\Naming\NoHomoglyphNamesFixer;
use PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer;
use PhpCsFixer\Fixer\Operator\ConcatSpaceFixer;
use PhpCsFixer\Fixer\Operator\IncrementStyleFixer;
use PhpCsFixer\Fixer\Operator\NewWithBracesFixer;
use PhpCsFixer\Fixer\Operator\ObjectOperatorWithoutWhitespaceFixer;
use PhpCsFixer\Fixer\Operator\PreIncrementFixer;
use PhpCsFixer\Fixer\Operator\StandardizeNotEqualsFixer;
use PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer;
use PhpCsFixer\Fixer\Operator\TernaryToNullCoalescingFixer;
use PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer;
use PhpCsFixer\Fixer\Phpdoc\GeneralPhpdocTagRenameFixer;
use PhpCsFixer\Fixer\Phpdoc\NoBlankLinesAfterPhpdocFixer;
use PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer;
use PhpCsFixer\Fixer\Phpdoc\NoSuperfluousPhpdocTagsFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocIndentFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocInlineTagFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocInlineTagNormalizerFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocNoAccessFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocNoAliasTagFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocNoEmptyReturnFixer;
Expand All @@ -98,6 +97,7 @@
use PhpCsFixer\Fixer\Phpdoc\PhpdocScalarFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocSeparationFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocSingleLineVarSpacingFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocTagTypeFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocTrimFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocTypesFixer;
use PhpCsFixer\Fixer\Phpdoc\PhpdocTypesOrderFixer;
Expand Down Expand Up @@ -149,7 +149,8 @@

$services->set(NoWhitespaceBeforeCommaInArrayFixer::class);

$services->set(TrailingCommaInMultilineArrayFixer::class);
$services->set(TrailingCommaInMultilineFixer::class)
->call('configure', [['elements' => ['arrays']]]);

$services->set(TrimArraySpacesFixer::class);

Expand All @@ -162,7 +163,8 @@

$services->set(NonPrintableCharacterFixer::class);

$services->set(LowercaseConstantsFixer::class);
$services->set(ConstantCaseFixer::class)
->call('configure', [['case' => 'lower']]);

$services->set(LowercaseKeywordsFixer::class);

Expand All @@ -187,7 +189,8 @@
$services->set(ClassDefinitionFixer::class)
->call('configure', [['single_item_single_line' => true, 'multi_line_extends_each_single_line' => true]]);

$services->set(MethodSeparationFixer::class);
$services->set(ClassAttributesSeparationFixer::class)
->call('configure', [['elements' => ['method']]]);

$services->set(NoBlankLinesAfterClassOpeningFixer::class);

Expand All @@ -206,8 +209,6 @@
$services->set(VisibilityRequiredFixer::class)
->call('configure', [['elements' => ['const', 'property', 'method']]]);

$services->set(HashToSlashCommentFixer::class);

$services->set(NoEmptyCommentFixer::class);

$services->set(NoTrailingWhitespaceInCommentFixer::class);
Expand Down Expand Up @@ -269,7 +270,7 @@

$services->set(IsNullFixer::class);

$services->set(SilencedDeprecationErrorFixer::class);
$services->set(ErrorSuppressionFixer::class);

$services->set(ListSyntaxFixer::class)
->call('configure', [['syntax' => 'short']]);
Expand All @@ -291,7 +292,8 @@

$services->set(ObjectOperatorWithoutWhitespaceFixer::class);

$services->set(PreIncrementFixer::class);
$services->set(IncrementStyleFixer::class)
->call('configure', [['style' => 'pre']]);

$services->set(StandardizeNotEqualsFixer::class);

Expand All @@ -310,7 +312,9 @@

$services->set(PhpdocIndentFixer::class);

$services->set(PhpdocInlineTagFixer::class);
$services->set(GeneralPhpdocTagRenameFixer::class);
$services->set(PhpdocInlineTagNormalizerFixer::class);
$services->set(PhpdocTagTypeFixer::class);

$services->set(PhpdocNoAccessFixer::class);

Expand Down

0 comments on commit 8c52560

Please sign in to comment.