When comparing Doctrine ORM vs RedBeanPHP, the Slant community recommends RedBeanPHP for most people. In the question“What are the best PHP ORMs?” RedBeanPHP is ranked 1st while Doctrine ORM is ranked 2nd. The most important reason people chose RedBeanPHP is:
It requires basically nothing except database credentials making it awesome to use.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Should feel familiar to Java developers
Since Doctrine is inspired by Hibernate, a very popular Java ORM. It should feel very familiar to Java developers who need to use a PHP ORM, especially if they have used Hibernate before.
Pro Easy to find support
Doctrine is considered the most popular PHP ORM out there. As such, it has a big community which brings a lot of perks. Namely a great deal of learning resources and it's easier to find help for any issue you might have.
Pro Good, constant support
Doctrine is the default ORM for Symphony, one of the most widely used PHP frameworks. This means that it's rather well-supported and will continue to be supported at least for as long as Symphony is.
Pro Provides a flexible alternative to SQL
Doctrine implements its own object-oriented SQL dialect called DQL. It's inspired by Hibernate's HQL and it provides developers with a powerful alternative which helps in gaining flexibility without having to resort to code duplication.
Pro Zero configuration
It requires basically nothing except database credentials making it awesome to use.
Pro Great for rapid development/prototyping
Since it employs a strategy of zero configuration, it can create all required databases and tables on the fly. Making it a great ORM to use when quickly prototyping a product.
Pro SQL extensions
Offers additions to SQL that makes querying very easy.
Pro CLI applications can be written in no time
You can generate CLI applications in no time as well.
Cons
Con Not so easy to setup
You follow the tutorial, there are some errors, you search google, you fix them, then you go for it, then new errors... after 30mins not working, bye bye.
Con Requires learning a new query language
Since you need to know DQL to use Doctrine to its full potential, you need to take the time to learn and get used to it.
Con May be overkill for small projects
Since it's a fairly large library, it would be a bit of an overkill to be used in a small project. Since for example it wouldn't really make much sense for the ORM to take up to half of the project's size.
Con No persistent db connections
If you have a db in a separate server, it will have a very poor performance.
Con Not suitable for existing projects with a custom database
Since RBP has a no-config approach, it enforces pretty strict database conventions. This does not make it a good ORM for an existing custom database.
Con Doesn't empty the legacy ORM columns from the table, like user and instead only adds user_id to it
Alternative Products
