Skip to content

Incorrect behavior of MergeInterfacesRector #9206

@bobvandevijver

Description

@bobvandevijver

Bug Report

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

Minimal PHP Code Causing Issue

See https://getrector.com/demo/086f012b-24f3-4f61-a483-446b905148c6

<?php

namespace App\SomeNameSpace;
use App\Interfaces\SomeInterface;    
final class DemoFile implements SomeInterface
{
}

Responsible rules

  • MergeInterfacesRector

Expected Behavior

The replaced interface does not use the correct namespace, as it now implements App\SomeNameSpace\App\Interfaces\SomeOtherInterface. In other words, the leading \ is missing.

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