diff --git a/includes/generic/phpstan.inc.bash b/includes/generic/phpstan.inc.bash index 317af66..1492b6c 100644 --- a/includes/generic/phpstan.inc.bash +++ b/includes/generic/phpstan.inc.bash @@ -1,5 +1,6 @@ set +e phpStanExitCode=99 +phpStanMemoryLimit=${phpStanMemoryLimit:-256M} phpstanNoProgress=() if [[ "true" == "$CI" ]] then @@ -8,7 +9,7 @@ fi while (( phpStanExitCode > 0 )) do set -x - phpNoXdebug -f bin/phpstan.phar -- analyse ${pathsToCheck[@]} -l7 -c "$phpstanConfigPath" ${phpstanNoProgress[@]:-} + phpNoXdebug -d memory_limit=${phpStanMemoryLimit} -f bin/phpstan.phar -- analyse ${pathsToCheck[@]} -l7 -c "$phpstanConfigPath" ${phpstanNoProgress[@]:-} phpStanExitCode=$? set +x #exit code 0 = fine, 1 = ran fine but found errors, else it means it crashed