Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Antonella's avatar

composer require doctrine/dbal PHP Fatal error: Allowed memory size of 1610612736

when I run the command on forge:

composer require doctrine/dbal

gives me the following error:

PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52

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

how can i solve

0 likes
2 replies
Sinnbeck's avatar

Upgrade to composer version 2

composer self-update --2        
or
sudo -H composer self-update --2
Antonella's avatar

i have this problem with composer 2.0. when I run the composer update command this comes up

Deprecation Notice: Class App\Models\User located in ./app/Http/Models/User.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class App\Models\Membership located in ./app/Http/Models/Membership.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class App\Models\Team located in ./app/Http/Models/Team.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201 Deprecation Notice: Class App\Models\Task located in ./app/Http/Models/Task.php does not comply with psr-4 autoloading standard. It will not autoload anymore in Composer v2.0. in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php:201

for now I am using version 1.15

Please or to participate in this conversation.