I am looking at Drupal for some websites I want to set up. I have been a Symfony developer in the past so would like to use doctrine when I create a custom module. Is it implemented in 9 dev yet? Any idea of when 9 will be at a stable version? Or will it not be implemented until a future version of 9?

closed as unclear what you're asking by Kevin, Mario Steinitz, Pierre.Vriens, mradcliffe, leymannx Mar 26 at 18:40

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


Drupal 9 is planned for some time in 2020. No, Doctrine ORM is not in a 9.x-dev branch.

As far as implementing, there are no immediate plans for it. D8 has its own custom DBAL, utilizing PHP PDO, and it's own custom ORM via its Entity API.

Doctrine has been proposed as a replacement but it's not an easy undertaking so don't expect it any time soon. Pre-existing DBAL/ORM components don't get replaced quickly.

If you want to utilize Doctrine ORM or DBAL, there are existing module projects out there that implement it. You're better off utilizing those projects or the Drupal Entity API (if your objects are managed content) than waiting for it to show up in D9

  • In Symfony you can load a particular entity, and it automatically loads any linked entities. For example if I load a student, than classes and teachers will be loaded, and I can access them in TWIG. In Drupal, will it load linked entities automatically and can I access them directly in TWIG? – MicWit Mar 24 at 0:43
  • 1
    Drupal entities are linked via entity reference fields. See drupal.stackexchange.com/questions/222732/… on using referenced entities in TWIG. – Shawn Conn Mar 24 at 1:08

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