Background: The installation process blends together (a) values autodetected by the plugins with (b) values supplied by the installer.
Issue: The signature of Civi\Setup::init($modelValues) is misleading (as indicated by the existence of #14) -- it implies that any fields can be passed to init(...), but it really only works for a couple fields (cms, setupPath). If you try to set other values (db, cmsDb, components, et al), then the autodetection logic may override them.
The more general way to to manipulate the model is to let the autodetection run first:
Background: The installation process blends together (a) values autodetected by the plugins with (b) values supplied by the installer.
Issue: The signature of
Civi\Setup::init($modelValues)
is misleading (as indicated by the existence of #14) -- it implies that any fields can be passed toinit(...)
, but it really only works for a couple fields (cms
,setupPath
). If you try to set other values (db
,cmsDb
,components
, et al), then the autodetection logic may override them.The more general way to to manipulate the model is to let the autodetection run first:
And then get a reference to the model object:
And update its properties:
See also: https://github.com/civicrm/civicrm-setup/pull/14#issuecomment-394559611