From 37d6841ace4a6058c58c6e97f42c810ef7d8464a Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Thu, 19 May 2022 10:09:18 +0100 Subject: [PATCH] Issue #3262874 by Spokje, longwave, ankithashetty, catch, andypost: Update Coder to 8.3.15 --- composer.json | 4 +- composer.lock | 198 +++++++++++++++++- .../PinnedDevDependencies/composer.json | 5 +- core/scripts/dev/commit-code-check.sh | 4 +- 4 files changed, 198 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 53024abe014..e9c3c231ebf 100644 --- a/composer.json +++ b/composer.json @@ -108,8 +108,8 @@ "post-update-cmd": [ "Drupal\\Composer\\Composer::generateMetapackages" ], - "phpcs": "phpcs --standard=core/phpcs.xml.dist --runtime-set installed_paths $($COMPOSER_BINARY config vendor-dir)/drupal/coder/coder_sniffer --", - "phpcbf": "phpcbf --standard=core/phpcs.xml.dist --runtime-set installed_paths $($COMPOSER_BINARY config vendor-dir)/drupal/coder/coder_sniffer --" + "phpcs": "phpcs --standard=core/phpcs.xml.dist --", + "phpcbf": "phpcbf --standard=core/phpcs.xml.dist --" }, "repositories": [ { diff --git a/composer.lock b/composer.lock index 1e13370b66b..5a6d112da1e 100644 --- a/composer.lock +++ b/composer.lock @@ -5157,6 +5157,81 @@ ], "time": "2022-02-25T21:32:43+00:00" }, + { + "name": "dealerdirect/phpcodesniffer-composer-installer", + "version": "v0.7.2", + "source": { + "type": "git", + "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0 || ^2.0", + "php": ">=5.3", + "squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0" + }, + "require-dev": { + "composer/composer": "*", + "php-parallel-lint/php-parallel-lint": "^1.3.1", + "phpcompatibility/php-compatibility": "^9.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" + }, + "autoload": { + "psr-4": { + "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Franck Nijhof", + "email": "franck.nijhof@dealerdirect.com", + "homepage": "http://www.frenck.nl", + "role": "Developer / IT Manager" + }, + { + "name": "Contributors", + "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors" + } + ], + "description": "PHP_CodeSniffer Standards Composer Installer Plugin", + "homepage": "http://www.dealerdirect.com", + "keywords": [ + "PHPCodeSniffer", + "PHP_CodeSniffer", + "code quality", + "codesniffer", + "composer", + "installer", + "phpcbf", + "phpcs", + "plugin", + "qa", + "quality", + "standard", + "standards", + "style guide", + "stylecheck", + "tests" + ], + "support": { + "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues", + "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer" + }, + "time": "2022-02-04T12:51:07+00:00" + }, { "name": "doctrine/instantiator", "version": "1.4.1", @@ -5229,22 +5304,24 @@ }, { "name": "drupal/coder", - "version": "8.3.13", + "version": "8.3.15", "source": { "type": "git", "url": "https://git.drupalcode.org/project/coder.git", - "reference": "d3286d571b19633cc296d438c36b9aed195de43c" + "reference": "0cfad3a21f1168bdc3030ae73351c31f88abba74" }, "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", "ext-mbstring": "*", - "php": ">=7.0.8", + "php": ">=7.1", "sirbrillig/phpcs-variable-analysis": "^2.10", - "squizlabs/php_codesniffer": "^3.5.6", + "slevomat/coding-standard": "^7.0", + "squizlabs/php_codesniffer": "^3.6.0", "symfony/yaml": ">=2.0.5" }, "require-dev": { - "phpstan/phpstan": "^0.12.63", - "phpunit/phpunit": "^6.0 || ^7.0" + "phpstan/phpstan": "^1.4.9", + "phpunit/phpunit": "^7.0 || ^8.0" }, "type": "phpcodesniffer-standard", "autoload": { @@ -5268,7 +5345,7 @@ "issues": "https://www.drupal.org/project/issues/coder", "source": "https://www.drupal.org/project/coder" }, - "time": "2021-02-06T10:44:32+00:00" + "time": "2022-04-02T17:56:30+00:00" }, { "name": "easyrdf/easyrdf", @@ -5988,6 +6065,50 @@ }, "time": "2021-12-08T12:19:24+00:00" }, + { + "name": "phpstan/phpdoc-parser", + "version": "1.5.1", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpdoc-parser.git", + "reference": "981cc368a216c988e862a75e526b6076987d1b50" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/981cc368a216c988e862a75e526b6076987d1b50", + "reference": "981cc368a216c988e862a75e526b6076987d1b50", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-strict-rules": "^1.0", + "phpunit/phpunit": "^9.5", + "symfony/process": "^5.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPStan\\PhpDocParser\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPDoc parser with support for nullable, intersection and generic types", + "support": { + "issues": "https://github.com/phpstan/phpdoc-parser/issues", + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.5.1" + }, + "time": "2022-05-05T11:32:40+00:00" + }, { "name": "phpunit/php-code-coverage", "version": "7.0.15", @@ -7352,6 +7473,67 @@ }, "time": "2022-02-21T17:01:13+00:00" }, + { + "name": "slevomat/coding-standard", + "version": "7.2.0", + "source": { + "type": "git", + "url": "https://github.com/slevomat/coding-standard.git", + "reference": "b4f96a8beea515d2d89141b7b9ad72f526d84071" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/b4f96a8beea515d2d89141b7b9ad72f526d84071", + "reference": "b4f96a8beea515d2d89141b7b9ad72f526d84071", + "shasum": "" + }, + "require": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7", + "php": "^7.2 || ^8.0", + "phpstan/phpdoc-parser": "^1.5.1", + "squizlabs/php_codesniffer": "^3.6.2" + }, + "require-dev": { + "phing/phing": "2.17.3", + "php-parallel-lint/php-parallel-lint": "1.3.2", + "phpstan/phpstan": "1.4.10|1.6.7", + "phpstan/phpstan-deprecation-rules": "1.0.0", + "phpstan/phpstan-phpunit": "1.0.0|1.1.1", + "phpstan/phpstan-strict-rules": "1.2.3", + "phpunit/phpunit": "7.5.20|8.5.21|9.5.20" + }, + "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-master": "7.x-dev" + } + }, + "autoload": { + "psr-4": { + "SlevomatCodingStandard\\": "SlevomatCodingStandard" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.", + "support": { + "issues": "https://github.com/slevomat/coding-standard/issues", + "source": "https://github.com/slevomat/coding-standard/tree/7.2.0" + }, + "funding": [ + { + "url": "https://github.com/kukulich", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard", + "type": "tidelift" + } + ], + "time": "2022-05-06T10:58:42+00:00" + }, { "name": "squizlabs/php_codesniffer", "version": "3.6.2", @@ -8029,5 +8211,5 @@ "platform-overrides": { "php": "7.3.0" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } diff --git a/composer/Metapackage/PinnedDevDependencies/composer.json b/composer/Metapackage/PinnedDevDependencies/composer.json index a32b3e72ab0..bc13a86d9e2 100644 --- a/composer/Metapackage/PinnedDevDependencies/composer.json +++ b/composer/Metapackage/PinnedDevDependencies/composer.json @@ -16,8 +16,9 @@ "composer/pcre": "1.0.1", "composer/spdx-licenses": "1.5.6", "composer/xdebug-handler": "3.0.3", + "dealerdirect/phpcodesniffer-composer-installer": "v0.7.2", "doctrine/instantiator": "1.4.1", - "drupal/coder": "8.3.13", + "drupal/coder": "8.3.15", "easyrdf/easyrdf": "1.1.1", "friends-of-behat/mink-browserkit-driver": "v1.5.0", "instaclick/php-webdriver": "1.4.14", @@ -30,6 +31,7 @@ "phpdocumentor/reflection-docblock": "5.3.0", "phpdocumentor/type-resolver": "1.6.1", "phpspec/prophecy": "v1.15.0", + "phpstan/phpdoc-parser": "1.5.1", "phpunit/php-code-coverage": "7.0.15", "phpunit/php-file-iterator": "2.0.5", "phpunit/php-text-template": "1.2.1", @@ -52,6 +54,7 @@ "seld/jsonlint": "1.9.0", "seld/phar-utils": "1.2.0", "sirbrillig/phpcs-variable-analysis": "v2.11.3", + "slevomat/coding-standard": "7.2.0", "squizlabs/php_codesniffer": "3.6.2", "symfony/browser-kit": "v4.4.37", "symfony/css-selector": "v4.4.37", diff --git a/core/scripts/dev/commit-code-check.sh b/core/scripts/dev/commit-code-check.sh index f34f3069f31..d1a2bb776c1 100755 --- a/core/scripts/dev/commit-code-check.sh +++ b/core/scripts/dev/commit-code-check.sh @@ -208,7 +208,7 @@ printf "\n" # When the file core/phpcs.xml.dist has been changed, then PHPCS must check all files. if [[ $PHPCS_XML_DIST_FILE_CHANGED == "1" ]]; then # Test all files with phpcs rules. - vendor/bin/phpcs -ps --runtime-set installed_paths "$TOP_LEVEL/vendor/drupal/coder/coder_sniffer" --standard="$TOP_LEVEL/core/phpcs.xml.dist" + vendor/bin/phpcs -ps --standard="$TOP_LEVEL/core/phpcs.xml.dist" PHPCS=$? if [ "$PHPCS" -ne "0" ]; then # If there are failures set the status to a number other than 0. @@ -319,7 +319,7 @@ for FILE in $FILES; do ############################################################################ if [[ -f "$TOP_LEVEL/$FILE" ]] && [[ $FILE =~ \.(inc|install|module|php|profile|test|theme|yml)$ ]] && [[ $PHPCS_XML_DIST_FILE_CHANGED == "0" ]]; then # Test files with phpcs rules. - vendor/bin/phpcs "$TOP_LEVEL/$FILE" --runtime-set installed_paths "$TOP_LEVEL/vendor/drupal/coder/coder_sniffer" --standard="$TOP_LEVEL/core/phpcs.xml.dist" + vendor/bin/phpcs "$TOP_LEVEL/$FILE" --standard="$TOP_LEVEL/core/phpcs.xml.dist" PHPCS=$? if [ "$PHPCS" -ne "0" ]; then # If there are failures set the status to a number other than 0.