Skip to content

Commit

Permalink
Fixed nette/utils indirect dependency (#116)
Browse files Browse the repository at this point in the history
* Fixed nette/utils indirect dependency

* CI: setup shipmonk/composer-dependency-analyser to prevent regressions

* Update composer-dependency-analyser.php

* fix nikic/php-parser dependency
  • Loading branch information
staabm authored Apr 29, 2024
1 parent f60fcb1 commit c75a883
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/code_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
name: 'Check Active Classes'
run: vendor/bin/class-leak check src --ansi

-
name: 'Detect composer dependency issues'
run: vendor/bin/composer-dependency-analyser

name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest

Expand Down
11 changes: 11 additions & 0 deletions composer-dependency-analyser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php declare(strict_types = 1);

use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;
use ShipMonk\ComposerDependencyAnalyser\Config\ErrorType;

$config = new Configuration();

return $config
->ignoreErrorsOnPaths([
__DIR__ . '/tests',
], [ErrorType::UNKNOWN_CLASS]);
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"require": {
"php": "^8.2",
"phpstan/phpstan": "^1.10",
"webmozart/assert": "^1.11"
"webmozart/assert": "^1.11",
"nikic/php-parser": "^4.19"
},
"require-dev": {
"phpstan/extension-installer": "^1.3",
Expand All @@ -19,7 +20,7 @@
"tomasvotruba/cognitive-complexity": "^0.2.2",
"tomasvotruba/type-coverage": "^0.2",
"symplify/easy-ci": "^12.0",
"nikic/php-parser": "^4.19"
"shipmonk/composer-dependency-analyser": "^1.5"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/Rules/UnusedPublicClassMethodRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace TomasVotruba\UnusedPublic\Rules;

use Nette\Utils\Arrays;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\CollectedDataNode;
Expand All @@ -18,6 +17,7 @@
use TomasVotruba\UnusedPublic\NodeCollectorExtractor;
use TomasVotruba\UnusedPublic\Templates\TemplateMethodCallsProvider;
use TomasVotruba\UnusedPublic\Templates\UsedMethodAnalyzer;
use TomasVotruba\UnusedPublic\Utils\Arrays;
use TomasVotruba\UnusedPublic\Utils\Strings;

/**
Expand Down

0 comments on commit c75a883

Please sign in to comment.