dedicated scope isolation function for autoload_real
parent
ed02997a7b
commit
00a6f8e38d
|
@ -530,10 +530,10 @@ REGISTER_AUTOLOAD;
|
|||
REGISTER_LOADER;
|
||||
|
||||
if ($useIncludeFiles) {
|
||||
$file .= <<<'INCLUDE_FILES'
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
foreach ($includeFiles as $file) {
|
||||
\Composer\Autoload\includeFile($file);
|
||||
$file .= <<<INCLUDE_FILES
|
||||
\$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
foreach (\$includeFiles as \$file) {
|
||||
composerRequire$suffix(\$file);
|
||||
}
|
||||
|
||||
|
||||
|
@ -552,6 +552,11 @@ METHOD_FOOTER;
|
|||
return $file . <<<FOOTER
|
||||
}
|
||||
|
||||
function composerRequire$suffix(\$file)
|
||||
{
|
||||
require \$file;
|
||||
}
|
||||
|
||||
FOOTER;
|
||||
|
||||
}
|
||||
|
|
|
@ -358,7 +358,7 @@ class ClassLoader
|
|||
*
|
||||
* Prevents access to $this/self from included files.
|
||||
*/
|
||||
function includeFile()
|
||||
function includeFile($file)
|
||||
{
|
||||
include func_get_arg(0);
|
||||
include $file;
|
||||
}
|
||||
|
|
|
@ -45,9 +45,14 @@ class ComposerAutoloaderInitFilesAutoloadOrder
|
|||
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
foreach ($includeFiles as $file) {
|
||||
\Composer\Autoload\includeFile($file);
|
||||
composerRequireFilesAutoloadOrder($file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequireFilesAutoloadOrder($file)
|
||||
{
|
||||
require $file;
|
||||
}
|
||||
|
|
|
@ -45,9 +45,14 @@ class ComposerAutoloaderInitFilesAutoload
|
|||
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
foreach ($includeFiles as $file) {
|
||||
\Composer\Autoload\includeFile($file);
|
||||
composerRequireFilesAutoload($file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequireFilesAutoload($file)
|
||||
{
|
||||
require $file;
|
||||
}
|
||||
|
|
|
@ -67,3 +67,8 @@ class ComposerAutoloaderInitIncludePath
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequireIncludePath($file)
|
||||
{
|
||||
require $file;
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ class ComposerAutoloaderInitTargetDir
|
|||
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
foreach ($includeFiles as $file) {
|
||||
\Composer\Autoload\includeFile($file);
|
||||
composerRequireTargetDir($file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -71,3 +71,8 @@ class ComposerAutoloaderInitTargetDir
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
function composerRequireTargetDir($file)
|
||||
{
|
||||
require $file;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue