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

Remove FinalizeClassesWithoutChildrenRector #3

Merged
merged 1 commit into from
Feb 7, 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
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