phpro / grumphp

A PHP code-quality tool
MIT License
4.14k stars 430 forks source link

PHP warning while uninstalling grumphp #665

Closed pontus-mp closed 4 years ago

pontus-mp commented 5 years ago
Q A
Version 0.15.2
Bug? yes
New feature? no
Question? no
Documentation? no

GrumPHP does not play nice when uninstalling it. A PHP warning is triggered and the git hooks remain.

Steps to reproduce:

# Generate empty folder
mkdir grumphp-tmp
cd grumphp-tmp
git init
composer require --dev phpro/grumphp
composer install --no-dev

Result:

Initialized empty Git repository in /tmp/grumpdemo/grumphp-tmp/.git/
Using version ^0.15.2 for phpro/grumphp
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 28 installs, 0 updates, 0 removals
  - Installing symfony/polyfill-ctype (v1.12.0): Loading from cache
  - Installing symfony/yaml (v4.3.4): Loading from cache
  - Installing symfony/process (v4.3.4): Loading from cache
  - Installing symfony/options-resolver (v4.3.4): Loading from cache
  - Installing symfony/finder (v4.3.4): Loading from cache
  - Installing symfony/filesystem (v4.3.4): Loading from cache
  - Installing symfony/event-dispatcher-contracts (v1.1.5): Loading from cache
  - Installing psr/container (1.0.0): Loading from cache
  - Installing symfony/event-dispatcher (v4.3.4): Loading from cache
  - Installing symfony/service-contracts (v1.1.6): Loading from cache
  - Installing symfony/dependency-injection (v4.3.4): Loading from cache
  - Installing symfony/polyfill-php73 (v1.12.0): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.12.0): Loading from cache
  - Installing symfony/console (v4.3.4): Loading from cache
  - Installing psr/log (1.1.0): Loading from cache
  - Installing symfony/config (v4.3.4): Loading from cache
  - Installing seld/jsonlint (1.7.1): Loading from cache
  - Installing monolog/monolog (1.24.0): Loading from cache
  - Installing gitonomy/gitlib (v1.1.0): Loading from cache
  - Installing doctrine/collections (v1.6.2): Loading from cache
  - Installing seld/phar-utils (1.0.1): Loading from cache
  - Installing justinrainbow/json-schema (5.2.8): Loading from cache
  - Installing composer/xdebug-handler (1.3.3): Loading from cache
  - Installing composer/spdx-licenses (1.5.2): Loading from cache
  - Installing composer/semver (1.5.0): Loading from cache
  - Installing composer/ca-bundle (1.2.4): Loading from cache
  - Installing composer/composer (1.9.0): Loading from cache
  - Installing phpro/grumphp (v0.15.2): Loading from cache
