From 0a07a36179dcf35f8b4d511bae077fef0ad39ac9 Mon Sep 17 00:00:00 2001 From: Ondrej Machulda Date: Thu, 23 Apr 2020 18:47:19 +0200 Subject: [PATCH 1/2] Temporarily disable buggy ArrayDeclarationSniff.ValueNoNewline fixer --- CHANGELOG.md | 1 + easy-coding-standard.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee9cb09..6b3a985 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ## Unreleased +- Temporarily disable `ArrayDeclarationSniff.ValueNoNewline` because of [bug](https://github.com/squizlabs/PHP_CodeSniffer/issues/2937) in PHP_CodeSniffer 3.5.5. ## 2.0.0 - 2019-03-02 - BC: change the way the standard is imported to your `easy-coding-standard.yaml` (change `%vendor_dir%` placeholder directly to name of the vendor directory like `vendor`). See example in [README](https://github.com/lmc-eu/php-coding-standard#usage). diff --git a/easy-coding-standard.yaml b/easy-coding-standard.yaml index ffa928c..93dd204 100644 --- a/easy-coding-standard.yaml +++ b/easy-coding-standard.yaml @@ -258,6 +258,8 @@ parameters: PHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays\ArrayDeclarationSniff.KeyNotAligned: ~ PHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays\ArrayDeclarationSniff.MultiLineNotAllowed: ~ PHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays\ArrayDeclarationSniff.SingleLineNotAllowed: ~ + # Temporarily disable ValueNoNewline because of bug in PHP_CodeSniffer 3.5.5 https://github.com/squizlabs/PHP_CodeSniffer/issues/2937 + PHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays\ArrayDeclarationSniff.ValueNoNewline: ~ PHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays\ArrayDeclarationSniff.ValueNotAligned: ~ # There could be more than one space after star (eg. in Doctrine annotations) From 3806f92af8cd94a98c6d93cc3928422dddb10df5 Mon Sep 17 00:00:00 2001 From: Ondrej Machulda Date: Thu, 23 Apr 2020 18:58:23 +0200 Subject: [PATCH 2/2] Remove no longer needed phpstan error ignore --- composer.json | 3 ++- phpstan.neon | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 1b64c1b..a2fe2b2 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,8 @@ ], "require": { "php": "^7.2", - "symplify/easy-coding-standard": "^7.2.0" + "symplify/easy-coding-standard": "^7.2.0", + "friendsofphp/php-cs-fixer": "^2.16.3" }, "require-dev": { "j13k/yaml-lint": "dev-master", diff --git a/phpstan.neon b/phpstan.neon index b80c721..34aff1f 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -4,8 +4,6 @@ parameters: - src/ - tests/ ignoreErrors: - - message: '#Parameter \#2 \$items of method PhpCsFixer\\Tokenizer\\Tokens::insertAt\(\) expects#' - path: %currentWorkingDirectory%/src/Fixer/SpecifyArgSeparatorFixer.php - message: '#Parameter \#(2|3) \$(argumentStart|argumentEnd) of method PhpCsFixer\\Tokenizer\\Analyzer\\ArgumentsAnalyzer::getArgumentInfo\(\) expects int#' path: %currentWorkingDirectory%/src/Fixer/SpecifyArgSeparatorFixer.php - message: '#Parameter \#1 \$code of static method PhpCsFixer\\Tokenizer\\Tokens::fromCode\(\) expects string, string\|false given#'