mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 19:53:14 +01:00
Merge pull request #76 from RectorPHP/dynamic-ns-fixes
[Rector] fix NamespaceReplacerRector order
This commit is contained in:
commit
6ebd1a85aa
@ -24,6 +24,8 @@ final class NamespaceReplacerRector extends AbstractRector
|
||||
*/
|
||||
public function __construct(array $oldToNewNamespaces)
|
||||
{
|
||||
krsort($oldToNewNamespaces);
|
||||
|
||||
$this->oldToNewNamespaces = $oldToNewNamespaces;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
rectors:
|
||||
Rector\Rector\Dynamic\NamespaceReplacerRector:
|
||||
# todo: add autosort to make complex first; allows reverse order
|
||||
'OldNamespaceWith\OldSplitNamespace': 'NewNamespaceWith\NewSplitNamespace'
|
||||
'OldNamespace': 'NewNamespace'
|
||||
'OldNamespaceWith\OldSplitNamespace': 'NewNamespaceWith\NewSplitNamespace'
|
||||
|
Loading…
x
Reference in New Issue
Block a user