fix: memory-limit option for phpstan (#4900)

This might only be a problem for newer phpstan versions (2.1.1 here).

If you try to run `phpstan` the way ale will when it builds the option, you will get something like:

```
The "--memory-limit" option requires a value.
```

It wants you to use `--memory-limit=-1` instead.
This commit is contained in:
Kevin Quinn
2025-02-07 04:12:54 -05:00
committed by GitHub
parent 305e1c2fb1
commit 62af9f2650
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ function! ale_linters#php#phpstan#GetCommand(buffer, version) abort
let l:memory_limit = ale#Var(a:buffer, 'php_phpstan_memory_limit')
let l:memory_limit_option = !empty(l:memory_limit)
\ ? ' --memory-limit ' . ale#Escape(l:memory_limit)
\ ? ' --memory-limit=' . ale#Escape(l:memory_limit)
\ : ''
let l:level = ale#Var(a:buffer, 'php_phpstan_level')