Revert "[5.6] Use composer platform config" #4579
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #4574
Sorry, but I dont think this was given the correct level of discussion regarding the huge unintended side effects this PR is going to have.
Essentially we are now permanently faking composer to pretend that every Laravel install is running on PHP
7.1.3
out of the box.This is going to artifically limit everyone as packages start increasing their dependencies to PHP
>=7.1.4
, because the default Laravel install will never get those packages. And it will be a silent failure - because composer will just grab the older versions without complaining.Of course - people are free to edit their
composer.json
with the right version. But then they need to do this. every. single. time.Plus - when you do
composer create-project laravel/laravel blog
- that will only install 7.1.3 packages initially. You then need to go intocomposer.json
and set your PHP version manually (to say7.2.0
), then runcomposer update
every. single. project. to make sure you have the "correct" versions at the start.Anyone who develops for a PHP7.1 server on a PHP7.2 dev box is in for a mess regardless. All it takes is the use of one PHP7.2 feature or syntax in their application, and it'll break on production anyway. I dont understand why we are protecting a small amount of people who develop on an incompabable version of PHP to their production, vs the large amount of people who do the right thing. Those that need this feature can just add it themselves to
composer.json
.We've already got 2 people raising issues in the original PR, and this hasnt even been tagged yet.
Finally, and this is my biggest concern - the real side effects of this wont be felt for 6-12 months. This is a silent failure to stick to PHP7.1 - it is not obvious, and people will miss this every time. We would have to add a large warning to the Laravel docs, and to the installer itself, telling people to manually set the
composer.json
. And they need to remember to update it if/when they update their PHP environments.Personally I think just let composer do it's own thing - and leave the artifical constrant to people who actually need it.