Let install.php detect and inject extensions
For CI, I went with a dirty trick to find extensions and either wfLoadExtension() or include them. That has since been ported to Installer::findExtensions() and LocalSettingsGenerator::getText(). The WebInstaller() relies on that to detect extensions and let the user tick the ones to be installed. Add --with-extensions to install.php so one can include all extensions from the command line. Note: The CliInstaller always wfLoad() any skin it can find. Bug: T189567 Change-Id: Ic8aa6bea4e7294e54fd5b71df267c9e934f78fce
This commit is contained in:
parent
ad7db3c9b5
commit
53926d9d69
3 changed files with 9 additions and 0 deletions
|
|
@ -66,6 +66,8 @@ production.
|
|||
the SQL query. The ActorMigration class may also be used to get feature-flagged
|
||||
information needed to access actor-related fields during the migration
|
||||
period.
|
||||
* The CLI installer (maintenance/install.php) learned to detect and include
|
||||
extensions. Pass --with-extensions to enable that feature.
|
||||
|
||||
=== External library changes in 1.31 ===
|
||||
|
||||
|
|
|
|||
|
|
@ -107,6 +107,11 @@ class CliInstaller extends Installer {
|
|||
$this->setVar( '_AdminPassword', $option['pass'] );
|
||||
}
|
||||
|
||||
// Detect and inject any extension found
|
||||
if ( isset( $options['with-extensions'] ) ) {
|
||||
$this->setVar( '_Extensions', array_keys( $installer->findExtensions() ) );
|
||||
}
|
||||
|
||||
// Set up the default skins
|
||||
$skins = array_keys( $this->findExtensions( 'skins' ) );
|
||||
$this->setVar( '_Skins', $skins );
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ class CommandLineInstaller extends Maintenance {
|
|||
false, true );
|
||||
*/
|
||||
$this->addOption( 'env-checks', "Run environment checks only, don't change anything" );
|
||||
|
||||
$this->addOption( 'with-extensions', "Detect and include extensions" );
|
||||
}
|
||||
|
||||
public function getDbType() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue