I understand that composer.lock
is meant to pin down the exact version of the installed dependencies. But what purpose does the vendor/composer/installed.json
file play?
Both contain JSON and both are generated automatically.
composer. lock records the exact versions that are installed. So that you are in the same versions with your co-workers. So in a simple check list.
installed. json is an internal file of Composer. It's used when you remove a package manually from composer. json to remove the files from the vendor directory. Otherwise, the old vendor package would be around forever.
package. json is a npm file to keep track of npm packages. composer. json is a composer file to keep track of php packages.
Description. A installed. json file was discovered. Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.
composer.lock
is generated when installing for the first time or updating. It contains references to the exact versions used. It should be committed into the version tracking repository to allow restoring this exact combination of libraries.
installed.json
is an internal file of Composer. It's used when you remove a package manually from composer.json
to remove the files from the vendor directory. Otherwise, the old vendor package would be around forever.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With