-
-
Notifications
You must be signed in to change notification settings - Fork 938
Closed
Description
Bug report
Running PHPStan 1.4.2 (also occured on 1.3.3, but upgraded to check if it maybe is already fixed):
Running PHPStan through vendor/bin/phpstan clear-result-cache -c phpstan.neon runs into memory problems, when phpstan.neon includes a big baseline.
Code snippet that reproduces the problem
$ vendor/bin/phpstan clear-result-cache -c phpstan-debug.neon
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in phar:///export/vendor-bin/phpstan/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/neon/src/Neon/Lexer.php on line 43
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in phar:///export/vendor-bin/phpstan/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/neon/src/Neon/Lexer.php on line 43
Expected output
I run analyse with --memory-limit so it's not an issue there, but clear-result-cache does not support this parameter.
I don't understand why it's relevant to load the baseline, when I just want to clear the result cache? No matter how big the base line is - result cache should be cleared. Only relevant setting processed should be the tmpDir configuration.
A workaround could be supporting --memory-limit for clear-result-cache as well?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels