Rector: PSR-4 rector - when filename is different to any class in file, it stays untouched

Created on 1 May 2019  路  3Comments  路  Source: rectorphp/rector

Config:

services:
    Rector\Rector\Psr4\MultipleClassFileToPsr4ClassesRector: ~

File A.php:

class B { }
Class C { }

command:

vendor/bin/rector process A.php

Result is that A.php stays with both classes and B.php and C.php are created.

I would expect either that A.php will be deleted or at least it will be edited, because this creates problem with duplicate classes.

bug

All 3 comments

Goodie! Thank you, will try it out

Confirming it works as expected now 馃憤

Thank you!

Was this page helpful?
0 / 5 - 0 ratings