-
-
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
#3123 - Global D8 container is not available during container rebuild. #3124
Conversation
Unfortunately, I dont know. How fast o slow slow is this new code? Trying to evaluate any perf impact. |
In terms of performance, the added code adds very little overhead, and it only runs when the container is already being rebuilt, which in theory should not be too often. As for a test, I'll have to think about that a little. It would be tricky because we'd need to somehow get the container built within the normal context of a Drupal request so that the Drush add-ons were not there. That way the next Drush command that gets run would trigger the container rebuild to add the Drush pieces in (thereby executing the new code). |
Alrighty, I managed to craft a test that passes with the change and fails without it. |
Looks like this needs to merge/rebase the latest This is the related Rules issue: https://www.drupal.org/node/2816033 |
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.
Please add a link to this issue in the test and in the code. My future self wont have a clue what this is about without that. Thanks.
tests/containerTest.php
Outdated
$root = $this->webroot(); | ||
$options = array( | ||
'root' => $root, | ||
'uri' => key($sites), |
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.
We now use $this->getUri() instead.
Here's the suggested change to fix #3123