Fix loading error when plugin is a final class, fixes #4482
parent
7a06615bf0
commit
977b8c8f41
|
@ -144,7 +144,7 @@ class PluginManager
|
|||
foreach ($classes as $class) {
|
||||
if (class_exists($class, false)) {
|
||||
$code = file_get_contents($classLoader->findFile($class));
|
||||
$code = preg_replace('{^(\s*)class\s+(\S+)}mi', '$1class $2_composer_tmp'.self::$classCounter, $code);
|
||||
$code = preg_replace('{^((?:final\s+)?(?:\s*))class\s+(\S+)}mi', '$1class $2_composer_tmp'.self::$classCounter, $code);
|
||||
eval('?>'.$code);
|
||||
$class .= '_composer_tmp'.self::$classCounter;
|
||||
self::$classCounter++;
|
||||
|
|
Loading…
Reference in New Issue