Craft 3.5.1 CLI Update Error: Failed to instantiate component or class "yii\shell\Bootstrap" when I try to update Craft via CLI to 3.5.1. I get the following error:
Failed to instantiate component or class &quot;yii\shell\Bootstrap
in /vendor/yiisoft/yii2/di/Container.php:449

Stack trace:
#0 /vendor/yiisoft/yii2/di/Container.php(374): yii\di\Container-&gt;getDependencies()
#1 /vendor/yiisoft/yii2/di/Container.php(159): yii\di\Container-&gt;build()
#2 /vendor/yiisoft/yii2/BaseYii.php(345): yii\di\Container-&gt;get()
#3 /vendor/yiisoft/yii2/base/Application.php(294): yii\BaseYii::createObject()
#4 /vendor/craftcms/cms/src/console/Application.php(72): yii\base\Application-&gt;bootstrap()
#5 /vendor/yiisoft/yii2/base/Application.php(273): craft\console\Application-&gt;bootstrap()
#6 /vendor/yiisoft/yii2/console/Application.php(124): yii\base\Application-&gt;init()
#7 /vendor/craftcms/cms/src/console/Application.php(58): yii\console\Application-&gt;init()
#8 /vendor/yiisoft/yii2/base/BaseObject.php(109): craft\console\Application-&gt;init()
#9 /vendor/yiisoft/yii2/base/Application.php(206): yii\base\BaseObject-&gt;__construct()
#10 /vendor/yiisoft/yii2/console/Application.php(89): yii\base\Application-&gt;__construct()
#11 /vendor/craftcms/cms/src/console/Application.php(48): yii\console\Application-&gt;__construct()
#12 [internal function]: craft\console\Application-&gt;__construct()
#13 /vendor/yiisoft/yii2/di/Container.php(400): ReflectionClass-&gt;newInstanceArgs()
#14 /vendor/yiisoft/yii2/di/Container.php(159): yii\di\Container-&gt;build()
#15 /vendor/yiisoft/yii2/BaseYii.php(365): yii\di\Container-&gt;get()
#16 /vendor/craftcms/cms/bootstrap/bootstrap.php(245): yii\BaseYii::createObject()
#17 /vendor/craftcms/cms/bootstrap/console.php(51): require('/var/www/client...')
#18 /craft(21): require('/var/www/client...')
#19 {main}

does anyone know what to do about it?
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.