Runs PhpStan against your build.
PHPStan focuses on finding errors in your code without actually running it. It catches whole classes of bugs even before you write tests for the code. It moves PHP closer to compiled languages in the sense that the correctness of each line of the code can be checked before you run the actual line.
- allowed_errors [int, optional] - Allow
nerrors in a successful build (default: 0). Use -1 to allow unlimited warnings.
test:
phpstan: ~The following general options can also be used:
- allow_failures [bool, optional] - If true, allow the build to succeed even if this plugin fails.
- directory [string, optional] - This option lets you specify the tests directory to run.
- ignore [optional] - A list of files / paths to ignore (default: build_settings > ignore).
- binary_name [string|array, optional] - Allows you to provide a name of the binary.
- binary_path [string, optional] - Allows you to provide a path to the binary vendor/bin, or a system-provided.
- priority_path [string, optional] - Priority path for locating the plugin binary (Allowable values:
local(Local current build path) |global(Global PHP Censor 'vendor/bin' path) |system(OS System binaries path, /bin:/usr/bin etc.). Default order: local -> global -> system)
PHPStan requires PHP >= 7.1. You have to run it in environment with PHP 7.x but the actual code does not have to use PHP 7.x features. (Code written for PHP 5.6 and earlier can run on 7.x mostly unmodified.)