fxpio / composer-asset-plugin

NPM/Bower Dependency Manager for Composer
MIT License
893 stars 156 forks source link

if install bower-asset/angular-resource and bower-asset/angluar-route, composer will crash #259

Closed songlipeng2003 closed 7 years ago

songlipeng2003 commented 7 years ago

I find angular-resource and angluar-route have some thousands tags. If I require tow libs, composer will load all tags. Final composer will crash.

PHP Fatal error: Allowed memory size of 4294967296 bytes exhausted (tried to allocate 268435464 bytes) in phar:///Users/thinking/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 65 PHP Stack trace: PHP 1. {main}() /Users/thinking/bin/composer:0 PHP 2. require() /Users/thinking/bin/composer:24 PHP 3. Composer\Console\Application->run() phar:///Users/thinking/bin/composer/bin/composer:43 PHP 4. Symfony\Component\Console\Application->run() phar:///Users/thinking/bin/composer/src/Composer/Console/Application.php:104 PHP 5. Composer\Console\Application->doRun() phar:///Users/thinking/bin/composer/vendor/symfony/console/Application.php:123 PHP 6. Symfony\Component\Console\Application->doRun() phar:///Users/thinking/bin/composer/src/Composer/Console/Application.php:231 PHP 7. Symfony\Component\Console\Application->doRunCommand() phar:///Users/thinking/bin/composer/vendor/symfony/console/Application.php:192 PHP 8. Symfony\Component\Console\Command\Command->run() phar:///Users/thinking/bin/composer/vendor/symfony/console/Application.php:847 PHP 9. Composer\Command\InstallCommand->execute() phar:///Users/thinking/bin/composer/vendor/symfony/console/Command/Command.php:259 PHP 10. Composer\Installer->run() phar:///Users/thinking/bin/composer/src/Composer/Command/InstallCommand.php:135 PHP 11. Composer\Installer->doInstall() phar:///Users/thinking/bin/composer/src/Composer/Installer.php:216 PHP 12. Composer\DependencyResolver\Solver->solve() phar:///Users/thinking/bin/composer/src/Composer/Installer.php:461 PHP 13. Composer\DependencyResolver\RuleSetGenerator->getRulesFor() phar:///Users/thinking/bin/composer/src/Composer/DependencyResolver/Solver.php:214 PHP 14. Composer\DependencyResolver\RuleSetGenerator->addRulesForPackage() phar:///Users/thinking/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php:330 PHP 15. Composer\DependencyResolver\RuleSetGenerator->addRule() phar:///Users/thinking/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php:246 PHP 16. Composer\DependencyResolver\RuleSet->add() phar:///Users/thinking/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php:144

Fatal error: Allowed memory size of 4294967296 bytes exhausted (tried to allocate 268435464 bytes) in phar:///Users/thinking/bin/composer/src/Composer/DependencyResolver/RuleSet.php on line 65

Call Stack: 0.0006 366600 1. {main}() /Users/thinking/bin/composer:0 0.0075 583496 2. require('phar:///Users/thinking/bin/composer/bin/composer') /Users/thinking/bin/composer:24 0.0384 3099064 3. Composer\Console\Application->run() phar:///Users/thinking/bin/composer/bin/composer:43 0.0412 3335896 4. Symfony\Component\Console\Application->run() phar:///Users/thinking/bin/composer/src/Composer/Console/Application.php:104 0.0420 3411112 5. Composer\Console\Application->doRun() phar:///Users/thinking/bin/composer/vendor/symfony/console/Application.php:123 0.2207 7874504 6. Symfony\Component\Console\Application->doRun() phar:///Users/thinking/bin/composer/src/Composer/Console/Application.php:231 0.2208 7874504 7. Symfony\Component\Console\Application->doRunCommand() phar:///Users/thinking/bin/composer/vendor/symfony/console/Application.php:192 0.2209 7874504 8. Symfony\Component\Console\Command\Command->run() phar:///Users/thinking/bin/composer/vendor/symfony/console/Application.php:847 0.2221 7877328 9. Composer\Command\InstallCommand->execute() phar:///Users/thinking/bin/composer/vendor/symfony/console/Command/Command.php:259 0.2263 8107664 10. Composer\Installer->run() phar:///Users/thinking/bin/composer/src/Composer/Command/InstallCommand.php:135 0.2287 8183904 11. Composer\Installer->doInstall() phar:///Users/thinking/bin/composer/src/Composer/Installer.php:216 0.9525 146425680 12. Composer\DependencyResolver\Solver->solve() phar:///Users/thinking/bin/composer/src/Composer/Installer.php:461 0.9525 146433928 13. Composer\DependencyResolver\RuleSetGenerator->getRulesFor() phar:///Users/thinking/bin/composer/src/Composer/DependencyResolver/Solver.php:214 1300.9040 3197011072 14. Composer\DependencyResolver\RuleSetGenerator->addRulesForPackage() phar:///Users/thinking/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php:330 1425.2881 4230618168 15. Composer\DependencyResolver\RuleSetGenerator->addRule() phar:///Users/thinking/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php:246 1425.2881 4230618168 16. Composer\DependencyResolver\RuleSet->add() phar:///Users/thinking/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php:144

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.%

francoispluchino commented 7 years ago

You can skip versions with pattern, see the doc Change/Disable the skip of versions by pattern.

songlipeng2003 commented 7 years ago

@francoispluchino thanks. It works.