Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/code_analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ jobs:
actions:
-
name: 'Active Classes'
run: vendor/bin/class-leak check config bin src rules --skip-type="Rector\PhpSpecToPHPUnit\Rector\Class_\ImplicitLetInitializationRector" --skip-type="Rector\PhpSpecToPHPUnit\Rector\Class_\LearnFromPHPUnitReportRector"
run: vendor/bin/class-leak check config bin src rules --skip-type="Rector\PhpSpecToPHPUnit\Rector\Class_\ImplicitLetInitializationRector"

-
name: "Composer Analyser"
run: vendor/bin/composer-dependency-analyser

name: ${{ matrix.actions.name }}
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions composer-dependency-analyser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

declare(strict_types=1);

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

return (new Configuration())
->ignoreErrorsOnPackage('rector/rector', [ErrorType::DEV_DEPENDENCY_IN_PROD]);
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@
"require": {
"php": ">=8.2",
"symfony/finder": "^7.0",
"tomasvotruba/phpunit-json-result-printer": "^0.1.1",
"webmozart/assert": "^1.11",
"nette/utils": "^4.0",
"symfony/console": "^7.1"
"symfony/console": "^7.1",
"nikic/php-parser": "^5.4",
"phpstan/phpstan": "^2.1"
},
"require-dev": {
"rector/rector": "^2.0",
"nikic/php-parser": "^5.4",
"phpunit/phpunit": "^11.5",
"phpstan/phpstan": "^2.1",
"phpecs/phpecs": "^2.0",
"phpstan/extension-installer": "^1.3",
"tomasvotruba/class-leak": "^2.0",
"tracy/tracy": "^2.10"
"tracy/tracy": "^2.10",
"shipmonk/composer-dependency-analyser": "^1.8"
},
"autoload": {
"psr-4": {
Expand Down
6 changes: 5 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
->withImportNames()
->withPaths([__DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/rules', __DIR__ . '/rules-tests'])
->withSkip([
StringClassNameToClassConstantRector::class => [__DIR__ . '/src/DocFactory.php'],
StringClassNameToClassConstantRector::class => [
__DIR__ . '/src/DocFactory.php',
__DIR__ . '/src/NodeFactory/LetMockNodeFactory.php',
__DIR__ . '/rules/Rector/Class_/PhpSpecClassToPHPUnitClassRector.php',
],
])
->withPreparedSets(
instanceOf: true,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

176 changes: 0 additions & 176 deletions rules/Rector/Class_/LearnFromPHPUnitReportRector.php

This file was deleted.

3 changes: 1 addition & 2 deletions rules/Rector/Class_/PhpSpecClassToPHPUnitClassRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
use PhpParser\Node\Identifier;
use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\Stmt\Class_;
use PHPUnit\Framework\TestCase;
use Rector\PhpSpecToPHPUnit\Naming\PhpSpecRenaming;
use Rector\Privatization\NodeManipulator\VisibilityManipulator;
use Rector\Rector\AbstractRector;
Expand Down Expand Up @@ -49,7 +48,7 @@ public function refactor(Node $node): ?Node
// rename class and parent class
$phpunitTestClassName = $this->phpSpecRenaming->createPHPUnitTestClassName($node);
$node->name = new Identifier($phpunitTestClassName);
$node->extends = new FullyQualified(TestCase::class);
$node->extends = new FullyQualified('PHPUnit\Framework\TestCase');

$this->visibilityManipulator->makeFinal($node);

Expand Down
Loading
Loading