Rector: php70 refactor results in fatal error with equal named classes (but different namespace)

Created on 31 Oct 2019  路  1Comment  路  Source: rectorphp/rector

| 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'
bug

Most helpful comment

Thanks for great report!

>All comments

Thanks for great report!

Was this page helpful?
0 / 5 - 0 ratings