Skip to content

Commit 5f9094b

Browse files
committed
Adds a dependency-analyse step and fixes found issues
1 parent 562fade commit 5f9094b

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"require": {
1313
"php": ">=8.1",
1414
"sebastian/diff": "^7.0.0||^6.0.1||^5.0||^4.0.3",
15-
"symfony/console": "^7.2.1||^v5.4.8"
15+
"symfony/console": "^7.2.1||^v5.4.8",
16+
"symfony/finder": "^7.2.1||^v5.4.8"
1617
},
1718
"autoload": {
1819
"psr-4": {
@@ -36,6 +37,7 @@
3637
"lpv:application-version-guard": "Checks that the application version matches the given Git tag.",
3738
"lpv:application-phar-version-guard": "Checks that the PHAR version matches the given Git tag.",
3839
"lpv:static-analyse": "Runs a static code analysis via PHPStan.",
40+
"lpv:dependency-analyse": "Runs a dependency analysis to find shadowed dependencies.",
3941
"lpv:validate-gitattributes": "Checks the leanness of this package.",
4042
"lpv:pre-commit-check": "Does a final (aggregated) check before committing."
4143
},
@@ -50,10 +52,12 @@
5052
"lpv:static-analyse": "phpstan analyse --configuration phpstan.neon.dist",
5153
"lpv:validate-gitattributes": "bin/lean-package-validator validate",
5254
"lpv:spell-check": "./vendor/bin/peck",
55+
"lpv:dependency-analyse": "./vendor/bin/composer-dependency-analyser",
5356
"lpv:pre-commit-check": [
5457
"@lpv:test",
5558
"@lpv:cs-lint",
5659
"@lpv:static-analyse",
60+
"@lpv:dependency-analyse",
5761
"@lpv:spell-check",
5862
"@lpv:application-version-guard"
5963
]
@@ -71,6 +75,7 @@
7175
"php-mock/php-mock-phpunit": "^2.7||^1.1",
7276
"phpstan/phpstan": "^2.1",
7377
"phpunit/phpunit": "^11.4.4||^10.5.25",
78+
"shipmonk/composer-dependency-analyser": "^1.8",
7479
"zenstruck/console-test": "^1.7"
7580
}
7681
}

tests/Commands/InitCommandTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace Stolt\LeanPackage\Tests\Commands;
66

7-
use phpmock\functions\FixedValueFunction;
8-
use phpmock\MockBuilder;
97
use PHPUnit\Framework\Attributes\RunInSeparateProcess;
108
use PHPUnit\Framework\Attributes\Test;
119
use Stolt\LeanPackage\Analyser;

tests/Commands/ValidateCommandTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66

77
use Mockery;
88
use Mockery\MockInterface;
9-
use phpmock\functions\FixedValueFunction;
10-
use phpmock\MockBuilder;
119
use PHPUnit\Framework\Attributes\DataProvider;
1210
use PHPUnit\Framework\Attributes\Group;
1311
use PHPUnit\Framework\Attributes\RunInSeparateProcess;

0 commit comments

Comments
 (0)