Skip to content

Commit f819f70

Browse files
authored
Rewrite namespace before module ID
If the module ID is contained within the namespace, renaming the module ID before the namespace may prevent the latter from being renamed.
1 parent 4524d16 commit f819f70

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/rewrite-module-id.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@
5050

5151
// Replace in files
5252
$fileContent = file_get_contents($file);
53+
$fileContent = str_replace($oldNamespace, $newNamespace, $fileContent);
5354
$fileContent = str_replace($oldModuleId, $newModuleId, $fileContent);
5455
$fileContent = str_replace(ucfirst($oldModuleId), ucfirst($newModuleId), $fileContent);
5556
$fileContent = str_replace(dashesToCamelCase($oldModuleId), dashesToCamelCase($newModuleId), $fileContent);
5657
$fileContent = str_replace(ucfirst(dashesToCamelCase($oldModuleId)), ucfirst(dashesToCamelCase($newModuleId)), $fileContent);
57-
$fileContent = str_replace($oldNamespace, $newNamespace, $fileContent);
5858
file_put_contents($file, $fileContent);
5959
print "Searched&replaced in: " . $file . "\n";
6060

0 commit comments

Comments
 (0)