Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.2.0
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Environment:Mac os, leopard 10.5. I use conservative model loading and autoload table classes.
Description
When migrating from doctrine 1.1.0 to 1.2 it fails to load the model classes anymore. It complains it cannot find the model class 'Building' when doing a Doctrine::getTable('Building')->findAll(). See attached backtrace. After hours of digging in the code and countless debug statements I found out that the automatic loading of the model classes is removed (for some good reason?) from the doctrine autoloader(). This will off course give exceptions for people depending on this mechanism!
It seems that the solution is to add another spl_autoload_register(array('Doctrine','modelsAutoload')); to the bootstrapper (apart from the normal spl_autoload_register(array('Doctrine','autoload'));
But the strangest thing is: I could not find any information about this, although this is (I would say) VERY critical information for people depending on auto model class loading and would like to keep it working! So I would suggest to put this critical information into the ('migration' or 'what is new') documentation of 1.2 because I could not find it. Yes, there is something about PEAR like model loading, but that is not what I want, I would like to keep my app still working after migrating to 1.2.
I added some information about this to the upgrade file. Thanks for reporting it and sorry about the missing information.