Problem: How to address `civicrm.config.php` without running `GenCode`
We aim to allow installing CiviCRM on Drupal 8 via composer/git without requiring the admin to run GenCode
.
The file civicrm.config.php
is currently produced by GenCode
, and it's required by various backend scripts (extern/*
and bin/*
). A naive approach might be to simply commit this file -- however, that's problematic because there are ~4 variants of this file (for civicrm-drupal
, civicrm-wordpress
, civicrm-joomla
, and civicrm-backdrop
).
There are a couple ways we might do this:
- (a) Audit each entry-point (
extern/*
,bin/*
). For each, figure out some alternative way to address it without needingcivicrm.config.php
.- Challenge: There are several entry-points, and each will likely have its own series of issues/patches. In this approach, it's hard to control the scope of work.
- (b) Import the universal CMS boot script from
cv.git
orcivicrm-wordpress.git
tocivicrm-core.git
(related: #5 (closed)). All backend scripts (extern/*
,bin/*
) should use a fallback-behavior. ("Ifcivicrm.config.php
exists, call it. Otherwise, call the universal boot script.")- Challenge: People like to do funny things with their builds, and there's no fixed spec for "all possible builds". A "universal" CMS boot script will probably be broken for someone.
- (c)
composer.json
integration -- for anyone installing Civi viacomposer
, tell them to put some extra script calls in their rootcomposer.json
. The script createscivicrm.config.php
.- Challenge: This makes the installation experience more complicated.
- (d) Update all backend scripts (
extern/*
,bin/*
) to use a fallback-behavior. ("If./drupal/civicrm.config.php.drupal
exists, call it. If../civicrm.config.php.wordpress
exists, call it. Ad nauseum.")- Challenge: People like to do funny things with their builds, and there's no fixed spec for "all possible builds". A "universal" CMS boot script will probably be broken for someone.
Edited by totten