-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathcomposer-dependency-analyser.php
More file actions
26 lines (23 loc) · 979 Bytes
/
composer-dependency-analyser.php
File metadata and controls
26 lines (23 loc) · 979 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
declare(strict_types=1);
use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;
use ShipMonk\ComposerDependencyAnalyser\Config\ErrorType;
$root = __DIR__;
return (new Configuration())
->disableComposerAutoloadPathScan()
->setFileExtensions(['php'])
->addPathToScan($root . '/src', isDev: false)
->addPathToExclude($root . '/src/bootstrap.php')
->addPathToScan($root . '/src/bootstrap.php', isDev: true)
->addPathToScan($root . '/config', isDev: false)
->addPathToScan($root . '/public/index.php', isDev: false)
->addPathToScan($root . '/yii', isDev: false)
->addPathToScan($root . '/tests', isDev: true)
->ignoreErrorsOnPackages(
['yiisoft/di', 'yiisoft/data'],
[ErrorType::PROD_DEPENDENCY_ONLY_IN_DEV],
)
->ignoreErrorsOnPackages(
['psr/container', 'yiisoft/config', 'yiisoft/aliases', 'yiisoft/request-provider', 'yiisoft/router-fastroute'],
[ErrorType::UNUSED_DEPENDENCY],
);