Fatal error: Allowed memory during upgrade to OC v4

After the composer:update command:

> System\Console\ComposerScript::postAutoloadDump

Fatal error: Allowed memory size of 4294967296 bytes exhausted (tried to allocate 262144 bytes) in /Users/christophevidal/Sites/oc-mall/vendor/october/rain/init/functions.php on line 445

106 packages you are using are looking for funding.

Use the `composer fund` command to find out more!

> System\Console\ComposerScript::postUpdateCmd

Fatal error: Allowed memory size of 4294967296 bytes exhausted (tried to allocate 262144 bytes) in /Users/christophevidal/Sites/oc-mall/vendor/october/rain/init/functions.php on line 445

Fatal error: Allowed memory size of 4294967296 bytes exhausted (tried to allocate 262144 bytes) in /Users/christophevidal/Sites/oc-mall/vendor/october/rain/init/functions.php on line 445

No security vulnerability advisories found.

Looks like you’ve run out of allocated memory. Composer can require up to 2GB for larger updates.

Its probably a Laravel recursion bug in a minor version, stay on "laravel/framework": "12.25.*" for now.

2 Likes

Fixed in october/rain v4.0.10

Laravel implemented a polyfill for php8.5 then changed its internal references to use the function. October already defines this function (array_first,array_last). October’s function referenced the Laravel function which referenced back to the October function (instead of the polyfill).

3 Likes

thanks, brilliant, will upgrade again the said project and revert back here

Ran into the same problem recently while trying to

composer require symfony/mailgun-mailer symfony/http-client

Increase of the RAM did not solved it. But I managed to install mailgun-mailer and http-client separatly.
Daft Thanks for the fix, Chris - thanks for reporting, I was about to do that too !!!

1 Like