diff --git a/automation/bulk_joomla_template.php b/automation/bulk_joomla_template.php index 6d40e83..832cb1b 100644 --- a/automation/bulk_joomla_template.php +++ b/automation/bulk_joomla_template.php @@ -24,7 +24,7 @@ declare(strict_types=1); -require_once __DIR__ . '/../../vendor/autoload.php'; +require_once __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/../lib/Enterprise/CliFramework.php'; use MokoEnterprise\{ diff --git a/automation/bulk_sync.php b/automation/bulk_sync.php index b336ee4..0503c9c 100755 --- a/automation/bulk_sync.php +++ b/automation/bulk_sync.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once __DIR__ . '/../../vendor/autoload.php'; +require_once __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/../lib/Enterprise/CliFramework.php'; use MokoEnterprise\{ diff --git a/automation/migrate_to_gitea.php b/automation/migrate_to_gitea.php index 6dd9754..6c9f24d 100644 --- a/automation/migrate_to_gitea.php +++ b/automation/migrate_to_gitea.php @@ -23,7 +23,7 @@ declare(strict_types=1); -require_once __DIR__ . '/../../vendor/autoload.php'; +require_once __DIR__ . '/../vendor/autoload.php'; use MokoEnterprise\CheckpointManager; use MokoEnterprise\CliFramework; diff --git a/automation/push_files.php b/automation/push_files.php index 8e1f754..abba031 100644 --- a/automation/push_files.php +++ b/automation/push_files.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once __DIR__ . '/../../vendor/autoload.php'; +require_once __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/../lib/Enterprise/CliFramework.php'; use MokoEnterprise\{ diff --git a/automation/repo_cleanup.php b/automation/repo_cleanup.php index 6f4b4e7..0ad5105 100644 --- a/automation/repo_cleanup.php +++ b/automation/repo_cleanup.php @@ -18,7 +18,7 @@ declare(strict_types=1); -require_once __DIR__ . '/../../vendor/autoload.php'; +require_once __DIR__ . '/../vendor/autoload.php'; require_once __DIR__ . '/../lib/Enterprise/CliFramework.php'; use MokoEnterprise\{ApiClient, AuditLogger, CLIApp, Config, GitPlatformAdapter, MetricsCollector, PlatformAdapterFactory}; diff --git a/lib/Enterprise/ApiClient.php b/lib/Enterprise/ApiClient.php index ab695df..c97814f 100644 --- a/lib/Enterprise/ApiClient.php +++ b/lib/Enterprise/ApiClient.php @@ -166,7 +166,7 @@ class ApiClient // Initialize HTTP client $this->httpClient = new Client([ - 'base_uri' => $this->baseUrl, + 'base_uri' => rtrim($this->baseUrl, '/') . '/', 'timeout' => 30, 'headers' => [ 'User-Agent' => $this->userAgent, @@ -281,6 +281,9 @@ class ApiClient // Check rate limit $this->checkRateLimit(); + // Ensure endpoint is relative so Guzzle base_uri path is preserved + $endpoint = ltrim($endpoint, '/'); + // Add authentication if ($this->authToken) { $options['headers']['Authorization'] = $this->authScheme . ' ' . $this->authToken;