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
14 changes: 14 additions & 0 deletions packages/Parallel/WorkerRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ public function run(Encoder $encoder, Decoder $decoder, Configuration $configura
$errorAndFileDiffs,
$currentErrorsAndFileDiffs
);

// warn about deprecated @noRector annotation
if (! str_ends_with($file->getFilePath(), 'WorkerRunner.php')
&& (
str_contains($file->getFileContent(), ' @noRector ') ||
str_contains($file->getFileContent(), ' @norector ')
)
) {
$systemErrors[] = new SystemError(
'The @noRector annotation was deprecated and removed due to hiding fixed errors. Use more precise $rectorConfig->skip() method in the rector.php config.',
$file->getFilePath()
);
continue;
}
} catch (Throwable $throwable) {
++$systemErrorsCount;
$systemErrors = $this->collectSystemErrors($systemErrors, $throwable, $filePath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@
use PHPStan\PhpDocParser\Ast\Type\TypeNode;

/**
* @noRector final on purpose, so it can be extended by 3rd party
* @api
*/
class SimplePhpDocNode extends PhpDocNode
final class SimplePhpDocNode extends PhpDocNode
{
public function getParam(string $desiredParamName): ?ParamTagValueNode
{
Expand Down
129 changes: 0 additions & 129 deletions src/Exclusion/ExclusionManager.php

This file was deleted.

9 changes: 0 additions & 9 deletions src/Rector/AbstractRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
use Rector\Core\Console\Output\RectorOutputStyle;
use Rector\Core\Contract\Rector\PhpRectorInterface;
use Rector\Core\Exception\ShouldNotHappenException;
use Rector\Core\Exclusion\ExclusionManager;
use Rector\Core\FileSystem\FilePathHelper;
use Rector\Core\Logging\CurrentRectorProvider;
use Rector\Core\NodeDecorator\CreatedByRuleDecorator;
Expand Down Expand Up @@ -93,8 +92,6 @@ abstract class AbstractRector extends NodeVisitorAbstract implements PhpRectorIn

private SimpleCallableNodeTraverser $simpleCallableNodeTraverser;

private ExclusionManager $exclusionManager;

private CurrentRectorProvider $currentRectorProvider;

private CurrentNodeProvider $currentNodeProvider;
Expand Down Expand Up @@ -127,7 +124,6 @@ public function autowire(
SimpleCallableNodeTraverser $simpleCallableNodeTraverser,
NodeFactory $nodeFactory,
PhpDocInfoFactory $phpDocInfoFactory,
ExclusionManager $exclusionManager,
StaticTypeMapper $staticTypeMapper,
CurrentRectorProvider $currentRectorProvider,
CurrentNodeProvider $currentNodeProvider,
Expand All @@ -150,7 +146,6 @@ public function autowire(
$this->simpleCallableNodeTraverser = $simpleCallableNodeTraverser;
$this->nodeFactory = $nodeFactory;
$this->phpDocInfoFactory = $phpDocInfoFactory;
$this->exclusionManager = $exclusionManager;
$this->staticTypeMapper = $staticTypeMapper;
$this->currentRectorProvider = $currentRectorProvider;
$this->currentNodeProvider = $currentNodeProvider;
Expand Down Expand Up @@ -392,10 +387,6 @@ private function shouldSkipCurrentNode(Node $node): bool
return true;
}

if ($this->exclusionManager->isNodeSkippedByRector($node, static::class)) {
return true;
}

$filePath = $this->file->getFilePath();
if ($this->skipper->shouldSkipElementAndFilePath($this, $filePath)) {
return true;
Expand Down
35 changes: 0 additions & 35 deletions tests/Exclusion/ExclusionManagerTest.php

This file was deleted.

39 changes: 0 additions & 39 deletions tests/Exclusion/Fixture/different_norector.php.inc

This file was deleted.

13 changes: 0 additions & 13 deletions tests/Exclusion/Fixture/skip_comment_with_spaces.php.inc

This file was deleted.

20 changes: 0 additions & 20 deletions tests/Exclusion/Fixture/skip_docblock_on_parent_norector.php.inc

This file was deleted.

20 changes: 0 additions & 20 deletions tests/Exclusion/Fixture/skip_docblock_on_self_no_rector.php.inc

This file was deleted.

24 changes: 0 additions & 24 deletions tests/Exclusion/Fixture/skip_other_docblocks.php.inc

This file was deleted.

16 changes: 0 additions & 16 deletions tests/Exclusion/Source/SomeRector.php

This file was deleted.

12 changes: 0 additions & 12 deletions tests/Exclusion/config/some_config.php

This file was deleted.