Skip to content

Commit

Permalink
Remove FinalizeClassesWithoutChildrenRector
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Feb 7, 2024
1 parent 0ad287a commit d2ae5f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ You can find and compare releases at the [GitHub release page](https://github.co

## Unreleased

## v2.3.0

- Remove `FinalizeClassesWithoutChildrenRector`

## v2.2.0

### Added
Expand Down
14 changes: 0 additions & 14 deletions config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,11 @@

use Rector\Config\RectorConfig;
use Rector\Php81\Rector\Array_\FirstClassCallableRector;
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
use Rector\Transform\Rector\FuncCall\FuncCallToNewRector;

/** Configure rector with PHP rules. */
function config(RectorConfig $rectorConfig): void
{
/**
* Sometimes fails to recognize children, see https://github.com/rectorphp/rector/blob/main/docs/static_reflection_and_autoload.md#troubleshooting,
* and never recognizes when a class is mocked (which final classes do not allow for).
*
* To ignore this rule, use the following:
*
* $rectorConfig->skip([
* FinalizeClassesWithoutChildrenRector::class => [
* __DIR__ . '/app/MyMockedService::class,
* ],
* ]);
*/
$rectorConfig->rule(FinalizeClassesWithoutChildrenRector::class);
$rectorConfig->rule(FirstClassCallableRector::class);
}

Expand Down

0 comments on commit d2ae5f4

Please sign in to comment.