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

saveProjectConfig() private method

It saves the given PHP array as the project's Composer config. In addition to JSON-serializing the contents, it synchronizes the composer.lock file to avoid out-of-sync Composer errors.
private saveProjectConfig ( array $config )
$config array
    private function saveProjectConfig(array $config)
    {
        $composerJsonPath = $this->projectDir . '/composer.json';
        $this->fs->dumpFile($composerJsonPath, json_encode($config, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\n");
        $this->syncComposerLockFile();
    }