Being a little bit bored today I started to port
XJConf to PHP 5.3 using namespaces. Oh boy. You should never even think about porting your application completely to namespaces if you do not have enough unit tests! Consider something like this:
if (get_class($instance) == $someClassName) {
// do this
}
It is most likely that $someClassName does contain the name of the class only without the namespace prefix. As get_class() now returns the full qualified class name this comparison will fail - you need to make sure that $someClassName contains the full qualified class name. I'm sure there is a lot of code out there like this or similar.
Another point is that you should not import classes from the same namespace, I had a situation where this lead to a fatal error because of loading the same class twice, however I was not able to create a reproducable test case after I solved the problem.
As I said I would not recommend the transition without unit tests, but you have to adjust them as well. For XJConf I just had to change two things (I'm using SimpleTest):
1. expectException() requires the full qualified class name of the expected exception now
2. creating mock objects: Mock::generate('Tag'); needs to be changed to Mock::generate('net::xjconf::Tag', 'MockTag'); to enable SimpleTest finding the correct class (full qualified class name), additionally you need to state a class name for the mock class to be created, else SimpleTest will fail to create the mock class because it would produce something like Mocknet::xjconf::Tag which of course results in a parse error.
Finally __autoload() makes really fun now. It receives the full qualified class name as argument, it is a simple task to change this into the correct path to the class file. If you do not use it until now due to the quirks required when not using class names like My_Application_Has_Really_Really_Long_Class_Names you should really consider using it after migrating your application to namespaces.