Commit 89b379c3 authored by Andrei Ivnitskii's avatar Andrei Ivnitskii
Browse files

Issue #3282813 by ivnish: Unable to run pareview.sh locally

parent 44d154d7
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -22,12 +22,15 @@
    }
  ],
  "require": {
    "composer-plugin-api": "^1.0",
    "composer-plugin-api": "^2.0",
    "drupal/coder": "^8.3"
  },
  "config": {
    "bin-dir": "bin",
    "discard-changes": true
    "discard-changes": true,
    "allow-plugins": {
      "dealerdirect/phpcodesniffer-composer-installer": true
    }
  },
  "autoload": {
    "psr-4": {
+335 −48
Original line number Diff line number Diff line
@@ -4,35 +4,114 @@
        "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
        "This file is @generated automatically"
    ],
    "content-hash": "a511ecec8b61a656a599f76deac5603f",
    "content-hash": "8d037b9faf70bce170a77f0398420764",
    "packages": [
        {
            "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": "drupal/coder",
            "version": "8.3.3",
            "version": "8.3.15",
            "source": {
                "type": "git",
                "url": "https://git.drupal.org/project/coder.git",
                "reference": "a33d3388fb2e1d94bd2aee36a8ff79186e9d8f43"
                "url": "https://git.drupalcode.org/project/coder.git",
                "reference": "0cfad3a21f1168bdc3030ae73351c31f88abba74"
            },
            "require": {
                "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
                "ext-mbstring": "*",
                "php": ">=5.5.9",
                "squizlabs/php_codesniffer": "^3.4.1",
                "symfony/yaml": ">=2.0.0"
                "php": ">=7.1",
                "sirbrillig/phpcs-variable-analysis": "^2.10",
                "slevomat/coding-standard": "^7.0",
                "squizlabs/php_codesniffer": "^3.6.0",
                "symfony/yaml": ">=2.0.5"
            },
            "require-dev": {
                "phpunit/phpunit": ">=3.7 <6"
                "phpstan/phpstan": "^1.4.9",
                "phpunit/phpunit": "^7.0 || ^8.0"
            },
            "type": "phpcodesniffer-standard",
            "autoload": {
                "psr-0": {
                "psr-4": {
                    "Drupal\\": "coder_sniffer/Drupal/",
                    "DrupalPractice\\": "coder_sniffer/DrupalPractice/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "GPL-2.0+"
                "GPL-2.0-or-later"
            ],
            "description": "Coder is a library to review Drupal code.",
            "homepage": "https://www.drupal.org/project/coder",
@@ -41,20 +120,183 @@
                "phpcs",
                "standards"
            ],
            "time": "2019-04-16T18:56:06+00:00"
            "support": {
                "issues": "https://www.drupal.org/project/issues/coder",
                "source": "https://www.drupal.org/project/coder"
            },
            "time": "2022-04-02T17:56:30+00:00"
        },
        {
            "name": "phpstan/phpdoc-parser",
            "version": "1.6.4",
            "source": {
                "type": "git",
                "url": "https://github.com/phpstan/phpdoc-parser.git",
                "reference": "135607f9ccc297d6923d49c2bcf309f509413215"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/135607f9ccc297d6923d49c2bcf309f509413215",
                "reference": "135607f9ccc297d6923d49c2bcf309f509413215",
                "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-phpunit": "^1.1",
                "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.6.4"
            },
            "time": "2022-06-26T13:09:08+00:00"
        },
        {
            "name": "sirbrillig/phpcs-variable-analysis",
            "version": "v2.11.4",
            "source": {
                "type": "git",
                "url": "https://github.com/sirbrillig/phpcs-variable-analysis.git",
                "reference": "e9c99cda31b21ccb4da4c2124b57c8355ddce48e"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/e9c99cda31b21ccb4da4c2124b57c8355ddce48e",
                "reference": "e9c99cda31b21ccb4da4c2124b57c8355ddce48e",
                "shasum": ""
            },
            "require": {
                "php": ">=5.4.0",
                "squizlabs/php_codesniffer": "^3.5.6"
            },
            "require-dev": {
                "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
                "phpcsstandards/phpcsdevcs": "^1.1",
                "phpstan/phpstan": "^1.7",
                "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.5 || ^7.0 || ^8.0 || ^9.0",
                "sirbrillig/phpcs-import-detection": "^1.1"
            },
            "type": "phpcodesniffer-standard",
            "autoload": {
                "psr-4": {
                    "VariableAnalysis\\": "VariableAnalysis/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "BSD-2-Clause"
            ],
            "authors": [
                {
                    "name": "Sam Graham",
                    "email": "php-codesniffer-variableanalysis@illusori.co.uk"
                },
                {
                    "name": "Payton Swick",
                    "email": "payton@foolord.com"
                }
            ],
            "description": "A PHPCS sniff to detect problems with variables.",
            "support": {
                "issues": "https://github.com/sirbrillig/phpcs-variable-analysis/issues",
                "source": "https://github.com/sirbrillig/phpcs-variable-analysis",
                "wiki": "https://github.com/sirbrillig/phpcs-variable-analysis/wiki"
            },
            "time": "2022-06-13T13:49:41+00:00"
        },
        {
            "name": "slevomat/coding-standard",
            "version": "7.2.1",
            "source": {
                "type": "git",
                "url": "https://github.com/slevomat/coding-standard.git",
                "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/aff06ae7a84e4534bf6f821dc982a93a5d477c90",
                "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90",
                "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.7.1",
                "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.1"
            },
            "funding": [
                {
                    "url": "https://github.com/kukulich",
                    "type": "github"
                },
                {
                    "url": "https://tidelift.com/funding/github/packagist/slevomat/coding-standard",
                    "type": "tidelift"
                }
            ],
            "time": "2022-05-25T10:58:12+00:00"
        },
        {
            "name": "squizlabs/php_codesniffer",
            "version": "3.4.2",
            "version": "3.7.1",
            "source": {
                "type": "git",
                "url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
                "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8"
                "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
                "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
                "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/1359e176e9307e906dc3d890bcc9603ff6d90619",
                "reference": "1359e176e9307e906dc3d890bcc9603ff6d90619",
                "shasum": ""
            },
            "require": {
@@ -92,24 +334,32 @@
                "phpcs",
                "standards"
            ],
            "time": "2019-04-10T23:49:02+00:00"
            "support": {
                "issues": "https://github.com/squizlabs/PHP_CodeSniffer/issues",
                "source": "https://github.com/squizlabs/PHP_CodeSniffer",
                "wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
            },
            "time": "2022-06-18T07:21:10+00:00"
        },
        {
            "name": "symfony/polyfill-ctype",
            "version": "v1.11.0",
            "version": "v1.26.0",
            "source": {
                "type": "git",
                "url": "https://github.com/symfony/polyfill-ctype.git",
                "reference": "82ebae02209c21113908c229e9883c419720738a"
                "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a",
                "reference": "82ebae02209c21113908c229e9883c419720738a",
                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
                "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4",
                "shasum": ""
            },
            "require": {
                "php": ">=5.3.3"
                "php": ">=7.1"
            },
            "provide": {
                "ext-ctype": "*"
            },
            "suggest": {
                "ext-ctype": "For best performance"
@@ -117,29 +367,33 @@
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-master": "1.11-dev"
                    "dev-main": "1.26-dev"
                },
                "thanks": {
                    "name": "symfony/polyfill",
                    "url": "https://github.com/symfony/polyfill"
                }
            },
            "autoload": {
                "psr-4": {
                    "Symfony\\Polyfill\\Ctype\\": ""
                },
                "files": [
                    "bootstrap.php"
                ]
                ],
                "psr-4": {
                    "Symfony\\Polyfill\\Ctype\\": ""
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Symfony Community",
                    "homepage": "https://symfony.com/contributors"
                },
                {
                    "name": "Gert de Pagter",
                    "email": "BackEndTea@gmail.com"
                },
                {
                    "name": "Symfony Community",
                    "homepage": "https://symfony.com/contributors"
                }
            ],
            "description": "Symfony polyfill for ctype functions",
@@ -150,41 +404,56 @@
                "polyfill",
                "portable"
            ],
            "time": "2019-02-06T07:57:58+00:00"
            "support": {
                "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0"
            },
            "funding": [
                {
                    "url": "https://symfony.com/sponsor",
                    "type": "custom"
                },
                {
                    "url": "https://github.com/fabpot",
                    "type": "github"
                },
                {
                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
                    "type": "tidelift"
                }
            ],
            "time": "2022-05-24T11:49:31+00:00"
        },
        {
            "name": "symfony/yaml",
            "version": "v4.2.8",
            "version": "v6.1.3",
            "source": {
                "type": "git",
                "url": "https://github.com/symfony/yaml.git",
                "reference": "6712daf03ee25b53abb14e7e8e0ede1a770efdb1"
                "reference": "cc48dd42ae1201abced04ae38284e23ce2d2d8f3"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/symfony/yaml/zipball/6712daf03ee25b53abb14e7e8e0ede1a770efdb1",
                "reference": "6712daf03ee25b53abb14e7e8e0ede1a770efdb1",
                "url": "https://api.github.com/repos/symfony/yaml/zipball/cc48dd42ae1201abced04ae38284e23ce2d2d8f3",
                "reference": "cc48dd42ae1201abced04ae38284e23ce2d2d8f3",
                "shasum": ""
            },
            "require": {
                "php": "^7.1.3",
                "symfony/polyfill-ctype": "~1.8"
                "php": ">=8.1",
                "symfony/polyfill-ctype": "^1.8"
            },
            "conflict": {
                "symfony/console": "<3.4"
                "symfony/console": "<5.4"
            },
            "require-dev": {
                "symfony/console": "~3.4|~4.0"
                "symfony/console": "^5.4|^6.0"
            },
            "suggest": {
                "symfony/console": "For validating YAML files using the lint command"
            },
            "bin": [
                "Resources/bin/yaml-lint"
            ],
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-master": "4.2-dev"
                }
            },
            "autoload": {
                "psr-4": {
                    "Symfony\\Component\\Yaml\\": ""
@@ -207,9 +476,26 @@
                    "homepage": "https://symfony.com/contributors"
                }
            ],
            "description": "Symfony Yaml Component",
            "description": "Loads and dumps YAML files",
            "homepage": "https://symfony.com",
            "time": "2019-03-30T15:58:42+00:00"
            "support": {
                "source": "https://github.com/symfony/yaml/tree/v6.1.3"
            },
            "funding": [
                {
                    "url": "https://symfony.com/sponsor",
                    "type": "custom"
                },
                {
                    "url": "https://github.com/fabpot",
                    "type": "github"
                },
                {
                    "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
                    "type": "tidelift"
                }
            ],
            "time": "2022-07-20T14:45:06+00:00"
        }
    ],
    "packages-dev": [],
