Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Remove outside any set, as not much valueable #5998

Merged
merged 3 commits into from
Jun 21, 2024
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
10 changes: 4 additions & 6 deletions composer-dependency-analyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@

return $config
->addPathToScan(__DIR__ . '/build/config', false)
->ignoreErrorsOnPackage('phpunit/phpunit', [ErrorType::DEV_DEPENDENCY_IN_PROD]) // prepared test tooling
->ignoreErrorsOnPackage('react/promise', [ErrorType::UNUSED_DEPENDENCY]) // pinned v3.x version
->ignoreErrorsOnPackage(
'nette/robot-loader',
[ErrorType::DEV_DEPENDENCY_IN_PROD]
) // https://github.com/rectorphp/rector-src/pull/5777#discussion_r1541304301
// prepared test tooling
->ignoreErrorsOnPackage('phpunit/phpunit', [ErrorType::DEV_DEPENDENCY_IN_PROD])
// pinned v3.x version
->ignoreErrorsOnPackage('react/promise', [ErrorType::UNUSED_DEPENDENCY])
->ignoreErrorsOnPaths([
__DIR__ . '/stubs',
__DIR__ . '/tests',
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
"webmozart/assert": "^1.11"
},
"require-dev": {
"nette/robot-loader": "^4.0",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan-phpunit": "^1.4",
"phpstan/phpstan-webmozart-assert": "^1.2.6",
Expand Down
1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ parameters:
- bin/rector.php
# for config class reflection
- src/Bootstrap/ExtensionConfigResolver.php
- src/DependencyInjection/LazyContainerFactory.php
- src/Validation/RectorConfigValidator.php

# use of internal phpstan classes
Expand Down
2 changes: 2 additions & 0 deletions src/Config/Level/DeadCodeLevel.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Rector\DeadCode\Rector\Cast\RecastingRemovalRector;
use Rector\DeadCode\Rector\ClassConst\RemoveUnusedPrivateClassConstantRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveEmptyClassMethodRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveNullTagValueNodeRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedConstructorParamRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodParameterRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPrivateMethodRector;
Expand Down Expand Up @@ -71,6 +72,7 @@ final class DeadCodeLevel
*/
public const RULES = [
// easy picks
RemoveNullTagValueNodeRector::class,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TomasVotruba I think this should be on the last instead of first if needed to be added into set, that have save belt on RemveUseless*TagRector already, see PR:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RemoveUnusedForeachKeyRector::class,
RemoveDuplicatedArrayKeyRector::class,
RecastingRemovalRector::class,
Expand Down
6 changes: 0 additions & 6 deletions src/DependencyInjection/LazyContainerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@
use Rector\StaticTypeMapper\PhpParser\StringNodeMapper;
use Rector\StaticTypeMapper\PhpParser\UnionTypeNodeMapper;
use Rector\StaticTypeMapper\StaticTypeMapper;
use Rector\Utils\Command\OutsideAnySetCommand;
use Symfony\Component\Console\Application;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Style\SymfonyStyle;
Expand Down Expand Up @@ -419,11 +418,6 @@ public function create(): RectorConfig
->needs('$rectors')
->giveTagged(RectorInterface::class);

// dev
if (class_exists(OutsideAnySetCommand::class)) {
$rectorConfig->singleton(OutsideAnySetCommand::class);
}

$rectorConfig->singleton(FileProcessor::class);
$rectorConfig->singleton(PostFileProcessor::class);

Expand Down
81 changes: 0 additions & 81 deletions utils/Command/OutsideAnySetCommand.php

This file was deleted.

32 changes: 0 additions & 32 deletions utils/Finder/RectorClassFinder.php

This file was deleted.

59 changes: 0 additions & 59 deletions utils/Finder/SetRectorClassesResolver.php

This file was deleted.