From 270e2d64715f79f1bb8aa88ca1fea4ff659f22c1 Mon Sep 17 00:00:00 2001 From: henderkes Date: Tue, 12 May 2026 10:07:21 +0700 Subject: [PATCH] cant reset it because of the same reason x( --- src/StaticPHP/Registry/Registry.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/StaticPHP/Registry/Registry.php b/src/StaticPHP/Registry/Registry.php index 8f206c30..69c5a474 100644 --- a/src/StaticPHP/Registry/Registry.php +++ b/src/StaticPHP/Registry/Registry.php @@ -89,14 +89,17 @@ class Registry self::$current_registry_name = $registry_name; 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'])) { - $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)) { logger()->debug("Loading external autoload from: {$autoload_path}"); require_once $autoload_path; } else { - logger()->warning("Autoload file not found: {$autoload_path}"); + logger()->warning("Registry autoload not present, relying on consumer autoloader: {$autoload_path}"); } }