mglaman / drupal-check

Check Drupal code for deprecations and discover bugs via static analysis
GNU General Public License v2.0
333 stars 67 forks source link

composer global require - requirements issue #76

Closed GoZOo closed 5 years ago

GoZOo commented 5 years ago

How is drupal-check installed?

Environment:

Describe the bug Installing drupal-check as global fail. See output.

Console output

composer global require mglaman/drupal-check -vvv
Changed current directory to /Users/goz/.composer
Reading ./composer.json
Loading config file ./composer.json
Checked CA file /private/etc/ssl/cert.pem: valid
Executing command (/Users/goz/.composer): git branch --no-color --no-abbrev -v
Executing command (/Users/goz/.composer): git describe --exact-match --tags
Executing command (/Users/goz/.composer): git log --pretty="%H" -n1 HEAD
Executing command (/Users/goz/.composer): hg branch
Executing command (/Users/goz/.composer): fossil branch list
Executing command (/Users/goz/.composer): fossil tag list
Executing command (/Users/goz/.composer): svn info --xml
Reading /Users/goz/.composer/vendor/composer/installed.json
Running 1.8.5 (2019-04-09 17:46:47) with PHP 7.3.1 on Darwin / 18.5.0
Downloading https://repo.packagist.org/packages.json
Downloading http://repo.packagist.org/p/provider-2013%24b3da6f2b27dbfcdf447a7b4483dcc074e6ab91c361bca291a8b88a86514230cf.json
Downloading http://repo.packagist.org/p/provider-2014%24732e185495a1403e91f732f48e9b6cdf784183d0efbedbabe4c87662b043ed4b.json
Downloading http://repo.packagist.org/p/provider-2015%2417e8338fce4052deb73bb50e2d286d2edb841f36541acfa478b741fcf12df598.json
Downloading http://repo.packagist.org/p/provider-2016%24bf3593a81eb0a29493f44372adfb24454a9e614868dd1e127938995e129aaa6d.json
Downloading http://repo.packagist.org/p/provider-2017%24174461ba01a501f18c1fc9fa99b0d57cb370f01734b61ce8469d8c6c2ba60296.json
Downloading http://repo.packagist.org/p/provider-2018%24e5fa8ecedfa2b9819bc9f427121ba1bb55e9576b5b573dd7b6d4615ddc998c85.json
Downloading http://repo.packagist.org/p/provider-2018-07%24c27356fc766641685729b3887e1b33d0ddbae9f8f1c21e7b5949651e737c56a5.json
Downloading http://repo.packagist.org/p/provider-2018-10%242997e1cb93285c06badc08eca0c89d9885e6277c188ce0b92ff9f6cce6e580ed.json
Downloading http://repo.packagist.org/p/provider-2019-01%2465adda5004fd855e74e1ca82b8641ad91a3ca431b9e0a2be6f45a79f31684ff6.json
Downloading http://repo.packagist.org/p/provider-2019-04%24c860bdc01e671907b09dd65ef57c21f253393dec1533aca6111560d3d27e4b12.json
Downloading http://repo.packagist.org/p/provider-archived%243e10e08a20be27b649b65179d3adbdcebd10095bf207b505692c33de091f86d0.json
Downloading http://repo.packagist.org/p/provider-latest%24a0a8ee7de737537d19e0643c30d4a1e3c5241637187cec5042c4ecc8d145f017.json
Downloading http://repo.packagist.org/p/mglaman/drupal-check%2496c68f2a9085de85225a7433adc9500506d1eaef2890226bb4f7832b016694b4.json
Using version ^1.0 for mglaman/drupal-check
./composer.json has been updated
Reading ./composer.json
Loading config file ./composer.json
Executing command (/Users/goz/.composer): git branch --no-color --no-abbrev -v
Executing command (/Users/goz/.composer): git describe --exact-match --tags
Executing command (/Users/goz/.composer): git log --pretty="%H" -n1 HEAD
Executing command (/Users/goz/.composer): hg branch
Executing command (/Users/goz/.composer): fossil branch list
Executing command (/Users/goz/.composer): fossil tag list
Executing command (/Users/goz/.composer): svn info --xml
Reading /Users/goz/.composer/vendor/composer/installed.json
Reading ./composer.lock
Loading composer repositories with package information
Downloading https://repo.packagist.org/packages.json
Updating dependencies (including require-dev)
Downloading http://repo.packagist.org/p/provider-2013%24b3da6f2b27dbfcdf447a7b4483dcc074e6ab91c361bca291a8b88a86514230cf.json
Downloading http://repo.packagist.org/p/provider-2014%24732e185495a1403e91f732f48e9b6cdf784183d0efbedbabe4c87662b043ed4b.json
Downloading http://repo.packagist.org/p/provider-2015%2417e8338fce4052deb73bb50e2d286d2edb841f36541acfa478b741fcf12df598.json
Downloading http://repo.packagist.org/p/provider-2016%24bf3593a81eb0a29493f44372adfb24454a9e614868dd1e127938995e129aaa6d.json
Downloading http://repo.packagist.org/p/provider-2017%24174461ba01a501f18c1fc9fa99b0d57cb370f01734b61ce8469d8c6c2ba60296.json
Downloading http://repo.packagist.org/p/provider-2018%24e5fa8ecedfa2b9819bc9f427121ba1bb55e9576b5b573dd7b6d4615ddc998c85.json
Downloading http://repo.packagist.org/p/provider-2018-07%24c27356fc766641685729b3887e1b33d0ddbae9f8f1c21e7b5949651e737c56a5.json
Downloading http://repo.packagist.org/p/provider-2018-10%242997e1cb93285c06badc08eca0c89d9885e6277c188ce0b92ff9f6cce6e580ed.json
Downloading http://repo.packagist.org/p/provider-2019-01%2465adda5004fd855e74e1ca82b8641ad91a3ca431b9e0a2be6f45a79f31684ff6.json
Downloading http://repo.packagist.org/p/provider-2019-04%24c860bdc01e671907b09dd65ef57c21f253393dec1533aca6111560d3d27e4b12.json
Downloading http://repo.packagist.org/p/provider-archived%243e10e08a20be27b649b65179d3adbdcebd10095bf207b505692c33de091f86d0.json
Downloading http://repo.packagist.org/p/provider-latest%24a0a8ee7de737537d19e0643c30d4a1e3c5241637187cec5042c4ecc8d145f017.json
Downloading http://repo.packagist.org/p/nikic/php-parser%24b16220099f74ba4a9be80cf9215db93040ba825d89a7a46f65b61f1eb6bd4f1b.json
Downloading http://repo.packagist.org/p/squizlabs/php_codesniffer%24fe34e78fcad23d42d683a3fb415593e6c9bc6a41ffc4b465d98222601687a6e2.json
Downloading http://repo.packagist.org/p/pheromone/phpcs-security-audit%24432fe24130b1399ad9f8378967efc12924a17360c5ae46c990889d86acf71a72.json
Downloading http://repo.packagist.org/p/symfony/console%2478e96b153cb9aec9eb5404526bf176539bab7a25a52b61d81db2fbd5768508e5.json
Downloading http://repo.packagist.org/p/symfony/event-dispatcher%2421e370d53b8b0ae59244204dcedcb68c5488ccaeb064018a9896cb4edc7a157e.json
Downloading http://repo.packagist.org/p/psecio/parse%249030aaa2c39084e089b06fa91c7b31c3def0aa91718d3e03e63ac178628bb4bc.json
Downloading http://repo.packagist.org/p/symfony/debug%242401795b4a8f89e35768610d870ebecd82d29a86e9534e5804b7991ca0b3ad50.json
Downloading http://repo.packagist.org/p/symfony/polyfill-mbstring%245d4ac827e3d4bc9b127c90d5e4b040fdea7fc705addf168c53753de13aed0266.json
Downloading http://repo.packagist.org/p/psr/log%241411a93c6d456c0e8b5556ca331e6c1c6ff40506b83cbcb9432dea9c3fa036a9.json
Downloading http://repo.packagist.org/p/mglaman/drupal-check%2496c68f2a9085de85225a7433adc9500506d1eaef2890226bb4f7832b016694b4.json
Downloading http://repo.packagist.org/p/composer/xdebug-handler%2492067993aabc99bac15b8bc935cf17b5c27ad60ac3b045175b264d31c1aeab0a.json
Downloading http://repo.packagist.org/p/mglaman/phpstan-drupal-deprecations%246b560bb6731e9acf4f52667ae7703986688142fbceb8afb1cf512aa408ff395a.json
Downloading http://repo.packagist.org/p/mglaman/phpstan-junit%24dda8cef75ec82337654ca7dac3516f491865ac4698ff2854b61a75ac3a863863.json
Downloading http://repo.packagist.org/p/webflo/drupal-finder%24be19e0aee9c0fc0d532a1bdae56ce82070b166ea286b6e5880747307f39718dd.json
Downloading http://repo.packagist.org/p/mglaman/phpstan-drupal%247d75d3fa05763b3c03b811314dff178d81a852a60bf6f245ae241cddf63db36a.json
Downloading http://repo.packagist.org/p/phpstan/phpstan-deprecation-rules%245661621a6115ae902de7f42ad78ee878a83adedbbf6731278c2186e4200c984b.json
Downloading http://repo.packagist.org/p/phpstan/phpstan%2451f7e81a4c26995554d7411307f6b40bfb0d2edf676a3a8551e6999b649d1441.json
Downloading http://repo.packagist.org/p/symfony/contracts%24e21e5295ce33b82f042efaaadc8e9e57e8e414500b7857474036339280c86d22.json
Downloading http://repo.packagist.org/p/symfony/yaml%24cc87d0d1851c4203c36847f57901981b3026f7933645a503d5170a45aad9830a.json
Downloading http://repo.packagist.org/p/jean85/pretty-package-versions%2426b60c5b9b7bb85ab73fc6e12acb5a1499def1bd0f2e00716aae3d80557ef3cc.json
Downloading http://repo.packagist.org/p/nette/bootstrap%24d1254f00a339ebd3d21e6fe44c681d736175550fc68a442584ad4a47b069befa.json
Downloading http://repo.packagist.org/p/nette/di%246b332dc833a23bfd15b2b82b578d26b9afe050a9557bc43783147ad5fd8d695b.json
Downloading http://repo.packagist.org/p/nette/robot-loader%24195dc7dcaa72d93893570b4bcae75556ac02b7512c9d627d367551116278b588.json
Downloading http://repo.packagist.org/p/nette/utils%243e77c1927e49a238e3318e366624ddd59529e5657bbf88364bb71e1effc9ac70.json
Downloading http://repo.packagist.org/p/phpstan/phpdoc-parser%24cbad319574baef7252bce0adbe2d4414caec87f2fffba3fc744f39f2229cf193.json
Downloading http://repo.packagist.org/p/symfony/finder%24515a0fc5c3dbff8bd905170dee16dce2c792f16736c6191b5ceeb4f0ca55df97.json
Downloading http://repo.packagist.org/p/nette/schema%24052ae1fb7245f970d62eef08a99e88690e19f8d5e07dcfb8b2f68a01278709c2.json
Downloading http://repo.packagist.org/p/symfony/polyfill-ctype%24ede16305ccc7c7f96469d909dc4aaed31d7051e7e866811f12b8877df9ba3128.json
Downloading http://repo.packagist.org/p/ocramius/package-versions%2451a41f72eaadd8982df50c67d2a79229f339eceb9e7290fb5dc8aab9d9c826d7.json
Downloading http://repo.packagist.org/p/nette/neon%2493bfbe0d3b52f0fc835188bec7389bbb217fc0817546b392c50511625e356659.json
Downloading http://repo.packagist.org/p/nette/php-generator%240f9d3549e831d65b9fa2ab48ce9f26f8cbf135d34483ff089ca804efdcb736ed.json
Downloading http://repo.packagist.org/p/nette/finder%243ddbc140b41df41f492131ad1e31c87886ff2b7f7e5e145b38b9a827ea424194.json
Resolving dependencies through SAT

