mirror of
https://github.com/composer/composer
synced 2025-05-10 00:53:06 +00:00
Force empty lock files to contain a JSON object
By default it will make it an array, since PHP does not distinguish between arrays and hash(map)s.
This commit is contained in:
parent
525993cb00
commit
1e5aaefaf5
1 changed files with 1 additions and 1 deletions
|
@ -154,7 +154,7 @@ class InstallCommand
|
|||
|
||||
protected function storeLockFile(array $content)
|
||||
{
|
||||
file_put_contents('composer.lock', json_encode($content)."\n");
|
||||
file_put_contents('composer.lock', json_encode($content, JSON_FORCE_OBJECT)."\n");
|
||||
echo '> composer.lock dumped'.PHP_EOL;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue