Book Image

Drush for Developers - Second Edition

By : Juan Pablo Novillo Requena, Juan P Novillo Requena
Book Image

Drush for Developers - Second Edition

By: Juan Pablo Novillo Requena, Juan P Novillo Requena

Overview of this book

Table of Contents (13 chapters)
Drush for Developers Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
2
Keeping Database Configuration and Code Together
Index

Inspecting the bootstrapping process


When Drush is called, it goes over a set of bootstrap steps that are very similar to how Drupal bootstraps on a web request. Drush commands might require minimum bootstrap phase to run. Here is a simplified list of each of Drush's bootstrap steps based on the documentation at drush topic docs-bootstrap:

  1. DRUSH_BOOTSTRAP_DRUSH: This is the minimum bootstrap phase. It just loads Drush configuration and core files.

  2. DRUSH_BOOTSTRAP_DRUPAL_ROOT: This checks whether there is a valid Drupal's root directory available. It is useful for commands that deal with a whole Drupal installation and not a specific site at the sites directory.

  3. DRUSH_BOOTSTRAP_DRUPAL_SITE: This will load Drush's configuration of a specific site within the sites directory of a Drupal project, but it won't load settings.php.

  4. DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION: This loads the site's settings.php file.

  5. DRUSH_BOOTSTRAP_DRUPAL_DATABASE: This connects to the site's database, so database queries...