PHPStan: Child process error (exit code 255): PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in

When running PHPStan, I’m getting several error messages:

Child process error (exit code 255): PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in …

PHPStan process crashed because it reached configured PHP memory limit: 128M

See my own answer below.