Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase PHPStan memory_limit #10

Open
alexmerlin opened this issue Nov 22, 2024 · 0 comments
Open

Increase PHPStan memory_limit #10

alexmerlin opened this issue Nov 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@alexmerlin
Copy link
Member

Bug Report

Running composer static-analysis with default config throws an error:

> phpstan analyse
Note: Using configuration file /var/www/light.dotkernel.localhost/html/phpstan.neon.
 170/170 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 -- ---------------------------------------------------------------------------------------------------
     Error
 -- ---------------------------------------------------------------------------------------------------
     Child process error: PHPStan process crashed because it reached configured PHP memory limit: 128M
     Increase your memory limit in php.ini or run PHPStan with --memory-limit CLI option.
      while running parallel worker
 -- ---------------------------------------------------------------------------------------------------



 [ERROR] Found 1 error


⚠️  Result is incomplete because of severe errors. ⚠️
   Fix these errors first and then re-run PHPStan
   to get all reported errors.

Script phpstan analyse handling the static-analysis event returned with error code 1
Q A
Version(s) 1.0.1

Summary

Running PHPStan check with 128M of memory will run out of memory.
We should increase memory_limit to 256M - best place for this is probably in the composer command.

Current behavior

With the default memory_limit=128M on our WSL containers, PHPStan runs out of memory.

How to reproduce

Run the command composer static-analysis

Expected behavior

PHPStan needs to finish the analysis without running out of memory.

@alexmerlin alexmerlin added the bug Something isn't working label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant