Skip to content

Conversation

@nicolas-grekas
Copy link
Member

composer install should be read-only, so this doesn't make much sense and this spams the console with unneeded messages.

@fabpot
Copy link
Member

fabpot commented May 14, 2021

Thank you @nicolas-grekas.

@fabpot fabpot merged commit ea1fe6e into symfony:main May 14, 2021

if (!$recipes) {
$this->synchronizePackageJson($rootDir);
if (ScriptEvents::POST_UPDATE_CMD === $event->getName()) {
Copy link
Member

@Seldaek Seldaek May 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is borked, $event can be null when called via

$this->update();

I'm not sure how to best fix this sorry so will leave that to you :)

Stack trace if it helps:

Fatal error: Uncaught Error: Call to a member function getName() on null in /home/runner/work/vendor/symfony/flex/src/Flex.php:486
Stack trace:
#0 /home/runner/work/vendor/symfony/flex/src/Flex.php(395): Symfony\Flex\Flex->install()
#1 /home/runner/work/vendor/symfony/flex/src/Flex.php(376): Symfony\Flex\Flex->update()
#2 [internal function]: Symfony\Flex\Flex->checkForUpdate()
#3 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(174): call_user_func()
#4 phar:///usr/local/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php(119): Composer\EventDispatcher\EventDispatcher->doDispatch()
#5 phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php(432): Composer\EventDispatcher\EventDispatcher->dispatchPackageEvent()
#6 phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php(447): Composer\Installer\InstallationManager->Composer\Installer\{closure}()
#7 phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php(368): Composer\Installer\InstallationManager->executeBatch()
#8 phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php(267): Composer\Installer\InstallationManager->downloadAndExecuteBatch()
#9 phar:///usr/local/bin/composer/src/Composer/Installer.php(707): Composer\Installer\InstallationManager->execute()
#10 phar:///usr/local/bin/composer/src/Composer/Installer.php(544): Composer\Installer->doInstall()
#11 phar:///usr/local/bin/composer/src/Composer/Installer.php(247): Composer\Installer->doUpdate()
#12 phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php(236): Composer\Installer->run()
#13 phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php(245): Composer\Command\UpdateCommand->execute()
#14 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(835): Symfony\Component\Console\Command\Command->run()
#15 phar:///usr/local/bin/composer/vendor/symfony/console/Application.php(185): Symfony\Component\Console\Application->doRunCommand()
#16 phar:///usr/local/bin/composer/src/Composer/Console/Application.php(310): Symfony\Component\Console\Application->doRun()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 4961515

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants