Symfony\Installer\Manager\ComposerManager::initializeProjectConfig PHP Method

initializeProjectConfig() public method

    public function initializeProjectConfig()
    {
        $composerConfig = $this->getProjectConfig();
        if (isset($composerConfig['config']['platform']['php'])) {
            unset($composerConfig['config']['platform']['php']);
            if (empty($composerConfig['config']['platform'])) {
                unset($composerConfig['config']['platform']);
            }
            if (empty($composerConfig['config'])) {
                unset($composerConfig['config']);
            }
        }
        $this->saveProjectConfig($composerConfig);
    }

Usage Example

 /**
  * Updates the composer.json file to provide better values for some of the
  * default configuration values.
  *
  * @return $this
  */
 protected function updateComposerConfig()
 {
     $this->composerManager->initializeProjectConfig();
     return $this;
 }