Doctrine vs Propel

Now that symfony 1.4 is out, it's time again for me to answer a lot of questions about which ORM people need to use. I don't have a definitive answer, but today, I want to share some numbers with you.

First, let me re-iterate that both Doctrine and Propel are equally supported in symfony 1.X. And thanks to the new installer feature of symfony 1.4, choosing between one or the other is just a matter of passing the --orm option when creating a project:

$ php symfony generate:project foo --orm=Doctrine

$ php symfony generate:project foo --orm=Propel

As for any Open-Source community, it's not easy to find metrics that tell you what people use and how they use it. You can measure the number of tickets for a specific feature, count the number of people asking for help on Propel or Doctrine. But for the Propel vs Doctrine question, we have two more reliable metrics.

First, the traffic on the Jobeet tutorial. The Jobeet tutorial is available for both Propel and Doctrine, and is the most popular piece of documentation for newcomers. As you can see on the graphic on the side, Doctrine has became the most popular ORM in June 2009, and going strong since then.

We can also compare the number of "Practical symfony" books sold during since the beginning if 2009. The difference between Propel and Doctrine is much more important, as we sell approximately five times more Doctrine books than Propel ones.

Choosing between Propel and Doctrine is really a matter of taste. Both have great features and also some weaknesses. But after you make your choice for a project, stick with it. Migrating from Propel to Doctrine or the other way around is just a huge task.

Help the Symfony project!

As with any Open-Source project, contributing code or documentation is the most common way to help, but we also have a wide range of sponsoring opportunities.


I choose Doctrine :)
Gee, I was under the impression that switching from Propel to Doctrine was the right thing to do, but indeed, it is a huge task. Even though my project isn't that large, it has already taken up many hours. Still I believe Doctrine has a bright future ahead, so I'll just soldier on!
I like both - Propel and Doctrine. But more use Propel :)
We won't be migrating any projects from Propel to Doctrine but we start all new projects with Doctrine.
I used to love propel, but I think that's Doctrine is the future.. so new projects with Doctrine!
I was hoping from the title that this would be a benchmarking post. Let me know if you want to put those together and demonstrate which ORM actually performs better.
Doctrine my friend Doctrine forever and ever.... :)
Fabien, why not put up a poll feature here on symfony project web page?

Questions like these could be interesting to follow with a poll.
Propel :-)

Ack @Daniel, Polls would be great!
@Jesse: Benchmarking Propel vs Doctrine does not make much sense. I can easily make a benchmark to show you Propel is much faster, or that Doctrine is much faster. It really depends on your database schema, what you do with it, and how you use all the features at your disposal.
Regarding Benchmarks, Roman has a good post here:
Migrating to Doctrine with big project is not easy task. Second problem is benchmark. I don't know witch lib is faster I think that when Doctrine 2.0 will be available than will be much better than Propel but to this time I'll use Propel.
I choose plugin DbFinder, for compatibility.
As a Propel fanboy, I don't like Doctrine. But it does have nice features... Propel will probably have them in the future, version 1.5 is under development. It just suffers the fact that the lead developer almost forgot about for a lot of time, before other developers took his place.

@fabien This post does not clear things up about the future of Propel in symfony 2. Will it still be dropped, now that is being developed again?
Call me crazy but i still MUCH prefer Propel to Doctrine. I do like alot of Doctrine's features (mainly its much better inheritance), and all my new projects will most likely use Doctrine. That said its not because i personally like using Doctrine, its just that going forward most plugins will most likely be developed for Doctrine and the best CMS plugins (Apostrophe, Sympal) are using Doctrine. Im going to miss using Propel :-)
Fabien, thanks for the stats. I expected such results. There have been some projects for Propel-to-Doctrine conversions recently over the Net.
And what about writing an article about Propel vs Doctrine: strengths and weaknesses of both?
@davide: I have already wrote/talked a lot about that. The core team will provide support for Doctrine 2 in Symfony 2.
I would like to give a "spoiler" here for all you Propel-fans: I'm working to implement all those missing Propel behaviors, migrating them from old symfony plugin to Propel 1.5 branch. I'm planning to release a plugin compatible with Propel 1.4 (and so usable with current symfony versions)
>First, the traffic on the Jobeet tutorial. The Jobeet tutorial is available for both Propel and Doctrine, and is the most popular piece of documentation for newcomers.

