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

Support and pass a --memory-limit option to PHPStan #115

Closed
GueGuerreiro opened this issue Oct 28, 2019 · 0 comments
Closed

Support and pass a --memory-limit option to PHPStan #115

GueGuerreiro opened this issue Oct 28, 2019 · 0 comments

Comments

@GueGuerreiro
Copy link
Contributor

@shaal shared the following error he was getting on the Drupal Slack channel:

PHPStan crashed in the previous run probably because of excessive memory consumption.
It consumed around 508 MB of memory.

To avoid this issue, allow to use more memory with the --memory-limit option.

He wasn't able to to use the --memory-limit option, because although phpstan does support it, drupal-check currently has no way to pass that argument over to it.

On

$inceptionResult = CommandHelper::begin(
                $input,
                $output,
                $input->getArgument('path'),
                null,
                null,
                null,
                $configuration,
                null,
                false
            );

We can add the memory-limit option as the fifth parameter. We don't even really need to perform any validation on the field, as that's already being handled by phpstan itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants