Skip to content

php70 refactor results in fatal error with equal named classes (but different namespace) #2226

@clxmstaab

Description

@clxmstaab
Subject Details
Rector version v0.5.20 (invoke vendor/bin/rector --version)
PHP version PHP 7.2.9 (invoke php -v)
Full Command rector process lib --set php70

Current Behaviour

Minimal PHP Code Causing Issue

image

leads to

Fatal error:  Cannot declare class portable\crossSelling\Warenkorb because the name is already in use in /home/runner/work/php-clxmobilenet-portable/php-clxmobilenet-portable/lib/portable/crossSelling/Warenkorb.php on line 12

Expected Behaviour

No Fatal error

my rector.yml

parameters:
  auto_import_names: true
  php_version_features: '7.0'
  autoload_paths:
    - 'bootstrap.php'

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