Yes, but the Jobeet tutorial used to have a link to the propel version from the homepage. At some point that changed to the jobeet version. I think a better test would have been for the link to go to a page where you could choose which version of the tutorial you wanted to view.
Using the Jobeet popularity as a metric for Propel vs. Doctrine strikes me as similar to "news framing".. It's like saying "people are more interested in Tiger Woods than in global warming..
- not neccessarily true, but reflective of the coverage the news outlets are offering. Similarly, Doctrine is being promoted as the "official" ORM for symfony, and newcomers are being told that it's the safer bet for the future. Naturally they'll seek out Doctrine tutorials more, but it doesn't reflect an educated choice based on actual preference.
What puzzles me a little is why the choice of ORM is becoming such a big deal. Propel used to be the default ORM, and yet Doctrine was not neglected. Similarly I'd imagine when Doctrine becomes the default, Propel won't be forgotten about either. "Competition" is good! :)
An ORM with both object (Propel Criteria) and sql-like (Doctrine HQL/DQL) support like hibernate for java would win.

I ll stick with the object one until then =)
Propel is much easier to use, hence less people need to read a book or tutorial about it. Doctrine is too complicated, so people need to read every book about it and still need to ask in the forum. :-)
This post is a real shame!

I can't understand why Fabien use so weak arguments ("look, propel is going down, doctrine is going up...").

I think making a choice between propel and doctrine is a serious question, and must have serious responses (benchmark, functionnalities, evolution, etc.): give use links, that's usefull!
see what google.trends say:
@Lionel: A shame? Read the post again. It's not about saying Doctrine is better than Propel, far from it. It's just about what newcomers use most with symfony today. A lot of people ask me this question again and again, and this post is just an answer based on the traffic on the symfony website. That's all. Nothing more. Using Propel or Doctrine is YOUR choice. There is no definitive answer.
+1 Propel.

As others have said above, I find Propel requires less documentation reading than Doctrine to get going. Propel seems more intuitive, whereas when I tried doing simple things with Doctrine, I found myself spending a long time sifting through the documentation.

Doctrine's inheritance looks really good, and hopefully Propel 1.5 can support this and other features found in Doctrine but currently missing in Propel.

I haven't voiced my opinion about this before, but the fact that Propel will not officially be supported by the "core team" in Symfony 2 has unsettled me.

Just over one year ago, Propel was the officially supported ORM in Symfony. Next year it will be Doctrine. What about 2 years after that? Investing resources into something that potentially may not be officially supported in the near future does not help in getting a good night's sleep.
I have always used Propel, but there seemed to be so much focus on Doctrine being the way forward so I gave it a try...

Although powerful, it seemed like a step backwards! Suddenly I was having to put table names into queries, remembering table structures and lots more stuff which Propel would take care of me.

My conclusion would be that Propel is easier to learn, more intuitive and does most of the simple stuff so well. If you need more from your application, things such as table inheritance and behaviours in Doctrine suggest that it may be worth learning that. That's just my opinion though!
It doesn't mean that more people uses Doctrine. It means that more (new?) people wants to learn about it.

Propel is with symfony from the beginning and most users already know how it works so.. theres no reason to read it again.

I'm currently using Propel (with sf 1.2.10) and I'd like to see some specific benchmarks about resources and performance.

And oh! I'm going to read Jobeet Doctrine tutorial only because I'm curious for it. But I'm still using propel.
Doctrine Rocks
From reading the comments, the title of the post was probably a little unfortunate. Maybe "Doctrine vs Propel Jobeet Traffic" would've been a bit better. Its just new water on the wheels of endless and senseless "propel vs doctrine" discussions.

Propel and Doctrine are not really very similar. And Doctrine 2 is a whole new game and makes it even more difficult to compare them. Then it's like comparing Apache Torque and Hibernate. Both useful, but each with an entirely different approach and good for different things, depending on the project.

"Suddenly I was having to put table names into queries".
Not sure what project you used, but it wasnt Doctrine.

Hell, use whatever you want. If you feel comfortable and happy with Propel, thats great, wonderful, splendid, etc. but don't try to make it look superior to something else that you dont know equally well or dont event understand (yet). Just use it and be happy.

