Craft 3.5.1 CLI Update Error: Failed to instantiate component or class "yii\shell\Bootstrap"
This ended up being a bug we were able to work-around on our side via our web service calls.
If you restore your site from a pre-update attempt database backup and composer.json file, then attempt the update again, it should go through fine.