-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load the autoloader as soon as the Drupal root is identified. #2865
Conversation
includes/drupal.inc
Outdated
} | ||
|
||
if ($autoloader === TRUE) { | ||
// The autoloader was already requireed. Assume that Drush and Drupal share an autoloader per |
There was a problem hiding this comment.
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)) { |
There was a problem hiding this comment.
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.
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 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). |
I added a failing test to show the functionality that is not yet working in this PR. |
1f15428
to
2fda2a5
Compare
No description provided.