Skip to content

Let admin choose default boot proto. Respect both CIVICRM_BOOT and CIVCRM_SETTINGS.#152

Merged
totten merged 3 commits intocivicrm:masterfrom
totten:master-default-var
Mar 10, 2023
Merged

Let admin choose default boot proto. Respect both CIVICRM_BOOT and CIVCRM_SETTINGS.#152
totten merged 3 commits intocivicrm:masterfrom
totten:master-default-var

Conversation

@totten
Copy link
Member

@totten totten commented Mar 10, 2023

(Extracted from #145.)

This is preparation for v0.4.x. The ultimate aim is to flip the default boot behavior (full/Bootstrap.php <=> cms-full/CmsBootstrap.php); but that is a big change. This patch allows admins fine-tune the transitional period.

  • In v0.3, the default is full/Bootstrap.php.
  • In v0.4, it will be cms-full/CmsBootstrap.php.
  • If you want to get ahead (start using CmsBootstrap.php by default; now), then you can explicitly set CIVICRM_BOOT=Auto://. This setting will be respected on either version.
  • If you want to stay behind (continue using Bootstrap.php by default), then you can explicitly set CIVICRM_SETTING=Auto. This setting will be respected on either version.

These env-vars already exist, but they're not consistently respected. You sometimes need to manually set --level=full or --level=cms-full. This patch makes it easier to switch -- you can express a preference for either style, and you don't need to manually pass --level=X with each call.

This PR also updates the README to describe the options.

totten added 3 commits March 9, 2023 17:26
…ICRM_SETTINGS.

This is preparation for v0.4. The ultimate aim is to flip the default
boot behavior (`full/Bootstrap` <=> `cms-full/CmsBootstrap`); but this
is a big change. This patch is about allowing admins fine-tune
the transition.

* In v0.3, the default is `full/Bootstrap`.
* In v0.4, it will be `cms-full/CmsBootstrap`.
* If you're on v0.3 and want to get ahead (*start using `CmsBootstrap`
  by default; now*), then you can explicitly set `CIVICRM_BOOT=Auto://`
* If you're on v0.4 and want to stay behind (*stay on `Bootstrap` by
  default*), then you can explicitly set `CIVICRM_SETTING=Auto`

These env-vars already exist, but they're not consistently respected.  You
sometimes need to manually set `--level=full` or `--level=cms-full`.  This
patch allows you switch without needing to manually pass `--level=X` with
each call.
@totten
Copy link
Member Author

totten commented Mar 10, 2023

Test failures are unrelated/pre-existing.

@totten totten merged commit 93cbf93 into civicrm:master Mar 10, 2023
@totten totten deleted the master-default-var branch March 10, 2023 02:21
@totten totten changed the title Let admin choose default boot proto. Respect both CIVIRM_BOOT and CIVCRM_SETTINGS. Let admin choose default boot proto. Respect both CIVICRM_BOOT and CIVCRM_SETTINGS. Mar 10, 2023
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