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

Avoid using symfony/dependency-injection #2061

Closed
greg-1-anderson opened this issue Mar 23, 2016 · 7 comments
Closed

Avoid using symfony/dependency-injection #2061

greg-1-anderson opened this issue Mar 23, 2016 · 7 comments

Comments

@greg-1-anderson
Copy link
Contributor

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.

@joelpittet
Copy link
Contributor

Cross posting with a core issue that relates:
https://www.drupal.org/node/2690835

@greg-1-anderson
Copy link
Contributor Author

Related: drush-ops/drush#2103

@greg-1-anderson
Copy link
Contributor Author

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?

@greg-1-anderson
Copy link
Contributor Author

Related: #2022

@citlacom
Copy link
Contributor

Is there a fix for this? Should I upgrade Drupal Console to resolve this problem?

@greg-1-anderson
Copy link
Contributor Author

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.

@citlacom
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants