1
0
Fork 0

Fix class renaming in plugin manager

pull/11459/head
Jordi Boggiano 2023-05-07 14:53:17 +02:00
parent 2b58f2c625
commit a79eef2949
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ class PluginManager
if ($separatorPos) { if ($separatorPos) {
$className = substr($class, $separatorPos + 1); $className = substr($class, $separatorPos + 1);
} }
$code = Preg::replace('{^((?:(?:final|readonly)\s+)+(?:\s*))class\s+('.preg_quote($className).')}mi', '$1class $2_composer_tmp'.self::$classCounter, $code, 1); $code = Preg::replace('{^((?:(?:final|readonly)\s+)*(?:\s*))class\s+('.preg_quote($className).')}mi', '$1class $2_composer_tmp'.self::$classCounter, $code, 1);
$code = strtr($code, [ $code = strtr($code, [
'__FILE__' => var_export($path, true), '__FILE__' => var_export($path, true),
'__DIR__' => var_export(dirname($path), true), '__DIR__' => var_export(dirname($path), true),