drush icon indicating copy to clipboard operation
drush copied to clipboard

Assertion error when running `drush site:install`

Open ericmorand opened this issue 1 year ago • 0 comments

We are using drush to install a Drupal 11 instance from a profile. When running drush site:install following the documentation, we get the following error:

Fatal error: Uncaught Assertion error: assert($this->bootstrap instance of DrupalBoot8)

After some investigation, it seems like drush expect that an autoloader.php file exists in vendor/drupal in order for vendor/drupal/core to be recognized as a proper core location.

Moving vendor/drupal/core to the root of the application during our deployment process doesn't solve the issue: drush seems to search for the location of drupal/core using the composer provided installed.php file, which of course mention vendor/drupal/core.

It is not clear why drush is making such assumptions as:

  • The core is located alongside an autoload file
  • The installation location of the core is provided by composer

Can you point us to the specification of Drupal core that establishes such a requirement?

Can you point us to the documentation of drush that explains where Drupal core must be installed?

And can you please explain how we can make drush works without having to put an autoload file in vendor/drupal?

ericmorand avatar Aug 19 '24 11:08 ericmorand