Most of the difficulties, annoyances, frustrations, etc. that I've seen in the php world with regards to using ORM tools is just a result of not knowing what they're good for in the first place. Thats probably because many people think they somehow "must" use them, since others use them. Then they get frustrated because they dont really understand how this thing is supposed to be used. You're really doing yourself and the developers of these projects a great disservice if you're using these tools without knowing what you want them to do for you or what they're good for at all.

To be fair, I see this problem often in the java world, too. People getting frustrated with Hibernate & co because they just dont understand the purpose but started using it because others do. All these people are much better off with avoiding these tools until they see the need themselves in some project.

Here's a recommendation: If you're really interested in the topic of object-relational mapping / relational object persistence, look beyond PHP and Rails ActiveRecord. It will give you a whole new level of insight. If you dont want or dont have the time to do that, then stop trying to compare and judge these projects based on so little knowledge. Just use them, or not.
not sure how many of you know this but Mr Francois Zaninotto is now taking over propel development

some of you may remember how much of an impact francois had in symfonys early days (documentation, plugins, support etc etc) before the "epic fallout"

In his recent involvement with propel he has already released a new version (1.4) and blogged about the changes for the yet to be released 2.0

Propel has a bright future and this is one fella to watch, so i'll be sticking to propel
it's a difficult topic.

as many people said before me, the post's name is not correctly selected, this is only traffic and if we think that the default link is pointing to the doctrine tutorial isn't totally true to say that doctrine is capturing more attention.

on the other hand like xplo have said before, we need 1 orm library that implement the two ways to use a db.

so, pls don't put meaningless post like this one

I am a big fun of Propel and I find it so much easier to use than Doctrine. Uprising traffic of Doctrine does not mean so much. I am getting afraid as I see Propel losing attraction.
i worked with both and found doctrine easier.
I gotta say: Propel has a lot of strengths, and I'm saddened to have heard of its deprecation.

For starters, I'm generally displeased with Doctrine's DQL. That said, I'm certainly aware that many people find Propel's Criteria-based approach a bit maddening. And I get that. So I'm willing to chalk this disparity up to a "taste" issue.

One thing that's really fantastic about Propel is the fact that the base model classes it generates actually have their accessors and mutators declared as plain old PHP functions, rather than Doctrine's approach of using the "magic" _set() and _get() approach (please, someone tell me if I've overlooked an option in Doctrine that accomplishes this).

There are two (related) really good things that you get as a result of Propel's approach: 1) code completion when using an IDE, and 2) all accessors and mutators show up in phpdoc.

This makes a HUGE difference in projects with larger model APIs.
Instead of asking or compare which one would be the best ORM, I would like to ask for a post about which one is the right ORM for a specific situation. A post explaining this will be more usefull for new people (like me).
Propel, definately ;) but Doctrine will be symfony first choice in the future, i suppose.
@jL: agree with you
Propel is easy to get documented and is better when using an IDE. How can Doctrine compete with that?
Agree with most of you that the title of this blog post is not suitable at all with the content.
Besides I don't like the attitude of push down Propel in favour to doctrine like the introduction to the 14 day of the More with symfony book when it says "The Doctrine 1.2 project became the new default symfony ORM library both because it is easier to use than Propel". Don't understand which is the point of this and why are you so competitive when Propel was the default ORM for to many years...
IMO, DbFinder offers a much better interface than both Propel and Doctrine. It's the first plugin I install for every new project.
The only reason that I use Doctrine is that symfony team will not offer support for Propel. Propel will work with sf, but that doesn't mean that will have the same support and quality.
Is impossible join both ORM ??? i ´ll be crazy with this Debate!
What about the dbdesigner to doctrine support (xml or yml) like the Dbdesigner to propel plugin?

I'm working with huge projects (30-60 tables in my dbs) and is really hard to update it in yml (doctrine project) and very easy in xml (propel projects).

Will be Symfony 2 compatible with Propel ? ;_;
I recently came accross your blog and have been reading along. I thought I would leave my first comment. I dont know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very you also can read my website,if you like

I recently came accross your blog and have been reading along. I thought I would leave my first comment. I dont know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very you also can read my website,if you like
ugg boots or want to buy
ugg boots,welcome to my website: or

Comments are closed.

To ensure that comments stay relevant, they are closed for old posts.