Updating old setup (3.0.41.1) to 3.1.0 various errors every time
There used to be a bug in Craft 3.0 (fixed in 3.0.19) where, if an error occurred during an update, your composer.json file could be left in a weird state where it was directly requiring all of Craft’s dependencies (recursively). My guess is that this happened to you.

Try opening your composer.json file and see if your require setting contains a whole bunch of dependencies, such as twig/twig.

If so, then just delete all of the dependencies that don’t need to be in there. If the file is tracked in Git, then you should be able to look up its history and find the point where all of the extra dependencies were added. Otherwise you’ll need to figure that out for yourself.


You definitely need craftcms/cms.
You probably need vlucas/phpdotenv, if any of your environments are using a .env file.
If you have any plugins installed, then each of them will have one corresponding dependency.
Beyond that, everything else should be safe to remove (unless you intentionally added something else).


Once you’ve removed everything you don’t need, try changing your craftcms/cms requirement to ^3.4.5 and then run composer update. As a sanity check, pay attention to which dependencies get removed in the process, in case you accidentally over-corrected.