symfony/event-dispatcher-contracts suggests installing psr/event-dispatcher ()
symfony/event-dispatcher suggests installing symfony/http-kernel ()
symfony/dependency-injection suggests installing symfony/expression-language (For using expressions in service container configuration)
symfony/dependency-injection suggests installing symfony/proxy-manager-bridge (Generate service proxies to lazy load them)
symfony/console suggests installing symfony/lock ()
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing ext-amqp (Allow sending log messages to an AMQP server (1.0+ required))
monolog/monolog suggests installing ext-mongo (Allow sending log messages to a MongoDB server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
phpro/grumphp suggests installing atoum/atoum (Lets GrumPHP run your unit tests.)
phpro/grumphp suggests installing behat/behat (Lets GrumPHP validate your project features.)
phpro/grumphp suggests installing brianium/paratest (Lets GrumPHP run PHPUnit in parallel.)
phpro/grumphp suggests installing codeception/codeception (Lets GrumPHP run your project's full stack tests)
phpro/grumphp suggests installing codegyre/robo (Lets GrumPHP run your automated PHP tasks.)
phpro/grumphp suggests installing designsecurity/progpilot (Lets GrumPHP be sure that there are no vulnerabilities in your code.)
phpro/grumphp suggests installing doctrine/orm (Lets GrumPHP validate your Doctrine mapping files.)
phpro/grumphp suggests installing phan/phan (Lets GrumPHP unleash a static analyzer on your code)
phpro/grumphp suggests installing friendsofphp/php-cs-fixer (Lets GrumPHP automatically fix your codestyle.)
phpro/grumphp suggests installing infection/infection (Lets GrumPHP evaluate the quality your unit tests)
phpro/grumphp suggests installing jakub-onderka/php-parallel-lint (Lets GrumPHP quickly lint your entire code base.)
phpro/grumphp suggests installing localheinz/composer-normalize (Lets GrumPHP tidy and normalize your composer.json file.)
phpro/grumphp suggests installing maglnet/composer-require-checker (Lets GrumPHP analyze composer dependencies.)
phpro/grumphp suggests installing malukenho/kawaii-gherkin (Lets GrumPHP lint your Gherkin files.)
phpro/grumphp suggests installing nikic/php-parser (Lets GrumPHP run static analyses through your PHP files.)
phpro/grumphp suggests installing phing/phing (Lets GrumPHP run your automated PHP tasks.)
phpro/grumphp suggests installing phpmd/phpmd (Lets GrumPHP sort out the mess in your code)
phpro/grumphp suggests installing povils/phpmnd (Lets GrumPHP help you detect magic numbers in PHP code.)
phpro/grumphp suggests installing phpspec/phpspec (Lets GrumPHP spec your code.)
phpro/grumphp suggests installing phpstan/phpstan (Lets GrumPHP discover bugs in your code without running it.)
phpro/grumphp suggests installing phpunit/phpunit (Lets GrumPHP run your unit tests.)
phpro/grumphp suggests installing roave/security-advisories (Lets GrumPHP be sure that there are no known security issues.)
phpro/grumphp suggests installing sebastian/phpcpd (Lets GrumPHP find duplicated code.)
phpro/grumphp suggests installing sensiolabs/security-checker (Lets GrumPHP be sure that there are no known security issues.)
phpro/grumphp suggests installing squizlabs/php_codesniffer (Lets GrumPHP sniff on your code.)
phpro/grumphp suggests installing sstalle/php7cc (Lets GrumPHP check PHP 5.3 - 5.6 code compatibility with PHP 7.)
phpro/grumphp suggests installing symfony/phpunit-bridge (Lets GrumPHP run your unit tests with the phpunit-bridge of Symfony.)
phpro/grumphp suggests installing vimeo/psalm (Lets GrumPHP discover errors in your code without running it.)
phpro/grumphp suggests installing symplify/easycodingstandard (Lets GrumPHP check coding standard.)
phpro/grumphp suggests installing allocine/twigcs (Lets GrumPHP check Twig coding standard.)
Writing lock file
Generating autoload files

Watch out! GrumPHP is sniffing your commits!

Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 0 installs, 0 updates, 28 removals
  - Removing symfony/yaml (v4.3.4)
  - Removing symfony/service-contracts (v1.1.6)
  - Removing symfony/process (v4.3.4)
  - Removing symfony/polyfill-php73 (v1.12.0)
  - Removing symfony/polyfill-mbstring (v1.12.0)
  - Removing symfony/polyfill-ctype (v1.12.0)
  - Removing symfony/options-resolver (v4.3.4)
  - Removing symfony/finder (v4.3.4)
  - Removing symfony/filesystem (v4.3.4)
  - Removing symfony/event-dispatcher-contracts (v1.1.5)
  - Removing symfony/event-dispatcher (v4.3.4)
  - Removing symfony/dependency-injection (v4.3.4)
  - Removing symfony/console (v4.3.4)
  - Removing symfony/config (v4.3.4)
  - Removing seld/phar-utils (1.0.1)
  - Removing seld/jsonlint (1.7.1)
  - Removing psr/log (1.1.0)
  - Removing psr/container (1.0.0)
GrumPHP can not sniff your commits. Did you specify the correct git-dir?
PHP Warning:  require(/tmp/grumpdemo/grumphp-tmp/vendor/composer/../symfony/polyfill-ctype/bootstrap.php): failed to open stream: No such file or directory in /tmp/grumpdemo/grumphp-tmp/vendor/composer/autoload_real.php on line 66
PHP Fatal error:  require(): Failed opening required '/tmp/grumpdemo/grumphp-tmp/vendor/composer/../symfony/polyfill-ctype/bootstrap.php' (include_path='.:/usr/share/php') in /tmp/grumpdemo/grumphp-tmp/vendor/composer/autoload_real.php on line 66

  - Removing phpro/grumphp (v0.15.2)
  - Removing monolog/monolog (1.24.0)
  - Removing justinrainbow/json-schema (5.2.8)
  - Removing gitonomy/gitlib (v1.1.0)
  - Removing doctrine/collections (v1.6.2)
  - Removing composer/xdebug-handler (1.3.3)
  - Removing composer/spdx-licenses (1.5.2)
  - Removing composer/semver (1.5.0)
  - Removing composer/composer (1.9.0)
  - Removing composer/ca-bundle (1.2.4)
Generating autoload files
veewee commented 4 years ago

Fixed in 0.17.0