Be able to set memory limit on each process
llaville opened this issue · comments
Hello
Current process is built without PHP -c
option.
See https://github.com/overtrue/phplint/blob/8.1/src/Linter.php#L157-L167
It could be usefull for some users to add a php.ini
with a memory_limit
constraint like this one https://www.php.net/manual/en/configuration.file.php#example-27
@overtrue Finally after thinking about this request, it has non sense to use an external config file only to override PHP memory limit.
This is the reason why I changed title of this request that become ability to set memory limit for each linter process.
In .phplint.yml
, we can find a new entry
memory_limit:
That can be
- empty (no need to override default system PHP memory limit)
-1
to have no limit- accept values defined by https://www.php.net/manual/en/faq.using.php#faq.using.shorthandbytes
I'll propose a PR following this way
Thanks @overtrue