I got this error running a DevOps system that installs Drupal websites:

In BootstrapHook.php line 36:
                                                                      
  Bootstrap failed. Run your command with -vvv for more information

Solution

Seems like a composer updates requires to explicit install plugins.

composer config allow-plugins.composer/installers true
composer config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer config allow-plugins.cweagans/composer-patches true
composer config allow-plugins.davidbarratt/custom-installer true
composer config allow-plugins.drupal/core-composer-scaffold true
composer config allow-plugins.oomphinc/composer-installers-extender true

So, when run in interactive mode this can break things. More here:

https://drupal.stackexchange.com/questions/295448/exception-in-bootstraphook-php-line-32-how-can-i-consistently-resolve-this

https://getcomposer.org/doc/06-config.md#allow-plugins

https://stackoverflow.com/questions/70580831/is-it-possible-to-add-settings-to-allow-plugins-in-config-section-in-composer

 

Saved you some valuable time?

Buy me a drink 🍺