Skip to content
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

Allow explicit-automatic flags #150

Merged
merged 3 commits into from
Mar 9, 2023
Merged

Conversation

totten
Copy link
Member

@totten totten commented Mar 9, 2023

(This is extracted from the bigger #145, which needs some additional work before reaching its policy goal of flipping the defaults.)

Both Bootstrap.php and CmsBootstrap.php can be customized by environment variables (CIVICRM_SETTINGS and CIVICRM_BOOT, respectively). This patch adds a couple more options:

Before: The values must concretely define the exact location of the civicrm.settings.php or of the CMS (respectively).

  • For Bootstrap, set CIVICRM_SETTINGS=/var/www/sites/default/civicrm.settings.php
  • For CmsBootstrap, set CIVICRM_BOOT=Drupal://var/www

After: The old values still work. Additionally, you can specifically indicate a preference for the default/automatic search behavior, i.e.

  • For Bootstrap, set CIVICRM_SETTINGS=Auto (literally, "automatically find the settings file")
  • For CmsBootstrap, set CIVICRM_BOOT=Auto://. (literally, "automatically choose the CMS based on the current folder")

The two notations are slightly because the two variables are already different. They aim to feel "ok" when compared to their other regular values.

totten added 3 commits March 8, 2023 22:57
This looks like a copy-paste error. A few lines above, it prints `Options: $this->options`. It makes more sense for
the subsequent statement to print`CMS: $cms`.
@totten
Copy link
Member Author

totten commented Mar 9, 2023

Test failures appear unrelated/pre-existing.

@totten totten merged commit 6968f25 into civicrm:master Mar 9, 2023
@totten totten deleted the master-explicit-auto branch March 9, 2023 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant