Memory leak in anonymous function usage on PHP 7.4 #32868
Unanswered
bytestream
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description:
Re-opening #30736 with the intention of starting a new discussion based on new information.
Since that issue I have opened a PHP bug report: https://bugs.php.net/bug.php?id=79519
Nikita identified a possible explanation for the increase in PHP 7.4:
The fix identified in the previous bug report noted the fix upstream - symfony/symfony#32236. That seems like a very narrow fix to me given the wide spread usage of closures in Laravel.
Is it necessary to re - include routes and factories on every test?
I had a quick play with Eloquent Factory usage and the results were a fairly positive step in the right direction:
This cut phpunit memory usage from 3.86 G to 2.6G and my entire test suite still passes but I'm not sure if there's any side effects. I assume similar changes for routes would have a positive effect also.
Welcome to close if you don't intend to fix but your opinion on side effects would be appreciated. This new information should also help others who were reporting high memory usage on the other issue.
Beta Was this translation helpful? Give feedback.
All reactions