mirror of
https://github.com/rectorphp/rector.git
synced 2025-04-21 07:52:01 +02:00
[PSR4] Fix extra slash in NormalizeNamespaceByPSR4ComposerAutoloadRector
This commit is contained in:
parent
9eb47d1280
commit
1d72b06b2f
@ -118,6 +118,9 @@ final class NormalizeNamespaceByPSR4ComposerAutoloadRector extends AbstractRecto
|
||||
$psr4Autoloads = $this->psR4AutoloadPathsProvider->provide();
|
||||
|
||||
foreach ($psr4Autoloads as $namespace => $path) {
|
||||
// remove extra slash
|
||||
$path = rtrim($path, '/');
|
||||
|
||||
if (Strings::startsWith($smartFileInfo->getRelativeDirectoryPath(), $path)) {
|
||||
$expectedNamespace = $namespace . $this->resolveExtraNamespace($smartFileInfo, $path);
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
services:
|
||||
Rector\PSR4\Rector\Namespace_\NormalizeNamespaceByPSR4ComposerAutoloadRector: ~
|
||||
|
||||
parameters:
|
||||
exclude_paths:
|
||||
- "/Fixture/"
|
||||
|
Loading…
x
Reference in New Issue
Block a user