8000 php:boot - When using --level=classloader, propagate the $civicrm_root by totten · Pull Request #228 · civicrm/cv · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

php:boot - When using --level=classloader, propagate the $civicrm_root #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8000
7 changes: 5 additions & 2 deletions src/Command/BootCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ protected function configure() {
protected function execute(InputInterface $input, OutputInterface $output): int {
switch ($input->getOption('level')) {
case 'classloader':
$code = sprintf('require_once %s . "/CRM/Core/ClassLoader.php";', var_export(rtrim($GLOBALS["civicrm_root"], '/'), 1))
. '\CRM_Core_ClassLoader::singleton()->register();';
$code = implode("\n", [
sprintf('$GLOBALS["civicrm_root"] = %s;', var_export(rtrim($GLOBALS["civicrm_root"], '/'), 1)),
'require_once $GLOBALS["civicrm_root"] . "/CRM/Core/ClassLoader.php";',
'\CRM_Core_ClassLoader::singleton()->register();',
]);
break;

case 'settings':
Expand Down
0