@@ -219,7 +505,8 @@
    "prefer-stable": false,
    "prefer-lowest": false,
    "platform": {
        "composer-plugin-api": "^1.0"
        "composer-plugin-api": "^2.0"
    },
    "platform-dev": []
    "platform-dev": [],
    "plugin-api-version": "2.3.0"
}
+1883 −10

File changed.

Preview size limit exceeded, changes collapsed.

+17 −5
Original line number Diff line number Diff line
@@ -68,12 +68,24 @@ public static function installDependencies(Composer $composer, IOInterface $io)
    $executor = new ProcessExecutor($io);
    $output = '';

    $installedPipVersion = FALSE;
    $pipVersions = [
      'pip',
      'pip3',
    ];

    foreach ($pipVersions as $version) {
      if (self::checkCommand($version, $executor)) {
        $installedPipVersion = $version;
      }
    }

    // Install codespell using `pip` package manager.
    $io->write('Installing codespell:');
    // Whether `pip` is installed.
    if (self::checkCommand('pip', $executor)) {
    if ($installedPipVersion) {
      // Run codespell install command.
      $return = $executor->execute("pip install --user --upgrade codespell", $output);
      $return = $executor->execute("{$installedPipVersion} install --user --upgrade codespell", $output);
      // Get any error messages.
      $errors = $executor->getErrorOutput();
      // Send output to UI.
@@ -86,14 +98,14 @@ public static function installDependencies(Composer $composer, IOInterface $io)
        // Write any errors to the UI.
        $io->writeError($errors);
        // Throw an exception, as codespell is a requirement for PAReview.sh.
        throw new \RuntimeException("Could not install \"codespell\".");
        //throw new \RuntimeException("Could not install \"codespell\".");
      }
    }
    else {
      // Pip is not available, so we can't install codespell.
      $io->writeError('Command "pip" not found.');
      $io->writeError('Command "pip (or pip3)" not found.');
      // Throw an exception, as codespell is a requirement for PAReview.sh.
      throw new \RuntimeException("Could not execute \"pip\" command. Make sure, Python 2.7+ and \"pip\" are installed and executable for your user!");
      throw new \RuntimeException("Could not execute \"pip (or pip3)\" command. Make sure, Python 2.7+ and \"pip (or pip3)\" are installed and executable for your user!");
    }

    // Install ESLint using `npm` package manager.