-
-
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
Global D8 container is not available when rebuilding the container #3123
Comments
kevin-dutra
added a commit
to kevin-dutra/drush
that referenced
this issue
Oct 31, 2017
kevin-dutra
added a commit
to kevin-dutra/drush
that referenced
this issue
Oct 31, 2017
kevin-dutra
added a commit
to kevin-dutra/drush
that referenced
this issue
Oct 31, 2017
kevin-dutra
added a commit
to kevin-dutra/drush
that referenced
this issue
Nov 2, 2017
kevin-dutra
added a commit
to kevin-dutra/drush
that referenced
this issue
Nov 3, 2017
weitzman
pushed a commit
that referenced
this issue
Nov 4, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Typically when the container is being rebuilt, it's within the context of a normal Drupal page request. At that point, Drupal has already booted and the global container is available, leaving services available for use in certain other steps, like defining events that your
EventSubscriber
subscribes to. Unfortunately, Drush'sDrupalKernel
will immediately rebuild the container without having the global container initialized with the existing one.The particular use case we've run into that is causing us headaches is the Rules module (though there may be others). It utilizes the State API to determine which events one of its
EventSubscriber
s should subscribe to. If the global container is not yet available, then it can't get the state service to subscribe to the correct events and then the rules you expect to trigger never do anything.The text was updated successfully, but these errors were encountered: