yiisoft / config

Configuration management
https://www.yiiframework.com/
BSD 3-Clause "New" or "Revised" License
31 stars 11 forks source link

Skip onPostUpdateCommandDump event handler on composer install with --no-autoloader key #169

Open svit-ws opened 5 months ago

svit-ws commented 5 months ago

What steps will reproduce the problem?

composer install --no-autoloader

What is the expected result?

install dependencies w/o autoloading generation

What do you get instead?

fired event - post-install-cmd: Yiisoft\Config\Composer\EventHandler->onPostUpdateCommandDump what causes this error: require_once(/app/vendor/autoload.php): Failed to open stream: No such file

Additional info

5.847 > post-install-cmd: Yiisoft\Config\Composer\EventHandler->onPostUpdateCommandDump
5.847 infection/extension-installer: No extensions found
5.849 
5.853 In ProcessHelper.php line 43:
5.853                                                                                
5.853   [ErrorException]                                                             
5.853   require_once(/app/vendor/autoload.php): Failed to open stream: No such file  
5.853    or directory                                                                
5.853                                                                                
5.853 
5.853 Exception trace:
5.853   at /app/vendor/yiisoft/config/src/Composer/ProcessHelper.php:43
5.853  Composer\Util\ErrorHandler::handle() at /app/vendor/yiisoft/config/src/Composer/ProcessHelper.php:43
5.853  require_once() at /app/vendor/yiisoft/config/src/Composer/ProcessHelper.php:43
5.853  Yiisoft\Config\Composer\ProcessHelper->__construct() at /app/vendor/yiisoft/config/src/Composer/MergePlanProcess.php:36
5.853  Yiisoft\Config\Composer\MergePlanProcess->__construct() at /app/vendor/yiisoft/config/src/Composer/EventHandler.php:84
5.853  Yiisoft\Config\Composer\EventHandler->processConfigs() at /app/vendor/yiisoft/config/src/Composer/EventHandler.php:59
5.853  Yiisoft\Config\Composer\EventHandler->onPostUpdateCommandDump() at phar:///usr/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:213
5.853  Composer\EventDispatcher\EventDispatcher->doDispatch() at phar:///usr/bin/composer/src/Composer/EventDispatcher/EventDispatcher.php:131
5.853  Composer\EventDispatcher\EventDispatcher->dispatchScript() at phar:///usr/bin/composer/src/Composer/Installer.php:404
5.853  Composer\Installer->run() at phar:///usr/bin/composer/src/Composer/Command/InstallCommand.php:147
5.853  Composer\Command\InstallCommand->execute() at phar:///usr/bin/composer/vendor/symfony/console/Command/Command.php:298
5.853  Symfony\Component\Console\Command\Command->run() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:1040
5.853  Symfony\Component\Console\Application->doRunCommand() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:301
5.853  Symfony\Component\Console\Application->doRun() at phar:///usr/bin/composer/src/Composer/Console/Application.php:384
5.853  Composer\Console\Application->doRun() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:171
5.853  Symfony\Component\Console\Application->run() at phar:///usr/bin/composer/src/Composer/Console/Application.php:145
5.853  Composer\Console\Application->run() at phar:///usr/bin/composer/bin/composer:93
5.853  require() at /usr/bin/composer:29
5.853 
5.853 install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--download-only] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [--audit] [--audit-format AUDIT-FORMAT] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
5.853 
------
failed to solve: process "/bin/sh -c composer install -vvv --ignore-platform-reqs --no-scripts --no-autoloader" did not complete successfully: exit code: 1
Q A
Version 1.5.0
PHP version 8.2
Operating system debian