Skip to content
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

Fixes #3994: Get environment detector subclass results on bootstrap. #4017

Merged
merged 1 commit into from
Feb 21, 2020

Conversation

danepowell
Copy link
Contributor

Fixes #3994

Changes proposed

  • Add a universal method of getting the repo root from the environment detector.

Additional details

This feels a little hacky, I hate relying on a global variable like $repo_root but I don't know of a better solution since that variable is literally the first one set when you invoke BLT (before the autoloader is even loaded), so I'm not sure how we could store it in a more encapsulated way.

return [];
}
$autoloader = require DRUPAL_ROOT . '/autoload.php';
$autoloader = require self::getRepoRoot() . '/vendor/autoload.php';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

DRUPAL_ROOT isn't the same as self::getRepoRoot() . '/vendor' but that's okay since Drupal's autoload.php is just a wrapper for the root autoloader.

@mikemadison13
Copy link
Contributor

i'll give it a whirl and let you know.

@mikemadison13
Copy link
Contributor

@danepowell i tested this in Azure Pipelines vs. the previous PR I had submitted and thing seem to work fine on that end.

@danepowell danepowell changed the base branch from 11.x to 12.x February 21, 2020 21:35
@danepowell danepowell added the Backport needed PRs needing to be backported label Feb 21, 2020
@danepowell danepowell merged commit 08faa12 into acquia:12.x Feb 21, 2020
@danepowell danepowell added the Bug Something isn't working label Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport needed PRs needing to be backported Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DT-1194: Environment Detector getSubclassResults Outside DRUPAL_ROOT
2 participants