Update all dependencies if stuck in hell

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the dependencies category.

Last Updated: 2021-05-16

When hopelessly trapped in dependency hell, try running the package manager update on all existing packages.

Case in point: I was unable to install Laravel 5.8 in a codebase using Laravel 5.7. No matter what, some other package version requirements would cry foul and prevent the install from working.

At first, I was scared to upgrade all the packages with composer update so I avoided it and tried updating single packages and deleting the vendor folder.

But ultimately the only thing that worked was updating all with composer update