Skip to content

Updating from 0.11.1 to 0.11.2 throws an error #300

@jyggen

Description

@jyggen
Q A
Version 0.11.2
Bug? yes
New feature? no
Question? no
Documentation? no
Related tickets Likely #274

When running composer update phpro/grumphp to update from 0.11.1 to 0.11.2 the follow error is thrown after (or during) the autoload files are generated:

[Symfony\Component\Debug\Exception\FatalThrowableError]
  Class 'GrumPHP\Console\Command\ConfigureCommand' not found


Exception trace:
 () at phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code:143
 GrumPHP\Composer\GrumPHPPlugin_composer_tmp1->runScheduledTasks() at n/a:n/a
 call_user_func() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:171
 Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:96
 Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///usr/local/bin/composer/src/Composer/Installer.php:307
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/RequireCommand.php:174
 Composer\Command\RequireCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:850
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:193
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:227
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:124
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:100
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:54
 require() at /usr/local/bin/composer:25

This is likely due to the change from PSR-0 to PSR-4 in 0.11.2 (or rather the change of folder structure since PSR-4 allows the PSR-0 structure) since the autoloader used by the Composer plugin have the old paths and thus can't find the file/class when the folder structure changes.

Not sure there's a fix for this really, or if it's worth fixing - but figured I'd report it at least :)

Steps to reproduce:

mkdir tmp
cd tmp
composer require phpro/grumphp 0.11.1
composer require phpro/grumphp 0.11.2 -vvv

Result:

$ composer require phpro/grumphp 0.11.2 -vvv
Reading ./composer.json
Loading config file /Users/jyggen/.composer/config.json
Loading config file /Users/jyggen/.composer/auth.json
Loading config file ./composer.json
Checked CA file /private/etc/ssl/cert.pem: valid
Executing command (/Users/jyggen/Code/tmp): git branch --no-color --no-abbrev -v
Executing command (/Users/jyggen/Code/tmp): git describe --exact-match --tags
Executing command (/Users/jyggen/Code/tmp): git log --pretty="%H" -n1 HEAD
Reading /Users/jyggen/.composer/composer.json
Loading config file /Users/jyggen/.composer/config.json
Loading config file /Users/jyggen/.composer/auth.json
Loading config file /Users/jyggen/.composer/composer.json
Loading config file /Users/jyggen/.composer/auth.json
Reading /Users/jyggen/.composer/auth.json
Reading /Users/jyggen/Code/tmp/vendor/composer/installed.json
Reading /Users/jyggen/.composer/vendor/composer/installed.json
Loading plugin PackageVersions\Installer
Loading plugin GrumPHP\Composer\GrumPHPPlugin
Loading plugin Hirak\Prestissimo\Plugin
Downloading https://packagist.org/packages.json
Writing /Users/jyggen/.composer/cache/repo/https---packagist.org/packages.json into cache
    1/2:	http://packagist.org/p/provider-latest$8c75adbf3918e3d90d7e6d7598be1241106110de58fa2f1b01efd9ce62048c68.json
    2/2:	http://packagist.org/p/provider-2017-01$9f56afcc87faf9b9ade6434a52f6d200185f6b71f619cda6525c6f82ffff2b23.json
    Finished: success: 2, skipped: 0, failure: 0, total: 2
Running 363bab90fa1f45a3801f012d5b544175dab816d8 (2017-02-10 12:32:08) with PHP 7.1.1 on Darwin / 16.4.0
./composer.json has been updated
Reading ./composer.json
Loading config file /Users/jyggen/.composer/config.json
Loading config file /Users/jyggen/.composer/auth.json
Loading config file ./composer.json
Executing command (/Users/jyggen/Code/tmp): git branch --no-color --no-abbrev -v
Executing command (/Users/jyggen/Code/tmp): git describe --exact-match --tags
Executing command (/Users/jyggen/Code/tmp): git log --pretty="%H" -n1 HEAD
Reading /Users/jyggen/.composer/composer.json
Loading config file /Users/jyggen/.composer/config.json
Loading config file /Users/jyggen/.composer/auth.json
Loading config file /Users/jyggen/.composer/composer.json
Loading config file /Users/jyggen/.composer/auth.json
Reading /Users/jyggen/.composer/auth.json
Reading /Users/jyggen/Code/tmp/vendor/composer/installed.json
Reading /Users/jyggen/.composer/vendor/composer/installed.json
Loading plugin PackageVersions\Installer_composer_tmp0
Loading plugin GrumPHP\Composer\GrumPHPPlugin_composer_tmp1
Loading plugin Hirak\Prestissimo\Plugin_composer_tmp2
Downloading https://packagist.org/packages.json
Writing /Users/jyggen/.composer/cache/repo/https---packagist.org/packages.json into cache
    1/2:	http://packagist.org/p/provider-latest$8c75adbf3918e3d90d7e6d7598be1241106110de58fa2f1b01efd9ce62048c68.json
    2/2:	http://packagist.org/p/provider-2017-01$9f56afcc87faf9b9ade6434a52f6d200185f6b71f619cda6525c6f82ffff2b23.json
    Finished: success: 2, skipped: 0, failure: 0, total: 2
