composer: postPackageInstall() No Longer Working
I ran into a weird bug earlier today when trying to resolve dependencies in a project. I decided to update Composer to see if that would address the problem. Unfortunately, I ran into another issue and it’s basically nuked my process for creating projects. Not sure if my code is out-of-date or if there’s a better way to accomplish this. My code had worked for a number of months. Thanks for looking into it.
The version of Composer:
1.0-dev (664202e767ae29b1afdb5d96baee880b8baed4c8)
The command I’m running:
composer create-project pattern-lab/edition-twig-standard twig-base
The snipped results after running the above with -vvv
:
Script PatternLab\Installer::postPackageInstall handling the post-package-install event terminated with an exception
Reading ./composer.json
Loading config file ./composer.json
Failed to initialize global composer: Composer could not find the config file: /Users/dmolsen/.composer/composer.json
To initialize a project, please create a composer.json file as described in the http://getcomposer.org/ "Getting Started" section
[ErrorException]
Argument 1 passed to PatternLab\Installer::postPackageInstall() must be an instance of Composer\Script\Event, instance of Composer\Script\PackageEvent given, called in phar:///usr/local/bin/compose
r/src/Composer/EventDispatcher/EventDispatcher.php on line 198 and defined
Exception trace:
() at /Users/dmolsen/Sites/patternlab-project/test/twig-base/core/src/PatternLab/Installer.php:24
Composer\Util\ErrorHandler::handle() at /Users/dmolsen/Sites/patternlab-project/test/twig-base/core/src/PatternLab/Installer.php:24
PatternLab\Installer::postPackageInstall() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:198
Composer\EventDispatcher\EventDispatcher->executeEventPhpScript() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:166
Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:111
Composer\EventDispatcher\EventDispatcher->dispatchPackageEvent() at phar:///usr/local/bin/composer/src/Composer/Installer.php:599
Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:225
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/CreateProjectCommand.php:171
Composer\Command\CreateProjectCommand->installProject() at phar:///usr/local/bin/composer/src/Composer/Command/CreateProjectCommand.php:131
Composer\Command\CreateProjectCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:253
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:147
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:84
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:43
require() at /usr/local/bin/composer:25
My project if you want to poke at code. Very slim. Basically including a bunch of other stuff as dependencies:
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 15 (6 by maintainers)
Commits related to this issue
- Adopted callback helper for new composer https://github.com/composer/composer/issues/3811 — committed to matperez/yiinitializr by matperez 9 years ago
- Add BC for Script\Event instances, fixes #3811 — committed to ChadSikorra/composer by Seldaek 9 years ago
Should be fixed, @dmolsen can you run
composer self-update
and then try again please?