Skip to content

Rename namespace failed on symfony based skeleton #6837

@alexander-schranz

Description

@alexander-schranz

Bug Report

Subject Details
Rector version v0.12.5

Minimal PHP Code Causing Issue

Currently could not create a reproduceable on the getrector demo instead I have created a repository where the problems appears.

https://github.com/alexander-schranz/rector-namespace-rename-reproducable

PHP Fatal error: Uncaught TypeError: RectorPrefix20211123\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator::__construct(): Argument #1 ($container) must be of type RectorPrefix20211123\Symfony\Component\DependencyInjection\ContainerBuilder, Symfony\Component\DependencyInjection\ContainerBuilder given, called in /private/tmp/skeleton/vendor/symfony/framework-bundle/Kernel/MicroKernelTrait.php on line 155 and defined in /private/tmp/skeleton/vendor/rector/rector/vendor/symfony/dependency-injection/Loader/Configurator/ContainerConfigurator.php:37

Expected Behaviour

Should not fail and should in the second run fix the AUTO_IMPORT flag when the directory is renamed correctly.

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