If you need to debug PHPStan itself or your custom extensions and want to run PHPStan with XDebug enabled, pass this option. PHPStan turns off XDebug if it’s enabled to achieve better performance. Specifies the memory limit in the same format php.ini accepts. Learn more about output formats » -no-progress # Relative paths are resolved based on the current working directory. If your application uses a custom autoloader, you should set it up and register in a PHP file that is passed to this CLI option. However you can pass -allow-empty-baseline alongside -generate-baseline to allow an empty baseline file to be generated.
CMD C EXIT CODE
If there are no errors that the baseline would consist of, the exit code is 1.īy default PHPStan will not generate an empty baseline. Exit code 0 means that the baseline generation was successful and the baseline is not empty. Please note that the exit code differs in this case. This guarantees that the baseline isn’t double-used and that the command functions correctly. If you already use the baseline, the path to the baseline file should match the one already in use. Accepts a path ( -generate-baseline foo.neon) which defaults to phpstan-baseline.neon. Specifies the path to a configuration file. When looking for files in directories, various configuration options are respected. vendor/bin/phpstan analyse Īs you can pass one or multiple paths to PHP files or directories separated by spaces. To analyse your code, run the analyse command. PHPStan’s executable file is installed in Composer’s bin-dir which defaults to vendor/bin.