-
-
Notifications
You must be signed in to change notification settings - Fork 556
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
Avoid using symfony/dependency-injection #2061
Comments
Cross posting with a core issue that relates: |
Related: drush-ops/drush#2103 |
Now that Drupal 8.1 has a rc release, I was wondering what DrupalConsole's strategy was moving forward. Will any effort be made to allow a single DrupalConsole executable to work with both 8.0.x and 8.1.x releases of Drupal? |
Related: #2022 |
Is there a fix for this? Should I upgrade Drupal Console to resolve this problem? |
Right now, it is sort of a coincidence that only symfony/dependency-injection is causing problems with Drupal compatibility today. Drupal Console has other requirements in common with Drupal, and these could also cause incompatibilities in the future. So, avoiding this one component would not be a permanent lasting solution. Drupal Console prefers using components provided by Symfony, when available, in preference to similar components provided elsewhere. It is my understanding that Drupal Console's strategy is that, officially, any version of Drupal Console only officially supports one version of Drupal, although other versions may also happen to work. The maintainers should go ahead and close this issue if that is in fact the planned strategy. I agree that this is reasonable. |
@greg-1-anderson. Good to know, thanks for your explanation. I hope that sooner than later a new release that supports officially Drupal 8.1 becomes available. Otherwise, the project I'm working on that depends on Drupal Commerce that also upgraded requirement to this Drupal version caused that this amazing tool is not totally functional. This makes my day very sad. However, thanks to all you for your efforts. Regards. |
Drupal core uses different versions of symfony/dependency-injection in the 8.1.x line than it does in the 8.0.x line. Even though these two versions are very close, and API-compatible, they definitely do NOT work well together.
The upshot of this is that if DrupalConsole uses symfony/dependency-injection for its DI container, then it will not be possible for a global install of it to work with both a Drupal 8.0.x version and a Drupal 8.1.x version, because the version of symfony/dependency-injection used in DrupalConsole can be compatible with at most one of these. This situation might get worse in the future; it appears that the version of Symfony never changed, even by a bugfix release, in the Drupal 8.0.x line, but I don't know that there is a policy on this. If there isn't, then it is possible that there might be a bugfix release in Drupal 8.1.x that bumps up the version of symfony/dependency-injection, making things even more difficult.
Of course, overall, site-local installs of Drush and DrupalConsole are the best way to go, but there are still a lot of folks who use global installs of these tools, so we're trying to keep things as compatible as possible. To make things more flexible for Drush, we selected league/container for our DI needs. After using it for a little while, I find that I prefer it to symfony/di. Converting wouldn't be too hard; you'd just need to convert your compiler passes to inflectors -- exact techniques might vary depending on what you're doing.
There is more discussion at drush-ops/drush#2018, especially near the end.
The text was updated successfully, but these errors were encountered: