Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I saw this, How much of Drupal 8 will rely on or be compatible with Symfony? but I don't understand if it applies to my question. Should I learn Symfony 2 to develop with Drupal?

share|improve this question
Read this immediately if you haven't already :) – Clive Apr 4 '14 at 16:30
@Clive I was searching Symfony 2 and DI, found it, and then stumbled upon the Symfony 2 Drupal 8 subject. – johnny Apr 4 '14 at 16:34
up vote 23 down vote accepted

Symfony 2, as in the full stack Symfony 2 has no bearing on Drupal 8 -- we do not use its bundles, we do not use the same routing as Symfony does (we use a botched up work on top called Symfony CMF which is made less dog slow by bastardizing my menu work on top of it but it's still undocumented, incomprehensible, does not yield to static code analysis tools and altogether is broken and slow). We do not use the same ORM (Doctrine). We are using some Symfony 2 components however there is very little visible of it to the "end" developer. For example, confusingly enough, sometimes you need to use events (what was hook_boot/hook_init in D7 is replaced by Symfony HTTP kernel events) whereas most often Drupal still uses its hooks. Confusing is the name of the game where Symfony 2 interacts with Drupal. It's an extremely poor fit and the (non)amount of the documentation of how this fit (does not) happen makes it even harder.

Edit: we do use the service container http://symfony.com/doc/current/book/service_container.html at least the static parts of it -- however dynamic service additions and alterations are done via Drupal specific means (service providers which attaches to the system via a special magic way which is neither events nor hooks. Welcome to Drupal 8.)

So: if you know Symfony 2 inside and out then a little of that will be usable in Drupal 8. If you don't then don't bother with Symfony 2 books or tutorials.

share|improve this answer
Thanks for your many contributions chx, and dare I say honest perspective on Symfony 2 usage D8; and the new APIs available in D8. – tenken Apr 4 '14 at 17:39
Don't take this wrong, but who is "we"? Are you on the Drupal core team? – johnny Apr 4 '14 at 21:10
lol @johnny. chx has been foundational. You ought to just do something like search drupal.org before that kinda question: drupal.org/user/9446 – Mixologic Apr 4 '14 at 22:01
@Mixologic It's not personal. I said don't take it wrong. I was curious if chx was part of the core team. Chx spoke with authority. I wanted to take it as such and not waste my time worrying about Symfony 2. – johnny Apr 5 '14 at 1:16
@johnny: sorry I didnt mean to come across snarky. More like astonished that somebody didn't know who chx was. I too, didnt know who chx was for a long time. I was trying to show you that a great way to determine somebodies credibility/authority in the Drupal Community is to check out their user page on drupal.org. – Mixologic Apr 5 '14 at 1:40

I "grew up" on Drupal so I was always procedural guy(Drupal is my main/only tool for making websites which is my job). At first I was very confused when I started to use Drupal 8. The OOP wasn't that hard since I knew OOP, but the new architecture was hard to get my head around. But after two weeks I started to feel like home again. This website and #drupal-contribute helped me a lot. I've read some information from Symfony documentation to understand controllers basically and no I'm working with D8 for 4 months and I feel like home again.

Things have changed but you'll learn the new ways very fast. You really don' have to learn Symfony AT ALL. I didn't.

One thing that made things MUCH easier for me was switching my IDE from NetBeans to PHPStorm because NetBeans didn't supported browsing inherited methods. After few months I cannot understand how was I able to use NB :) (though working with Git in NB is for me much better)

So to answer your question: you absolutely don't have to learn Symfony. To meake your life easier look at *.services.yml files in modules(that implements them) and also route callbacks in any modules *.routing.yml file to understand page callbacks(from hook_menu in D7).

share|improve this answer
Do you think learning to develop in 7 will be useful in 8? – johnny Apr 4 '14 at 21:12
Well, you'll have to learn Drupal's concepts anyway so it really doesn't matter. They still apply in D8. Though if you're starting just now I don't see any point in going back to D7. – Ivan Jaros Apr 4 '14 at 21:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.