Download the PHP package staabm/phpstan-baseline-analysis without Composer
On this page you can find all versions of the php package staabm/phpstan-baseline-analysis. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package phpstan-baseline-analysis
Analyzes phpstan baseline files
Analyzes PHPStan baseline files and creates aggregated error trend-reports.
You need at least one of the supported PHPStan RuleSets/Rules configured in your project, to get meaningful results.
Installation
Supported Rules
PHPStan RuleSets
PHPStan Rules
- PHPStan\Rules\PhpDoc\InvalidPhpDocTagValueRule
Symplify PHPStan Rules
- Symplify\PHPStanRules\Rules\Explicit\NoMixedMethodCallerRule
- Symplify\PHPStanRules\Rules\Explicit\NoMixedPropertyFetcherRule
tomasvotruba/cognitive-complexity Rules
- TomasVotruba\CognitiveComplexity\Rules\ClassLikeCognitiveComplexityRule
tomasvotruba/type-coverage Rules
- TomasVotruba\TypeCoverage\Rules\ParamTypeCoverageRule
- TomasVotruba\TypeCoverage\Rules\PropertyTypeCoverageRule
- TomasVotruba\TypeCoverage\Rules\ReturnTypeCoverageRule
tomasvotruba/unused-public Rules
- TomasVotruba\UnusedPublic\Rules\UnusedPublicClassConstRule
- TomasVotruba\UnusedPublic\Rules\UnusedPublicClassMethodRule
- TomasVotruba\UnusedPublic\Rules\UnusedPublicPropertyRule
example report
Starting from the current directory, the command will recursively search for files matching the glob pattern and report a summary for each baseline found.
example error filtering
Filter a existing baseline and output only errors NOT matching the given filter key:
[!TIP] This can be helpful to remove a class of errors out of an existing baseline, so PHPStan will start reporting them again.
Filter a existing baseline and output only errors matching the given filter key:
Currently supported filter keys can be found in the source.
example graph analysis
example trend analysis
the following example shows the evolution of errors in your phpstan baselines. see the trend between 2 different points in time like:
Usage example in a scheduled GitHub Action with Mattermost notification
Copy the following workflow into your repository. Make sure to adjust as needed:
- adjust the cron schedule pattern
- actions/checkout might require a token - e.g. for private repos
- adjust the comparison period, as you see fit
- adjust the notification to your needs - e.g. use Slack, Discord, E-Mail,..
💌 Give back some love
Consider supporting the project, so we can make this tool even better even faster for everyone.
All versions of phpstan-baseline-analysis with dependencies
nette/neon Version ^3.2
symfony/polyfill-php80 Version ^1.26
thecodingmachine/safe Version ^1.3 || ^2.0