mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-09 01:45:36 +08:00
cant reset it because of the same reason x(
This commit is contained in:
@@ -89,14 +89,17 @@ class Registry
|
|||||||
self::$current_registry_name = $registry_name;
|
self::$current_registry_name = $registry_name;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Load composer autoload if specified (for external registries with their own dependencies)
|
// resolve autoload manually — path-repo installs have no vendor/, FileSystem::fullpath would throw
|
||||||
if (isset($data['autoload']) && is_string($data['autoload'])) {
|
if (isset($data['autoload']) && is_string($data['autoload'])) {
|
||||||
$autoload_path = FileSystem::fullpath($data['autoload'], dirname($registry_file));
|
$base = dirname($registry_file);
|
||||||
|
$autoload_path = FileSystem::isRelativePath($data['autoload'])
|
||||||
|
? rtrim($base, '/') . DIRECTORY_SEPARATOR . $data['autoload']
|
||||||
|
: $data['autoload'];
|
||||||
if (file_exists($autoload_path)) {
|
if (file_exists($autoload_path)) {
|
||||||
logger()->debug("Loading external autoload from: {$autoload_path}");
|
logger()->debug("Loading external autoload from: {$autoload_path}");
|
||||||
require_once $autoload_path;
|
require_once $autoload_path;
|
||||||
} else {
|
} else {
|
||||||
logger()->warning("Autoload file not found: {$autoload_path}");
|
logger()->warning("Registry autoload not present, relying on consumer autoloader: {$autoload_path}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user