Skip to content

PrivatizeFinalClassMethodRector: invalid change on unknown parents #8119

@staabm

Description

@staabm

Bug Report

Subject Details
Rector version last dev-main
Installed as composer dependency

Minimal PHP Code Causing Issue

See https://getrector.com/demo/75127a7c-d760-48b6-ad28-f02e6ba68362

<?php

abstract class rex_console_command extends Command
{}

final class rex_command_demo_fullpage_install extends rex_console_command
{
    protected function configure(): void
    {}
}

Responsible rules

  • PrivatizeFinalClassMethodRector

Expected Behavior

when the inheritance chain of the current class contains a type which is not known to rector, it should not change code

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions