Browse Source

The config setting 'platform' is used to override platform packages.

Like suggested in #1522.

These overridden packages appear only during install/update and not
when running init, show and search commands.
I don't know if they should or not.
Joakim Israelsson 11 years ago
parent
commit
571363dee2
2 changed files with 2 additions and 1 deletions
  1. 1 0
      src/Composer/Config.php
  2. 1 1
      src/Composer/Installer.php

+ 1 - 0
src/Composer/Config.php

@@ -39,6 +39,7 @@ class Config
         'optimize-autoloader' => false,
         'prepend-autoloader' => true,
         'github-domains' => array('github.com'),
+        'platform' => array(),
     );
 
     public static $defaultRepositories = array(

+ 1 - 1
src/Composer/Installer.php

@@ -196,7 +196,7 @@ class Installer
 
         // create installed repo, this contains all local packages + platform packages (php & extensions)
         $localRepo = $this->repositoryManager->getLocalRepository();
-        $platformRepo = new PlatformRepository();
+        $platformRepo = new PlatformRepository($this->config->get('platform'));
         $repos = array(
             $localRepo,
             new InstalledArrayRepository(array($installedRootPackage)),