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();
    }
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();
    }
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 ( ) ; }
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.

@param array $config
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 .