Search code examples
phpormdoctrinepropel

PHP: Choosing ORM for future expansion and changes?


I come from a Codeigniter MVC background that we've been working with for some time now. It's time to roll our own framework for a big project, but we have come now to the Database part and got a bit confused immediately.
In Codeigniter, we've used the ActiveRecord for all SQL database connections, which has worked well, but since it's not a separate part, we are on the search for a ORM solution to write as little code as possible in our models to get our data from the databases.

We have reviewed the major alternatives including Doctrine2 and Propel, but we're quite scared by the fact of those configuration files and how extensive these libraries really are.

Is it really good sense, from a maintenance-wise perspective to choose an ORM that requires editing in so many more files then the obvious MVC's when a schema change is rolled out?


Solution

  • Truth be told, propel and doctrine are perhaps the best php ORM in the market right now, I use propel which is bundle with symfony framework but once you have covered the documentation it really makes a huge difference and the both ORMs know how to stay out of your way when you need native sql. I would recommend you pick one(propel/doctrine) from the two and just invest time and go through the documentation, the end result will be worth it.