Answer the question
In order to leave comments, you need to log in
How can Composer automatically install package updates when it requests new versions of its already installed dependencies?
The bottom line is, there is a site project, it has its own composer.json, and it has a dependency "laravel/framework": "5.2.*". The vendor/laravel/framework folder has its own composer.json, which contains the "symfony/console" dependency: "2.8.*|3.0.*" There is a desire to upgrade laravel/framework to version 5.3.0. Naturally, we go to the composer.json of the site project and there we correct the laravel version number depending on it, it turns out "laravel / framework": "5.3.0". Then we run composer update laravel/framework from the project folder. Everything would be great, but we get this log:
> C:\Users\Stas\phpstorm\_php\5.6\php.exe C:\Users\Stas\phpstorm\_composer\composer.phar update laravel/framework
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
- Installation request for laravel/framework 5.3.0 -> satisfiable by laravel/framework[v5.3.0].
- Conclusion: remove symfony/console v3.0.8
- Conclusion: don't install symfony/console v3.0.8
- laravel/framework v5.3.0 requires symfony/console 3.1.* -> satisfiable by symfony/console[v3.1.0, v3.1.1, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9].
- Can only install one of: symfony/console[v3.1.0, v3.0.8].
- Can only install one of: symfony/console[v3.1.1, v3.0.8].
- Can only install one of: symfony/console[v3.1.2, v3.0.8].
- Can only install one of: symfony/console[v3.1.3, v3.0.8].
- Can only install one of: symfony/console[v3.1.4, v3.0.8].
- Can only install one of: symfony/console[v3.1.5, v3.0.8].
- Can only install one of: symfony/console[v3.1.6, v3.0.8].
- Can only install one of: symfony/console[v3.1.7, v3.0.8].
- Can only install one of: symfony/console[v3.1.8, v3.0.8].
- Can only install one of: symfony/console[v3.1.9, v3.0.8].
- Installation request for symfony/console (locked at v3.0.8) -> satisfiable by symfony/console[v3.0.8].
Process finished with exit code 2 at 03:47:05.
Execution time: 13 332 ms.
Answer the question
In order to leave comments, you need to log in
As always, I will answer myself. It's not good to be clever and type "composer update laravel/framework", instead it was just "composer update". According to the logic of things (well, as I would do), with the first option, you still need to pull all the dependencies for this package, but the composer, apparently, thinks otherwise. However, this also has its own logic.
You need to update everything, not just one package. composer update. And the transition between ivzhorny versions of the framework is not so easy. You have to do a lot by hand. Read the off-doc for instructions on how to upgrade a frame from one version to another.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question