Dependency resolution completed in 0.004 seconds
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for nikic/php-parser (locked at v2.1.1) -> satisfiable by nikic/php-parser[v2.1.1].
    - mglaman/drupal-check 1.0.0 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.1 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.2 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.3 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.4 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.5 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.6 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.7 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.8 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.9 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - Conclusion: don't install mglaman/phpstan-drupal-deprecations 0.11.1
    - Installation request for mglaman/drupal-check ^1.0 -> satisfiable by mglaman/drupal-check[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9].

Installation failed, reverting ./composer.json to its original content.
dakkusingh commented 5 years ago

similar issue here..

 ~/Docker/drupal  composer global require mglaman/drupal-check
Changed current directory to /Users/dakku/.composer
    1/1:    http://repo.packagist.org/p/provider-latest$d73386d74bada76df2dd91c79096d6cb93f0b38aedc6bf3fdc03d6815c9b0343.json
    Finished: success: 1, skipped: 0, failure: 0, total: 1
Using version ^1.0 for mglaman/drupal-check
./composer.json has been updated
    1/1:    http://repo.packagist.org/p/provider-latest$d73386d74bada76df2dd91c79096d6cb93f0b38aedc6bf3fdc03d6815c9b0343.json
    Finished: success: 1, skipped: 0, failure: 0, total: 1
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for squizlabs/php_codesniffer (locked at 2.9.1) -> satisfiable by squizlabs/php_codesniffer[2.9.1].
    - Conclusion: don't install mglaman/drupal-check 1.0.9
    - Installation request for symfony/yaml (locked at v3.3.8) -> satisfiable by symfony/yaml[v3.3.8].
    - Conclusion: don't install mglaman/drupal-check 1.0.8
    - mglaman/drupal-check 1.0.0 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.1 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.2 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.3 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.4 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.5 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.6 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - mglaman/drupal-check 1.0.7 requires mglaman/phpstan-drupal-deprecations ^0.11.1 -> satisfiable by mglaman/phpstan-drupal-deprecations[0.11.1].
    - Conclusion: don't install mglaman/phpstan-drupal-deprecations 0.11.1
    - Installation request for mglaman/drupal-check ^1.0 -> satisfiable by mglaman/drupal-check[1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9].

Installation failed, reverting ./composer.json to its original content.
mglaman commented 5 years ago

OP's error is https://github.com/mglaman/drupal-check/issues/37. You need to manually upgrade composer require nikic/php-parser:^4. It's a problem for old sites.

@dakkusingh I had codesniffer in require and not require-dev 😱 That was fixed in 1c477041d7d5afdad98e02fb5a52708b143de0f8