Reading ./composer.lock
Loading composer repositories with package information
Writing /Users/jyggen/.composer/cache/repo/https---packagist.org/packages.json into cache
Updating dependencies (including require-dev)
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/p-provider-2013.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/p-provider-2014.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/p-provider-2015.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/p-provider-2016.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/p-provider-2016-04.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/p-provider-2016-07.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/p-provider-2016-10.json from cache
Writing /Users/jyggen/.composer/cache/repo/https---packagist.org/p-provider-2017-01.json into cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/p-provider-archived.json from cache
Writing /Users/jyggen/.composer/cache/repo/https---packagist.org/p-provider-latest.json into cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-ocramius$package-versions.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$yaml.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$dependency-injection.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-eventmanager.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-code.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-stdlib.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-athletic$athletic.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-zendframework$zend-hydrator.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-ocramius$proxy-manager.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$proxy-manager-bridge.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-squizlabs$php-codesniffer.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$process.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$options-resolver.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$finder.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$filesystem.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$event-dispatcher.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-psr$log.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$debug.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$polyfill-mbstring.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$console.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$config.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-seld$jsonlint.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-monolog$monolog.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-gitonomy$gitlib.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-doctrine$collections.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-seld$phar-utils.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-seld$cli-prompt.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-justinrainbow$json-schema.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-composer$spdx-licenses.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-composer$semver.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-composer$ca-bundle.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-composer$composer.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-phpro$grumphp.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$expression-language.json from cache
Reading /Users/jyggen/.composer/cache/repo/https---packagist.org/provider-symfony$http-kernel.json from cache
Resolving dependencies through SAT
Dependency resolution completed in 0.048 seconds
Analyzed 3134 packages to resolve dependencies
Analyzed 79518 rules to resolve dependencies
Package operations: 0 installs, 1 update, 0 removals
Updates: phpro/grumphp:v0.11.2
  - Updating phpro/grumphp (v0.11.1 => v0.11.2)Reading /Users/jyggen/.composer/cache/files/phpro/grumphp/94f5eb59b78d9cc61fcc04a73ecc10c68a304437.zip from cache
 Loading from cache Extracting archiveExecuting command (CWD): unzip -qq '/Users/jyggen/Code/tmp/vendor/phpro/grumphp/1834863e8b02d41e9a1ab4748434f005' -d '/Users/jyggen/Code/tmp/vendor/composer/dab45dd3' && chmod -R u+w '/Users/jyggen/Code/tmp/vendor/composer/dab45dd3'

    REASON: Required by the root package: Install command rule (install phpro/grumphp v0.11.2)

Reading /Users/jyggen/Code/tmp/vendor/composer/installed.json
Writing lock file
Generating autoload files
Reading ./composer.lock
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class


  [Symfony\Component\Debug\Exception\FatalThrowableError]
  Class 'GrumPHP\Console\Command\ConfigureCommand' not found


Exception trace:
 () at phar:///usr/local/bin/composer/src/Composer/Plugin/PluginManager.php(195) : eval()'d code:143
 GrumPHP\Composer\GrumPHPPlugin_composer_tmp1->runScheduledTasks() at n/a:n/a
 call_user_func() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:171
 Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:96
 Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///usr/local/bin/composer/src/Composer/Installer.php:307
 Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/RequireCommand.php:174
 Composer\Command\RequireCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:257
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:850
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:193
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:227
 Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:124
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:100
 Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:54
 require() at /usr/local/bin/composer:25

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions