Skip to content

Commit d5cf1e2

Browse files
authored
cleanup, remove unused LearnFromPHPUnitReportRector, add dependency analyser (#53)
* cleanup, remove unused LearnFromPHPUnitReportRector, add dependency analyser * skip rector, to avoid circular dep
1 parent 344eabd commit d5cf1e2

22 files changed

+47
-535
lines changed

.github/workflows/code_analysis.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ jobs:
1818
actions:
1919
-
2020
name: 'Active Classes'
21-
run: vendor/bin/class-leak check config bin src rules --skip-type="Rector\PhpSpecToPHPUnit\Rector\Class_\ImplicitLetInitializationRector" --skip-type="Rector\PhpSpecToPHPUnit\Rector\Class_\LearnFromPHPUnitReportRector"
21+
run: vendor/bin/class-leak check config bin src rules --skip-type="Rector\PhpSpecToPHPUnit\Rector\Class_\ImplicitLetInitializationRector"
22+
23+
-
24+
name: "Composer Analyser"
25+
run: vendor/bin/composer-dependency-analyser
2226

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

composer-dependency-analyser.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;
6+
use ShipMonk\ComposerDependencyAnalyser\Config\ErrorType;
7+
8+
return (new Configuration())
9+
->ignoreErrorsOnPackage('rector/rector', [ErrorType::DEV_DEPENDENCY_IN_PROD]);

composer.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,19 @@
1010
"require": {
1111
"php": ">=8.2",
1212
"symfony/finder": "^7.0",
13-
"tomasvotruba/phpunit-json-result-printer": "^0.1.1",
14-
"webmozart/assert": "^1.11",
1513
"nette/utils": "^4.0",
16-
"symfony/console": "^7.1"
14+
"symfony/console": "^7.1",
15+
"nikic/php-parser": "^5.4",
16+
"phpstan/phpstan": "^2.1"
1717
},
1818
"require-dev": {
1919
"rector/rector": "^2.0",
20-
"nikic/php-parser": "^5.4",
2120
"phpunit/phpunit": "^11.5",
22-
"phpstan/phpstan": "^2.1",
2321
"phpecs/phpecs": "^2.0",
2422
"phpstan/extension-installer": "^1.3",
2523
"tomasvotruba/class-leak": "^2.0",
26-
"tracy/tracy": "^2.10"
24+
"tracy/tracy": "^2.10",
25+
"shipmonk/composer-dependency-analyser": "^1.8"
2726
},
2827
"autoload": {
2928
"psr-4": {

rector.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@
99
->withImportNames()
1010
->withPaths([__DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/rules', __DIR__ . '/rules-tests'])
1111
->withSkip([
12-
StringClassNameToClassConstantRector::class => [__DIR__ . '/src/DocFactory.php'],
12+
StringClassNameToClassConstantRector::class => [
13+
__DIR__ . '/src/DocFactory.php',
14+
__DIR__ . '/src/NodeFactory/LetMockNodeFactory.php',
15+
__DIR__ . '/rules/Rector/Class_/PhpSpecClassToPHPUnitClassRector.php',
16+
],
1317
])
1418
->withPreparedSets(
1519
instanceOf: true,

rules-tests/Rector/Class_/LearnFromPHPUnitReportRector/Fixture/more_than_once.php.inc

Lines changed: 0 additions & 31 deletions
This file was deleted.

rules-tests/Rector/Class_/LearnFromPHPUnitReportRector/Fixture/not_at_all.php.inc

Lines changed: 0 additions & 30 deletions
This file was deleted.

rules-tests/Rector/Class_/LearnFromPHPUnitReportRector/LearnFromPHPUintReportRectorTest.php

Lines changed: 0 additions & 28 deletions
This file was deleted.

rules-tests/Rector/Class_/LearnFromPHPUnitReportRector/Source/phpunit-report.txt

Lines changed: 0 additions & 23 deletions
This file was deleted.

rules-tests/Rector/Class_/LearnFromPHPUnitReportRector/config/configured_rule.php

Lines changed: 0 additions & 12 deletions
This file was deleted.

rules/Rector/Class_/LearnFromPHPUnitReportRector.php

Lines changed: 0 additions & 176 deletions
This file was deleted.

0 commit comments

Comments
 (0)