pb30/phpstan-composer-analysis
最新稳定版本:v1.1.0
Composer 安装命令:
composer require --dev pb30/phpstan-composer-analysis
包简介
关键字:
README 文档
README
PHPStan Wrapper for Composer Dependency Analysis
This is a PHPStan Extension for shipmonk/composer-dependency-analyser.
This allows you to use composer-dependency-analyser without adding additional steps in your CI pipeline.
Installation
composer require --dev pb30/phpstan-composer-analysis- Add the following to your
phpstan.neonincludes:- vendor/pb30/phpstan-composer-analysis/extension.neon
Usage
Composer dependency issues are reported as standard PHPStan errors.
You can ignore any errors or false positives using the standard PHPStan ignoreErrors configuration or through the settings below..
------ ---------------------------------------------------------------------
Line app/DateHelpers.php
------ ---------------------------------------------------------------------
17 Shadow dependency detected: nesbot/carbon using Carbon\CarbonPeriod
💡 Class is used, but is not specified in composer.json
------ ---------------------------------------------------------------------
------ -------------------------------------------------------------------------
Line app/MyHelper.php
------ -------------------------------------------------------------------------
19 Dev dependency used in production: fakerphp/faker using Faker\Generator
💡 This should probably be moved to "require" section in composer.json
------ -------------------------------------------------------------------------
------ ---------------------------------------------------------------------------------
Line composer.json
------ ---------------------------------------------------------------------------------
-1 Prod dependency used only in dev paths: spatie/once
💡 This should probably be moved to "require-dev" section in composer.json
-1 Unused dependency detected: predis/predis
💡 This is are listed in composer.json, but no usage was found in scanned paths
------ ---------------------------------------------------------------------------------
Configuration
Several settings for composer-dependency-analyser can be configured in phpstan.neon:
parameters: composerAnalysis: additionalProdPaths: - config - routes additionalDevPaths: - database/seeders ignoreAllShadowDeps: false ignoreAllDevDepsInProd: false ignoreAllProdDepsInDev: false ignoreAllUnusedDeps: false disableExtensionsAnalysis: false ignoreSpecificUnusedDeps: - laravel/tinker
统计信息
- 总下载量: 67.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 17
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-05-10