library civicrm-setup
CiviCRM installation library
civicrm/civicrm-setup
CiviCRM installation library
- Tuesday, May 15, 2018
- by totten
- Repository
- 14 Watchers
- 4 Stars
- 7,587 Installations
- PHP
- 1 Dependents
- 0 Suggesters
- 3 Forks
- 7 Open issues
- 3 Versions
- 56 % Grown
civicrm-setup
civicrm-setup
is a library for writing a CiviCRM installer. It aims to support multiple installers, such as the CLI command cv
(cv core:install
and cv core:uninstall
) or per-CMS web-based installers (e.g. for civicrm-drupal
or civicrm-wordpress
)., (*1)
General design:, (*2)
- Installers call a high-level API (Civi\Setup) which supports all major installation tasks/activities -- such as:
- Check system requirements (
$setup->checkRequirements()
)
- Check installation status (
$setup->checkInstalled()
)
- Install data files (
$setup->installFiles()
)
- Install database (
$setup->installDatabase()
)
- A data-model (Civi\Setup\Model) lists all the standard configuration parameters. This data-model is available when executing each task. For example, it includes:
- The path to CiviCRM's code (
$model->srcPath
)
- The system language (
$model->lang
)
- The DB credentials (
$model->db
)
- Each major task corresponds to an event -- such as:
civi.setup.checkRequirements
civi.setup.checkInstalled
civi.setup.installFiles
civi.setup.installDatabase
-
Plugins (
plugins/*/*.civi-setup.php
) work with the model and the events. For example:
- The plugin
init/WordPress.civi-setup.php
runs during initialization (civi.setup.init
). It reads the WordPress config (e.g.get_locale()
and DB_HOST
) then updates the model ($model->lang
and $model->db
).
- The plugin
installDatabase/SetLanguage.civi-setup.php
runs when installing the database (civi.setup.installDatabase
). It reads the $model->lang
and updates various Civi settings.
Key features:, (*3)
- The library can be used by other projects -- such as
cv
, civicrm-drupal
, civicrm-wordpress
-- to provide an installation process.
- It is a leap. It can coexist with the old installer, and it lives in a separate project/repo which can be deployed optionally.
-
Example: The
civicrm-wordpress
integration is phasing-in support for the new installer. By default, it uses the old installer. If you create a file civicrm/.use-civicrm-setup
, then it will use the new installer.
- It has minimal external dependencies. (The codebase for CiviCRM and its dependencies must be available -- but nothing else is needed.)
Documentation
dev-master
9999999-dev
CiviCRM installation library
Sources
Download
MIT
The Requires
by
CiviCRM LLC
v0.3.0
0.3.0.0
CiviCRM installation library
Sources
Download
MIT
The Requires
by
CiviCRM LLC
v0.2.0
0.2.0.0
CiviCRM installation library
Sources
Download
MIT
The Requires
by
CiviCRM LLC