From 400f5bd86f5e893c2b51572ae3ffd79e6049106e Mon Sep 17 00:00:00 2001 From: Kamil Kokot Date: Wed, 27 Sep 2017 17:02:41 +0200 Subject: [PATCH] Use sylius-labs/coding-standard --- composer.json | 3 +- composer.lock | 117 +++++++++++++++++++----------- easy-coding-standard.neon | 147 +------------------------------------- 3 files changed, 80 insertions(+), 187 deletions(-) diff --git a/composer.json b/composer.json index aa3bb09734a..55103a5b433 100644 --- a/composer.json +++ b/composer.json @@ -91,7 +91,8 @@ "phpunit/phpunit": "^5.6", "se/selenium-server-standalone": "^2.52", "stripe/stripe-php": "^4.1", - "symplify/easy-coding-standard": "^2.3" + "symplify/easy-coding-standard": "^2.4", + "sylius-labs/coding-standard": "^1.0" }, "replace": { "sylius/addressing": "self.version", diff --git a/composer.lock b/composer.lock index 8dae0e3eef2..a869a7503f7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "4402d316f0cb750ec71c9fd1fdce3b8c", + "content-hash": "1400d7db89bfab9c0c4b100ba3880a3b", "packages": [ { "name": "behat/transliterator", @@ -5136,16 +5136,16 @@ }, { "name": "symfony/polyfill-php70", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php70.git", - "reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874" + "reference": "b6482e68974486984f59449ecea1fbbb22ff840f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/032fd647d5c11a9ceab8ee8747e13b5448e93874", - "reference": "032fd647d5c11a9ceab8ee8747e13b5448e93874", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/b6482e68974486984f59449ecea1fbbb22ff840f", + "reference": "b6482e68974486984f59449ecea1fbbb22ff840f", "shasum": "" }, "require": { @@ -5155,7 +5155,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -5191,7 +5191,7 @@ "portable", "shim" ], - "time": "2017-06-09T14:24:12+00:00" + "time": "2017-06-14T15:44:48+00:00" }, { "name": "symfony/polyfill-util", @@ -9938,16 +9938,16 @@ }, { "name": "slevomat/coding-standard", - "version": "3.3.0", + "version": "4.0.0", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "84c2f64f0ef800d93711c7e0d1993d7a715ab0b7" + "reference": "bab653d0f7f2e3ed13796f7803067d252f00a25a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/84c2f64f0ef800d93711c7e0d1993d7a715ab0b7", - "reference": "84c2f64f0ef800d93711c7e0d1993d7a715ab0b7", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/bab653d0f7f2e3ed13796f7803067d252f00a25a", + "reference": "bab653d0f7f2e3ed13796f7803067d252f00a25a", "shasum": "" }, "require": { @@ -9960,7 +9960,7 @@ "phpstan/phpstan": "0.8.4", "phpunit/phpunit": "6.3.0" }, - "type": "library", + "type": "phpcodesniffer-standard", "autoload": { "psr-4": { "SlevomatCodingStandard\\": "SlevomatCodingStandard" @@ -9970,21 +9970,21 @@ "license": [ "MIT" ], - "description": "Slevomat Coding Standard for PHP_CodeSniffer extends Consistence Coding Standard by providing sniffs with additional checks.", - "time": "2017-08-25T15:10:17+00:00" + "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", + "time": "2017-09-15T17:47:36+00:00" }, { "name": "squizlabs/php_codesniffer", - "version": "3.0.2", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "c7594a88ae75401e8f8d0bd4deb8431b39045c51" + "reference": "3c2d0a0fe39684ba0c1eb842a6a775d0b938d699" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/c7594a88ae75401e8f8d0bd4deb8431b39045c51", - "reference": "c7594a88ae75401e8f8d0bd4deb8431b39045c51", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/3c2d0a0fe39684ba0c1eb842a6a775d0b938d699", + "reference": "3c2d0a0fe39684ba0c1eb842a6a775d0b938d699", "shasum": "" }, "require": { @@ -9994,7 +9994,7 @@ "php": ">=5.4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0" }, "bin": [ "bin/phpcs", @@ -10022,7 +10022,7 @@ "phpcs", "standards" ], - "time": "2017-07-18T01:12:32+00:00" + "time": "2017-09-19T22:47:14+00:00" }, { "name": "stripe/stripe-php", @@ -10079,6 +10079,39 @@ ], "time": "2017-06-20T01:39:06+00:00" }, + { + "name": "sylius-labs/coding-standard", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/SyliusLabs/CodingStandard.git", + "reference": "e50212b2be8f1e5984c69b9bdf205b32daa06688" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/SyliusLabs/CodingStandard/zipball/e50212b2be8f1e5984c69b9bdf205b32daa06688", + "reference": "e50212b2be8f1e5984c69b9bdf205b32daa06688", + "shasum": "" + }, + "require": { + "php": "^7.1", + "symplify/easy-coding-standard": "^2.4" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kamil Kokot", + "email": "kamil@kokot.me", + "homepage": "http://kamil.kokot.me" + } + ], + "description": "Battle-tested coding standard configuration used in Sylius.", + "time": "2017-09-27T14:33:43+00:00" + }, { "name": "symfony/polyfill-php72", "version": "v1.5.0", @@ -10136,26 +10169,26 @@ }, { "name": "symplify/coding-standard", - "version": "v2.3.3", + "version": "v2.4.2", "source": { "type": "git", "url": "https://github.com/Symplify/CodingStandard.git", - "reference": "36b88e5560b104be754205a0f4d5fc4b6c436b51" + "reference": "6608353eb4bb382e7ca6da04c67996c4f379536e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Symplify/CodingStandard/zipball/36b88e5560b104be754205a0f4d5fc4b6c436b51", - "reference": "36b88e5560b104be754205a0f4d5fc4b6c436b51", + "url": "https://api.github.com/repos/Symplify/CodingStandard/zipball/6608353eb4bb382e7ca6da04c67996c4f379536e", + "reference": "6608353eb4bb382e7ca6da04c67996c4f379536e", "shasum": "" }, "require": { - "friendsofphp/php-cs-fixer": "^2.5", + "friendsofphp/php-cs-fixer": "^2.6", "nette/finder": "^2.4|^3.0", "nette/utils": "^2.4|^3.0", "nikic/php-parser": "^3.1", "php": "^7.1", - "slevomat/coding-standard": "^3.3", - "squizlabs/php_codesniffer": "^3.0.2" + "slevomat/coding-standard": "^4.0", + "squizlabs/php_codesniffer": "^3.1" }, "require-dev": { "gecko-packages/gecko-php-unit": "3.0 as 2.2", @@ -10168,7 +10201,7 @@ "autoload": { "psr-4": { "Symplify\\CodingStandard\\": "src", - "Symplify\\CodingStandard\\TokenWrapper\\": "packages/TokenWrapper/src", + "Symplify\\CodingStandard\\SniffTokenWrapper\\": "packages/SniffTokenWrapper/src", "Symplify\\CodingStandard\\FixerTokenWrapper\\": "packages/FixerTokenWrapper/src" } }, @@ -10177,32 +10210,32 @@ "MIT" ], "description": "Set of Symplify rules for PHP_CodeSniffer.", - "time": "2017-09-09T15:11:00+00:00" + "time": "2017-09-22T22:21:36+00:00" }, { "name": "symplify/easy-coding-standard", - "version": "v2.3.3", + "version": "v2.4.2", "source": { "type": "git", "url": "https://github.com/Symplify/EasyCodingStandard.git", - "reference": "96b728041544edb6f3dd07dee3b58e26a64187db" + "reference": "becc9bdfd07493ac53122088eaf859d56d41dae1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Symplify/EasyCodingStandard/zipball/96b728041544edb6f3dd07dee3b58e26a64187db", - "reference": "96b728041544edb6f3dd07dee3b58e26a64187db", + "url": "https://api.github.com/repos/Symplify/EasyCodingStandard/zipball/becc9bdfd07493ac53122088eaf859d56d41dae1", + "reference": "becc9bdfd07493ac53122088eaf859d56d41dae1", "shasum": "" }, "require": { - "friendsofphp/php-cs-fixer": "^2.5", + "friendsofphp/php-cs-fixer": "^2.6", "nette/caching": "^2.4|^3.0", "nette/neon": "^2.4|^3.0", "nette/robot-loader": "^2.4|^3.0.1", "nette/utils": "^2.4|^3.0", "php": "^7.1", "sebastian/diff": "^1.4|^2.0", - "slevomat/coding-standard": "^3.3", - "squizlabs/php_codesniffer": "^3.0.2", + "slevomat/coding-standard": "^4.0", + "squizlabs/php_codesniffer": "^3.1", "symfony/config": "^3.3", "symfony/console": "^3.3", "symfony/dependency-injection": "^3.3", @@ -10238,20 +10271,20 @@ "MIT" ], "description": "Use Coding Standard with 0-knowledge of PHP-CS-Fixer and PHP_CodeSniffer.", - "time": "2017-09-08T22:40:59+00:00" + "time": "2017-09-21T15:34:11+00:00" }, { "name": "symplify/package-builder", - "version": "v2.3.3", + "version": "v2.4.2", "source": { "type": "git", "url": "https://github.com/Symplify/PackageBuilder.git", - "reference": "f66602b4bdba3031b7670d418f63638259e19f13" + "reference": "5a9755f7a4aac6880a3f34e09237e48b6bac8c7d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Symplify/PackageBuilder/zipball/f66602b4bdba3031b7670d418f63638259e19f13", - "reference": "f66602b4bdba3031b7670d418f63638259e19f13", + "url": "https://api.github.com/repos/Symplify/PackageBuilder/zipball/5a9755f7a4aac6880a3f34e09237e48b6bac8c7d", + "reference": "5a9755f7a4aac6880a3f34e09237e48b6bac8c7d", "shasum": "" }, "require": { @@ -10280,7 +10313,7 @@ "license": [ "MIT" ], - "time": "2017-08-28T11:44:47+00:00" + "time": "2017-09-19T17:58:21+00:00" }, { "name": "tracy/tracy", diff --git a/easy-coding-standard.neon b/easy-coding-standard.neon index a8156a4eb26..9eb4342ff3b 100644 --- a/easy-coding-standard.neon +++ b/easy-coding-standard.neon @@ -1,44 +1,7 @@ +includes: + - vendor/sylius-labs/coding-standard/easy-coding-standard.neon + checkers: - PhpCsFixer\Fixer\Alias\EregToPregFixer: {} - PhpCsFixer\Fixer\Alias\NoAliasFunctionsFixer: {} - PhpCsFixer\Fixer\Alias\PowToExponentiationFixer: {} - PhpCsFixer\Fixer\Alias\NoMixedEchoPrintFixer: - use: echo - PhpCsFixer\Fixer\ArrayNotation\ArraySyntaxFixer: - syntax: short - PhpCsFixer\Fixer\ArrayNotation\NoMultilineWhitespaceAroundDoubleArrowFixer: {} - PhpCsFixer\Fixer\ArrayNotation\NormalizeIndexBraceFixer: {} - PhpCsFixer\Fixer\ArrayNotation\NoTrailingCommaInSinglelineArrayFixer: {} - PhpCsFixer\Fixer\ArrayNotation\NoWhitespaceBeforeCommaInArrayFixer: {} - PhpCsFixer\Fixer\ArrayNotation\TrailingCommaInMultilineArrayFixer: {} - PhpCsFixer\Fixer\ArrayNotation\TrimArraySpacesFixer: {} - PhpCsFixer\Fixer\ArrayNotation\WhitespaceAfterCommaInArrayFixer: {} - PhpCsFixer\Fixer\Basic\BracesFixer: - allow_single_line_closure: true - PhpCsFixer\Fixer\Basic\EncodingFixer: {} - PhpCsFixer\Fixer\Basic\NonPrintableCharacterFixer: {} - PhpCsFixer\Fixer\Casing\LowercaseConstantsFixer: {} - PhpCsFixer\Fixer\Casing\LowercaseKeywordsFixer: {} - PhpCsFixer\Fixer\Casing\NativeFunctionCasingFixer: {} - PhpCsFixer\Fixer\Casing\MagicConstantCasingFixer: {} - PhpCsFixer\Fixer\CastNotation\CastSpacesFixer: {} - PhpCsFixer\Fixer\CastNotation\LowercaseCastFixer: {} - PhpCsFixer\Fixer\CastNotation\ModernizeTypesCastingFixer: {} - PhpCsFixer\Fixer\CastNotation\NoShortBoolCastFixer: {} - PhpCsFixer\Fixer\CastNotation\ShortScalarCastFixer: {} - PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer: - singleItemSingleLine: true - multiLineExtendsEachSingleLine: true - PhpCsFixer\Fixer\ClassNotation\MethodSeparationFixer: {} - PhpCsFixer\Fixer\ClassNotation\NoBlankLinesAfterClassOpeningFixer: {} - PhpCsFixer\Fixer\ClassNotation\NoNullPropertyInitializationFixer: {} - PhpCsFixer\Fixer\ClassNotation\NoPhp4ConstructorFixer: {} - PhpCsFixer\Fixer\ClassNotation\NoUnneededFinalMethodFixer: {} - PhpCsFixer\Fixer\ClassNotation\ProtectedToPrivateFixer: {} - PhpCsFixer\Fixer\ClassNotation\SelfAccessorFixer: {} - PhpCsFixer\Fixer\ClassNotation\SingleClassElementPerStatementFixer: {} - PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer: {} - PhpCsFixer\Fixer\Comment\HashToSlashCommentFixer: {} PhpCsFixer\Fixer\Comment\HeaderCommentFixer: header: """ @@ -50,107 +13,3 @@ checkers: file that was distributed with this source code. """ location: after_open - PhpCsFixer\Fixer\Comment\NoEmptyCommentFixer: {} - PhpCsFixer\Fixer\Comment\NoTrailingWhitespaceInCommentFixer: {} - PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer: - comment_types: ['hash'] - PhpCsFixer\Fixer\ControlStructure\ElseifFixer: {} - PhpCsFixer\Fixer\ControlStructure\IncludeFixer: {} - PhpCsFixer\Fixer\ControlStructure\NoBreakCommentFixer: {} - PhpCsFixer\Fixer\ControlStructure\NoSuperfluousElseifFixer: {} - PhpCsFixer\Fixer\ControlStructure\NoTrailingCommaInListCallFixer: {} - PhpCsFixer\Fixer\ControlStructure\NoUnneededControlParenthesesFixer: {} - PhpCsFixer\Fixer\ControlStructure\NoUnneededCurlyBracesFixer: {} - PhpCsFixer\Fixer\ControlStructure\NoUselessElseFixer: {} - PhpCsFixer\Fixer\ControlStructure\SwitchCaseSemicolonToColonFixer: {} - PhpCsFixer\Fixer\ControlStructure\SwitchCaseSpaceFixer: {} - PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer: {} - PhpCsFixer\Fixer\FunctionNotation\FunctionTypehintSpaceFixer: {} - PhpCsFixer\Fixer\FunctionNotation\MethodArgumentSpaceFixer: {} - PhpCsFixer\Fixer\FunctionNotation\NoSpacesAfterFunctionNameFixer: {} - PhpCsFixer\Fixer\FunctionNotation\ReturnTypeDeclarationFixer: {} - PhpCsFixer\Fixer\Import\NoLeadingImportSlashFixer: {} - PhpCsFixer\Fixer\Import\NoUnusedImportsFixer: {} - PhpCsFixer\Fixer\Import\OrderedImportsFixer: {} - PhpCsFixer\Fixer\Import\SingleImportPerStatementFixer: {} - PhpCsFixer\Fixer\Import\SingleLineAfterImportsFixer: {} - PhpCsFixer\Fixer\LanguageConstruct\CombineConsecutiveIssetsFixer: {} - PhpCsFixer\Fixer\LanguageConstruct\CombineConsecutiveUnsetsFixer: {} - PhpCsFixer\Fixer\LanguageConstruct\DeclareEqualNormalizeFixer: {} - PhpCsFixer\Fixer\LanguageConstruct\DirConstantFixer: {} - PhpCsFixer\Fixer\LanguageConstruct\FunctionToConstantFixer: {} - PhpCsFixer\Fixer\LanguageConstruct\IsNullFixer: {} - PhpCsFixer\Fixer\LanguageConstruct\SilencedDeprecationErrorFixer: {} - PhpCsFixer\Fixer\ListNotation\ListSyntaxFixer: - syntax: short - PhpCsFixer\Fixer\NamespaceNotation\BlankLineAfterNamespaceFixer: {} - PhpCsFixer\Fixer\NamespaceNotation\NoLeadingNamespaceWhitespaceFixer: {} - PhpCsFixer\Fixer\NamespaceNotation\SingleBlankLineBeforeNamespaceFixer: {} - PhpCsFixer\Fixer\Naming\NoHomoglyphNamesFixer: {} - PhpCsFixer\Fixer\Operator\BinaryOperatorSpacesFixer: - align_double_arrow: false - align_equals: false - PhpCsFixer\Fixer\Operator\ConcatSpaceFixer: - spacing: one - PhpCsFixer\Fixer\Operator\NewWithBracesFixer: {} - PhpCsFixer\Fixer\Operator\ObjectOperatorWithoutWhitespaceFixer: {} - PhpCsFixer\Fixer\Operator\PreIncrementFixer: {} - PhpCsFixer\Fixer\Operator\StandardizeNotEqualsFixer: {} - PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer: {} - PhpCsFixer\Fixer\Operator\TernaryToNullCoalescingFixer: {} - PhpCsFixer\Fixer\Operator\UnaryOperatorSpacesFixer: {} - PhpCsFixer\Fixer\Phpdoc\NoBlankLinesAfterPhpdocFixer: {} - PhpCsFixer\Fixer\Phpdoc\NoEmptyPhpdocFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocIndentFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocInlineTagFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocNoAccessFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocNoAliasTagFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocNoEmptyReturnFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocNoPackageFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocNoUselessInheritdocFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocReturnSelfReferenceFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocScalarFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocSeparationFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocSingleLineVarSpacingFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocTrimFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocTypesFixer: {} - PhpCsFixer\Fixer\Phpdoc\PhpdocTypesOrderFixer: - null_adjustment: always_last - sort_algorithm: none - PhpCsFixer\Fixer\Phpdoc\PhpdocVarWithoutNameFixer: {} - PhpCsFixer\Fixer\PhpTag\BlankLineAfterOpeningTagFixer: {} - PhpCsFixer\Fixer\PhpTag\FullOpeningTagFixer: {} - PhpCsFixer\Fixer\PhpTag\NoClosingTagFixer: {} - PhpCsFixer\Fixer\PhpUnit\PhpUnitDedicateAssertFixer: {} - PhpCsFixer\Fixer\PhpUnit\PhpUnitFqcnAnnotationFixer: {} - PhpCsFixer\Fixer\Semicolon\NoEmptyStatementFixer: {} - PhpCsFixer\Fixer\Semicolon\NoSinglelineWhitespaceBeforeSemicolonsFixer: {} - PhpCsFixer\Fixer\Semicolon\SpaceAfterSemicolonFixer: {} - PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer: {} - PhpCsFixer\Fixer\StringNotation\SingleQuoteFixer: {} - PhpCsFixer\Fixer\Whitespace\BlankLineBeforeStatementFixer: {} - PhpCsFixer\Fixer\Whitespace\IndentationTypeFixer: {} - PhpCsFixer\Fixer\Whitespace\LineEndingFixer: {} - PhpCsFixer\Fixer\Whitespace\NoExtraConsecutiveBlankLinesFixer: - - break - - case - - continue - - curly_brace_block - - default - - extra - - parenthesis_brace_block - - return - - square_brace_block - - switch - - throw - - use - PhpCsFixer\Fixer\Whitespace\NoSpacesAroundOffsetFixer: {} - PhpCsFixer\Fixer\Whitespace\NoSpacesInsideParenthesisFixer: {} - PhpCsFixer\Fixer\Whitespace\NoTrailingWhitespaceFixer: {} - PhpCsFixer\Fixer\Whitespace\NoWhitespaceInBlankLineFixer: {} - PhpCsFixer\Fixer\Whitespace\SingleBlankLineAtEofFixer: {} - -parameters: - skip: - PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer: - - *Spec.php