ComposerJson: Ignore dependencies that start with "ext-"
authorKunal Mehta <legoktm@gmail.com>
Mon, 23 Feb 2015 18:34:53 +0000 (10:34 -0800)
committerKunal Mehta <legoktm@gmail.com>
Mon, 23 Feb 2015 18:34:53 +0000 (10:34 -0800)
Any requirements of MediaWiki core to depend upon PHP extensions should
be handled in the installer rather than checkComposerLockUpToDate.php, which
doesn't work anyways since PHP extensions are not included in the lock file.

Change-Id: Ib7af7ccf2f10bc941222d1ce534c7c20690b4c6f

includes/libs/composer/ComposerJson.php

index 49c9f23..796acb5 100644 (file)
@@ -28,7 +28,7 @@ class ComposerJson {
        public function getRequiredDependencies() {
                $deps = array();
                foreach ( $this->contents['require'] as $package => $version ) {
-                       if ( $package !== "php" ) {
+                       if ( $package !== "php" && strpos( $package, 'ext-' ) !== 0 ) {
                                $deps[$package] = self::normalizeVersion( $version );
                        }
                }