framework: Problem with Doctrine instantiator
- Laravel Version: 5.4.30
- PHP Version: 7.0.15
- Database Driver & Version: mysql 5.5
Description:
When trying to update with composer the following error occurs:
Problem 1
- Installation request for doctrine/instantiator 1.1.0 -> satisfiable by doctrine/instantiator[1.1.0].
- doctrine/instantiator 1.1.0 requires php ^7.1 -> your PHP version (7.0.15) does not satisfy that requirement.
It looks like this bug was introduced with the following PR: #20227
Steps To Reproduce:
run composer update
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 29
- Comments: 31 (6 by maintainers)
The simple temporary solution until you update your server interpreted from http://doctrine-project.org/2017/07/25/php-7.1-requirement-and-composer.html :
Meh you don’t need to do all that: just read this link
I think it’s a problem with phpunit, try ~5.7 or lower, but it should work on ~6.0 When installing on php7.0 it’s working for me.
you need doctrine/instantiator 1.0.5, i don’t know why it’s installing 1.1.0 when i’m doing this
it’s working on 7.0, it’s installing doctrine/instantiator 1.0.5 , as expected.
I wish people would be sensitive to what platforms officially support PHP 7.1, forcing people to install unofficial repositories is frustrating. Even looking for a workaround is frustrating.
you can use platform.config to override your phpversion. delete old composer.lock if you have one or do composer update.
If you are using PHP 7.0 you don’t need to do anything. Since new minor version of doctrine package is PHP 7.1+, composer shouuld pick the earlier version directly unless there is a conflict with another dependency. Would advise you to seek help either on forums or slack channel.
@RamonSmit not really. Its a “doubtful-zone” : http://semver.org/#what-should-i-do-if-i-update-my-own-dependencies-without-changing-the-public-api
I started a Laravel 5.4 project yesterday on my home pc with php 7.1 and checked out same on laptop with php 7.0. I ran into same error. I read the link but I am still not sure what is fix here, What should I add to my composer.json in order to just stick with php 7.0 please suggest.
@Dylan-DPC yeah that did it for me! Thanks a lot.
The problem is that doctrine decided to increase the minimum version in a minor release, all packages using the doctrine affected packages need to fix their version requirement on the previous minor to avoid such problems, we’ve done that for Laravel so far. Closing this since there’s nothing more we can do, all other packages has to do the same.