Dmitry Torba Dmitry Torba - 3 months ago 25
PHP Question

Failure to update Laravel 5.1 to 5.2 (these conflict with your requirements or minimum-stability)

Couple weeks ago I asked this question about trying to upgrade from Laravel 5.1 to 5.2 - Updating Larael from 5.1.35 to 5.2.* - fails to upgrade symfony/css-selector

Although I was given very nice and clear answer, that did not help. As instructed, I have updated

"lucadegasperi/oauth2-server-laravel"
to
"~5.1"
, but I still have the same error.

My
composer.json


{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"aws/aws-sdk-php-laravel": "~3.0",
"vinkla/hashids": "^1.1",
"cartalyst/sentinel": "~2.0.1",
"baum/baum": "~1.1",
"robclancy/presenter": "1.3.*",
"barryvdh/laravel-ide-helper": "^2.0",
"league/flysystem-aws-s3-v3": "~1.0",
"intervention/image": "^2.2",
"rap2hpoutre/laravel-log-viewer": "^0.2.8",
"league/fractal": "^0.12.0",
"ramsey/uuid": "~2.8",
"lucadegasperi/oauth2-server-laravel": "~5.1",
"torann/geoip": "0.2.*@dev",
"mailchimp/mailchimp": "^2.0",
"iron-io/iron_mq": "~2.0",
"aws/aws-sdk-php": "~3.0",
"justinrainbow/json-schema": "~1.3",
"sybio/gif-frame-extractor": "^1.0",
"coldume/imagecraft": "dev-gif-optimization",
"pragmarx/firewall": "^0.5.2",
"get-stream/stream-laravel": "dev-master",
"roumen/sitemap": "2.5.*",
"guzzlehttp/guzzle": "~6.0",
"bugsnag/bugsnag-laravel": "1.*",
"cviebrock/image-validator": "^2.0",
"toin0u/geocoder-laravel": "@stable",
"badawy/embedly": "^1.0",
"facebook/webdriver": "^1.0",
"scotteh/php-dom-wrapper": "dev-composer-symfony-fix",
"scotteh/php-goose": "dev-composer-guzzle-fix",
"doctrine/dbal": "^2.5",
"mandrill/mandrill": "1.0.*"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/zmike808GS/imagecraft"
},
{
"type": "vcs",
"url": "https://github.com/zmike808GS/php-goose"
},
{
"type": "vcs",
"url": "https://github.com/zmike808GS/php-dom-wrapper"
}
],
"require-dev": {
"symfony/dom-crawler": "~3.0",
"symfony/css-selector": "~3.0",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1",
"laracasts/testdummy": "~2.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"*********************": "****"
}
},
"autoload-dev": {
"classmap": [
"tests"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan ide-helper:generate",
"php artisan optimize"
],
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist",
"github-oauth": {
"github.com": "**************************************"
}
}
}


The full text of error:

>> composer update
php artisan clear-compiled
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- laravel/framework v5.1.43 requires symfony/css-selector 2.7.* -> satisfiable by symfony/css-selector[2.7.x-dev, v2.7.0, v2.7.0-BETA1, v2.7.0-BETA2, v2.7.1, v2.7.10, v2.7.11, v2.7.12, v2.7.13, v2.7.14, v2.7.15, v2.7.16, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9] but these conflict with your requirements or minimum-stability.
- Conclusion: don't install laravel/framework v5.2.45
- Conclusion: don't install laravel/framework v5.2.44
- Conclusion: don't install laravel/framework v5.2.43
- Conclusion: don't install laravel/framework v5.2.42
- Conclusion: don't install laravel/framework 5.2.41
- Conclusion: don't install laravel/framework v5.2.40
- Conclusion: don't install laravel/framework v5.2.39
- Conclusion: don't install laravel/framework v5.2.38
- Conclusion: don't install laravel/framework v5.2.37
- Conclusion: don't install laravel/framework v5.2.36
- Conclusion: don't install laravel/framework v5.2.35
- Conclusion: don't install laravel/framework v5.2.34
- Conclusion: don't install laravel/framework v5.2.33
- Conclusion: don't install laravel/framework v5.2.32
- Conclusion: don't install laravel/framework v5.2.31
- Conclusion: don't install laravel/framework v5.2.30
- Conclusion: don't install laravel/framework v5.2.29
- Conclusion: don't install laravel/framework v5.2.28
- Conclusion: don't install laravel/framework v5.2.27
- Conclusion: don't install laravel/framework v5.2.26
- Conclusion: don't install laravel/framework v5.2.25
- Conclusion: don't install laravel/framework v5.2.24
- Conclusion: don't install laravel/framework v5.2.23
- Conclusion: don't install laravel/framework v5.2.22
- Conclusion: don't install laravel/framework v5.2.21
- Conclusion: don't install laravel/framework v5.2.20
- Conclusion: don't install laravel/framework v5.2.19
- Conclusion: don't install laravel/framework v5.2.18
- Conclusion: don't install laravel/framework v5.2.17
- Conclusion: don't install laravel/framework v5.2.16
- Conclusion: don't install laravel/framework v5.2.15
- Conclusion: don't install laravel/framework v5.2.14
- Conclusion: don't install laravel/framework v5.2.13
- Conclusion: don't install laravel/framework v5.2.12
- Conclusion: don't install laravel/framework v5.2.11
- Conclusion: don't install laravel/framework v5.2.10
- Conclusion: don't install laravel/framework v5.2.9
- Conclusion: don't install laravel/framework v5.2.8
- Conclusion: don't install laravel/framework v5.2.7
- Conclusion: don't install laravel/framework v5.2.6
- Conclusion: don't install laravel/framework v5.2.5
- Conclusion: don't install laravel/framework v5.2.4
- Conclusion: don't install laravel/framework v5.2.3
- Conclusion: don't install laravel/framework v5.2.2
- Conclusion: don't install laravel/framework v5.2.1
- vinkla/hashids 1.1.0 requires illuminate/support 5.0.*|5.1.* -> satisfiable by laravel/framework[v5.1.43], illuminate/support[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v5.0.4, v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8].
- vinkla/hashids 1.1.0 requires illuminate/support 5.0.*|5.1.* -> satisfiable by laravel/framework[v5.1.43], illuminate/support[v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.33, v5.0.4, v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8].
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.1.1
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.1.13
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.1.16
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.1.2
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.1.20
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.1.22
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.1.25
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.1.28
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.1.30
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.1.31
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.1.41
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.1.6
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.1.8
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.0.22
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.0.25
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.0.26
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.0.28
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.0.33
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.0.0
- don't install laravel/framework v5.2.0|don't install illuminate/support v5.0.4
- Installation request for laravel/framework 5.2.* -> satisfiable by laravel/framework[5.2.41, v5.2.0, v5.2.1, v5.2.10, v5.2.11, v5.2.12, v5.2.13, v5.2.14, v5.2.15, v5.2.16, v5.2.17, v5.2.18, v5.2.19, v5.2.2, v5.2.20, v5.2.21, v5.2.22, v5.2.23, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.29, v5.2.3, v5.2.30, v5.2.31, v5.2.32, v5.2.33, v5.2.34, v5.2.35, v5.2.36, v5.2.37, v5.2.38, v5.2.39, v5.2.4, v5.2.40, v5.2.42, v5.2.43, v5.2.44, v5.2.45, v5.2.5, v5.2.6, v5.2.7, v5.2.8, v5.2.9].
- Installation request for vinkla/hashids ^1.1 -> satisfiable by vinkla/hashids[1.1.0].

Answer

These errors are always best to read from bottom-up, in my opinion.

Your composer.json requires vinkla/hashids ^1.1. That means it'll go up to, but not beyond, version 1.99999... The highest version satisfying that, 1.1, requires Laravel contracts up through 5.1. Thus, vinkla/hashids is pinning you to a Laravel 5.1 install. This pinning is then requiring you use symfony/css-selector ^2.7, which conflicts with your explicit request for ^3.0.

To solve this problem, you need to either allow vinkla/hashids ^2.2, or remove the need for the package altogether. So, try:

php composer.phar require vinkla/hashids:^2.2

Then run your tests and confirm that your code works with the new version of vinkla/hashids.