Issue #3529507 by nicxvan, xjm, alexpott: Allow setting memory limit to -1 for phpstan precommit hooks (cherry picked from commit 2ffd3412)