diff --git a/lib/src/Bootstrap.php b/lib/src/Bootstrap.php index 9f85130..e7f6208 100644 --- a/lib/src/Bootstrap.php +++ b/lib/src/Bootstrap.php @@ -374,8 +374,16 @@ protected function findCivicrmSettingsPhp($searchDir) { break; case 'standalone': - $settings = $cmsRoot . '/data/civicrm.settings.php'; - // $result = $cmsRoot . 'components/com_civicrm/civicrm.settings.php'; + $settings = $this->findFirstFile( + [ + $cmsRoot, + implode(DIRECTORY_SEPARATOR, [$cmsRoot, 'data']) + ], + [ + 'civicrm.standalone.php', + 'civicrm.settings.php', + ] + ); break; } return array($cmsType, $cmsRoot, $settings); @@ -447,6 +455,7 @@ protected function findCmsRoot($searchDir) { 'core/modules/layout/layout.module', ), 'standalone' => array( + 'civicrm.standalone.php', 'civicrm.config.php.standalone', ), ); diff --git a/lib/src/CmsBootstrap.php b/lib/src/CmsBootstrap.php index 6e7bbf8..2265b2f 100644 --- a/lib/src/CmsBootstrap.php +++ b/lib/src/CmsBootstrap.php @@ -404,6 +404,7 @@ public function bootStandalone($cmsPath, $cmsUser) { /* @todo clarify: assumes $cmsPath is to the project root, not the webroot */ $candidates = [ $cmsPath . '/vendor/autoload.php', + $cmsPath . '/core/vendor/autoload.php', $cmsPath . '/web/core/vendor/autoload.php', dirname($cmsPath) . '/vendor/autoload.php', ]; @@ -471,6 +472,7 @@ protected function findCmsRoot($searchDir) { 'core/modules/layout/layout.module', ), 'Standalone' => array( + 'civicrm.standalone.php', 'civicrm.config.php.standalone', // or? // 'data/civicrm.settings.php', diff --git a/src/Util/SetupCommandTrait.php b/src/Util/SetupCommandTrait.php index 23011f2..6126be0 100644 --- a/src/Util/SetupCommandTrait.php +++ b/src/Util/SetupCommandTrait.php @@ -67,6 +67,7 @@ protected function bootSetupSubsystem(InputInterface $input, OutputInterface $ou implode(DIRECTORY_SEPARATOR, [dirname($b->getBootedCmsPath()), 'vendor', 'civicrm', 'civicrm-core']), ]; if ($b->getBootedCmsType() === 'Standalone') { + $possibleSrcPaths[] = implode(DIRECTORY_SEPARATOR, [$b->getBootedCmsPath(), 'core']); $possibleSrcPaths[] = implode(DIRECTORY_SEPARATOR, [$b->getBootedCmsPath(), 'web', 'core']); $possibleSrcPaths[] = dirname($b->getBootedCmsPath()); }