Skip to content

Commit

Permalink
Rename getBootstrap to just bootstrap.
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-1-anderson committed Mar 8, 2016
1 parent 33cfeb0 commit ea425dc
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 69 deletions.
2 changes: 1 addition & 1 deletion commands/core/cli.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function drush_cli_core_cli() {
// command in preflight still, but the subscriber instances are already
// created from before. Call terminate() regardless, this is a no-op for all
// DrupalBoot classes except DrupalBoot8.
if ($bootstrap = \Drush::getBootstrap()) {
if ($bootstrap = \Drush::bootstrap()) {
$bootstrap->terminate();
}

Expand Down
8 changes: 4 additions & 4 deletions commands/core/core.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ function _core_site_credentials($right_margin = 0) {
function _core_path_aliases($project = '') {
$paths = array();
$site_wide = drush_drupal_sitewide_directory();
$boot = \Drush::getBootstrap();
$boot = \Drush::bootstrap();
if ($drupal_root = drush_get_context('DRUSH_DRUPAL_ROOT')) {
$paths['%root'] = $drupal_root;
if ($site_root = drush_get_context('DRUSH_DRUPAL_SITE_ROOT')) {
Expand Down Expand Up @@ -564,7 +564,7 @@ function _core_site_status_table($project = '') {
$phase = drush_get_context('DRUSH_BOOTSTRAP_PHASE');
if ($drupal_root = drush_get_context('DRUSH_DRUPAL_ROOT')) {
$status_table['drupal-version'] = drush_drupal_version();
$boot_object = \Drush::getBootstrap();
$boot_object = \Drush::bootstrap();
$conf_dir = $boot_object->conf_path();
$settings_file = "$conf_dir/settings.php";
$status_table['drupal-settings-file'] = file_exists($settings_file) ? $settings_file : '';
Expand Down Expand Up @@ -990,7 +990,7 @@ function drush_core_quick_drupal() {
// Current CLI user is also the web server user, which is for development
// only. Hence we can safely make the site directory writable. This makes
// it easier to delete and edit settings.php.
$boot = \Drush::getBootstrap();
$boot = \Drush::bootstrap();
@chmod($boot->conf_path(), 0700);
drush_invoke_process(array('root' => $root, 'uri' => $server_uri), 'runserver', array($server));
}
Expand Down Expand Up @@ -1345,7 +1345,7 @@ function drush_core_twig_compile() {
require_once DRUSH_DRUPAL_CORE . "/themes/engines/twig/twig.engine";
// Scan all enabled modules and themes.
// @todo Refactor to not reuse commandfile paths directly.
$boot = \Drush::getBootstrap();
$boot = \Drush::bootstrap();
$searchpaths = $boot->commandfile_searchpaths(DRUSH_BOOTSTRAP_DRUPAL_FULL);
$searchpaths[] = drupal_get_path('theme', drush_theme_get_default());;
$searchpaths[] = drupal_get_path('theme', drush_theme_get_admin());
Expand Down
2 changes: 1 addition & 1 deletion commands/core/drupal/environment.inc
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ function drush_module_enable($modules) {
drush_module_install($modules);

// Our logger got blown away during the container rebuild above.
$boot = \Drush::bootstrapManager()->getBootstrap();
$boot = \Drush::bootstrapManager()->bootstrap();
$boot->add_logger();

// Flush all caches. No longer needed in D8 per https://github.com/drush-ops/drush/issues/1207
Expand Down
105 changes: 54 additions & 51 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions includes/bootstrap.inc
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function drush_bootstrap_value($context, $value = null) {
function _drush_bootstrap_phases($function_names = FALSE) {
$result = array();

if ($bootstrap = \Drush::getBootstrap()) {
if ($bootstrap = \Drush::bootstrap()) {
$result = $bootstrap->bootstrap_phases();
if (!$function_names) {
$result = array_keys($result);
Expand Down Expand Up @@ -191,7 +191,7 @@ function _drush_bootstrap_phases($function_names = FALSE) {
* @see \Drush\Boot\Boot::bootstrap_phases()
*/
function drush_bootstrap($phase, $phase_max = FALSE) {
$bootstrap = \Drush::getBootstrap();
$bootstrap = \Drush::bootstrap();
$phases = _drush_bootstrap_phases(TRUE);
$result = TRUE;

Expand Down Expand Up @@ -278,7 +278,7 @@ function drush_has_boostrapped($phase) {
* @see \Drush\Boot\Boot::bootstrap_phases()
*/
function drush_bootstrap_validate($phase) {
$bootstrap = \Drush::getBootstrap();
$bootstrap = \Drush::bootstrap();
$phases = _drush_bootstrap_phases(TRUE);
static $result_cache = array();

Expand Down
4 changes: 2 additions & 2 deletions includes/command.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ function drush_command_defaults($key, $commandfile, $path) {
// additional defaults if needed. The bootstrap command defaults
// will be merged into the command object again just before
// running it in bootstrap_and_dispatch().
if ($bootstrap = \Drush::getBootstrap()) {
if ($bootstrap = \Drush::bootstrap()) {
$defaults = array_merge($defaults, $bootstrap->command_defaults());
}
return $defaults;
Expand Down Expand Up @@ -1514,7 +1514,7 @@ function drush_commandfile_list() {

function _drush_find_commandfiles($phase, $phase_max = FALSE) {
drush_log(dt("Find command files for phase !phase (max=!max)", array('!phase' => $phase, '!max' => (string)$phase_max)), LogLevel::DEBUG);
if ($bootstrap = \Drush::getBootstrap()) {
if ($bootstrap = \Drush::bootstrap()) {
$searchpath = $bootstrap->commandfile_searchpaths($phase, $phase_max);
_drush_add_commandfiles($searchpath, $phase);
}
Expand Down
Loading

0 comments on commit ea425dc

Please sign in to comment.