composer-php
How does composer handle multiple versions of the same package?
To question 1 Yes Composer can only install one version of each extension/package. To question 2 Because of answer 1: Composer would consider your main project and the external package as incompatible. In this case you could stay with version 5 at your main project too. ask the external package owner to upgrade to version … Read more
How to generate .env file for laravel?
Just tried both ways and in both ways I got generated .env file. Composer should automatically create .env file. In the post-create-project-cmd section of the composer.json you can find: “post-create-project-cmd”: [ “php -r \”copy(‘.env.example’, ‘.env’);\””, “php artisan key:generate” ] Both ways use the same composer.json file, so there shoudn’t be any difference. I suggest you … Read more
Is “content-hash” a mandatory part of composer.lock?
Purpose of the content hash As you can see in Composer\Package\Locker::getContentHash(), the content hash takes into account the following fields of composer.json: $relevantKeys = array( ‘name’, ‘version’, ‘require’, ‘require-dev’, ‘conflict’, ‘replace’, ‘provide’, ‘minimum-stability’, ‘prefer-stable’, ‘repositories’, ‘extra’, ); The only reason for the content hash to change is a change of one of the values of … Read more