Skip to content

Commit 9786f9c

Browse files
committed
fix: check for libraries/src dir instead of vendor/autoload.php in bootstrap
1 parent 3df5874 commit 9786f9c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tests/unit/bootstrap.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,10 @@
7878
$joomlaLoaded = false;
7979

8080
if ($joomlaCmsPath !== '' && is_dir($joomlaCmsPath)) {
81-
$loaderFile = rtrim($joomlaCmsPath, '/') . '/libraries/loader.php';
82-
$vendorFile = rtrim($joomlaCmsPath, '/') . '/libraries/vendor/autoload.php';
83-
$namespaceFile = rtrim($joomlaCmsPath, '/') . '/libraries/namespacemap.php';
81+
$loaderFile = rtrim($joomlaCmsPath, '/') . '/libraries/loader.php';
82+
$cmsSrcDir = rtrim($joomlaCmsPath, '/') . '/libraries/src';
8483

85-
if (is_file($loaderFile) && is_file($vendorFile)) {
84+
if (is_file($loaderFile) && is_dir($cmsSrcDir)) {
8685
// Define Joomla path constants pointing at the CMS clone
8786
$rootDir = rtrim($joomlaCmsPath, '/');
8887

@@ -204,9 +203,6 @@
204203
}
205204

206205
if (!$joomlaLoaded) {
207-
fwrite(STDERR, "DEBUG: joomlaCmsPath='{$joomlaCmsPath}' exists=" . (is_dir($joomlaCmsPath) ? 'yes' : 'no') . PHP_EOL);
208-
fwrite(STDERR, "DEBUG: envPath='" . (getenv('JOOMLA_CMS_PATH') ?: 'unset') . "'" . PHP_EOL);
209-
fwrite(STDERR, "DEBUG: componentRoot='{$componentRoot}'" . PHP_EOL);
210206
fwrite(STDERR, "ERROR: Joomla CMS not found. Set builder.joomla_dir in build.properties" . PHP_EOL);
211207
fwrite(STDERR, " or set JOOMLA_CMS_PATH environment variable." . PHP_EOL);
212208
fwrite(STDERR, " See: https://github.com/Joomla-Bible-Study/Proclaim/wiki/Development-Setup" . PHP_EOL);

0 commit comments

Comments
 (0)