Skip to content

Conversation

@greg-1-anderson
Copy link
Member

No description provided.

}

if ($autoloader === TRUE) {
// The autoloader was already requireed. Assume that Drush and Drupal share an autoloader per
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in requireed

// then run the preflight for the root and site contexts again.
if (!empty($alias_record)) {
$remote_host = drush_get_option('remote-host');
if (!isset($remote_host)) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edge case: a site alias defined in an alias file in a local Drupal site (identified via --root or the cwd), where the root defined in the alias is different than the root for the Drupal site containing the alias.

This code re-runs the preflight steps that sets up to bootstrap the selected Drupal site. I feel this makes the preflight harder to maintain, and prefer to remove it.

@greg-1-anderson
Copy link
Member Author

This PR makes the preflight process more linear, by removing a seldom-used feature (see comment above). This allows us to bring in the autoloader a little earlier in the preflight, which will allow us to share the same bootstrap classes between the current master branch and #2843.

The tests are all green, but I need to do a bit more testing to see if removing the code here causes any issues should anyone actually be using this feature (which, I think, is fairly unlikely).

@greg-1-anderson
Copy link
Member Author

I added a failing test to show the functionality that is not yet working in this PR.

@greg-1-anderson
Copy link
Member Author

@weitzman was +1 on this earlier in slack. I'm therefore going to go ahead and merge, so that I can rebase #2843 and continue with the bootstrap refactoring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants