views:

61

answers:

2

It seems doctrine 2 is compatible only with PHP 5.3 and up, and is NOT compatible with php versions before 5.3. Can someone confirm if this is true?

+5  A: 

If the docs say 5.3 then it is 5.3 for a reason, presumably because some code uses some functionality that is only available in 5.3.

You might find that the parts of Doctrine2 you need can run under 5.2, or you can write functions for 5.2 to mimic those that are in 5.3.

But bear in mind that if you ever want to use allow its features your going to have to upgrade to 5.3 or move hosts.

Use it under something other than 5.3 and see what happens.

jakenoble
I think writing functions for 5.2 to mimic those in 5.3 is a pretty risky business. There's a lot of work that went into this ORM and there's no way a developer not closely familiar with the project could pull this off in a short time and bug-free, then continue to move on with the main project at hand. An easier option would be to switch hosts. That's what I'm probably going to do when this version is ready.
jblue
+5  A: 

Doctrine 2 heavily uses PHP namespaces. So, yes, you won't have luck with it under PHP < 5.3.

By the way: they use the namespaces for both internal code and qualified names for your models. You might find portions of Doctrine that you can re-use under 5.2, but I wouldn't be too optimistic about that.

Boldewyn