Avoid run of Request handle() and use of container at compiler pass to fix issues 3091 and 3553 #3558
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @jmolivas - @enzolutions, at Bluespark we have a project based on Drupal 8.3.7 and Drupal Console 1.0.0-beta4 that tried to upgrade to Drupal Console 1.0.2 but this caused a lot of fatal errors in our custom implementations of commands. I researched a bit of the existing issues and found that our error was very similar than #3091 so tried the workaround detailed on that issue to avoid usage of session but we found another fatal error that I reported at #3553
I tried to compare what have changed between the two versions to identify why this erros was not experimented in previous Drupal Console version and found that the main reason is the handle of the "/" default request which trigger hooks and globally display blocks access visibility rules among other things.
I reviewed all the Bootstrap process and started to experiment until have a bootstrap which don't caused those fatal exceptions. The main changes are:
I have detailed with comments the reasons of all the changes so you can review, I was not really familiar with Drupal Kernel and Bootstrap process until this issue so I leave it to your expertise to decide what changes to preserve. I have tested multiples core and custom commands that are working properly. I would like to run tests for existing commands but couldn't found in documentation how to run tests in local. Can you guide me?
I hope this helps to guys that have been experimenting this weird problems when upgrading to last stable release and thanks for all your great job on the Drupal Console. I love it!