update.php: Add option to not check if external dependencies are up to date
authorKunal Mehta <legoktm@gmail.com>
Sat, 31 Jan 2015 21:55:13 +0000 (13:55 -0800)
committerKunal Mehta <legoktm@gmail.com>
Sat, 31 Jan 2015 21:55:13 +0000 (13:55 -0800)
Bug: T88211
Change-Id: Ie84dd6320e5e17cd30a063c61f2b8a3af0549fac

maintenance/update.php

index 8ab1ddb..182a2c4 100755 (executable)
@@ -56,6 +56,10 @@ class UpdateMediaWiki extends Maintenance {
                        true
                );
                $this->addOption( 'force', 'Override when $wgAllowSchemaUpdates disables this script' );
+               $this->addOption(
+                       'skip-external-dependencies',
+                       'Skips checking whether external dependencies are up to date, mostly for developers'
+               );
        }
 
        function getDbType() {
@@ -132,8 +136,14 @@ class UpdateMediaWiki extends Maintenance {
                }
 
                // Check external dependencies are up to date
-               $composerLockUpToDate = $this->runChild( 'CheckComposerLockUpToDate' );
-               $composerLockUpToDate->execute();
+               if ( !$this->hasOption( 'skip-external-dependencies' ) ) {
+                       $composerLockUpToDate = $this->runChild( 'CheckComposerLockUpToDate' );
+                       $composerLockUpToDate->execute();
+               } else {
+                       $this->output(
+                               "Skipping checking whether external dependencies are up to date, proceed at your own risk\n"
+                       );
+               }
 
                # Attempt to connect to the database as a privileged user
                # This will vomit up an error if there are permissions problems