Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Invalid
-
Affects Version/s: 1.2.0-BETA2
-
Fix Version/s: None
-
Component/s: Behaviors, File Parser, Import/Export, Schema Files
-
Labels:None
-
Environment:WAMP (W XP, A 2.2.11, M 5.1.36, P 5.2.6), Zend Framework 1.9.5, Doctrine 1.2.0-BETA2
Description
When defining a schema such as
Schema
--
Something:
columns:
id:
type: integer(4)
autoincrement: true
primary: true
actAs:
XyzCodable:
and then attempting to set an implementation such as
Doctrine_Manager::getInstance()->setImpl('XyzCodable', 'Wurst_Doctrine_Template_XyzCodable');
no effect on the generated base models can be observed. In the generated models, instances of the class
XyzCodable
are attempted to be created, which, however, does not exist.
When defining a schema such as
Schema
--
Something:
columns:
id:
type: integer(4)
autoincrement: true
primary: true
actAs:
Wurst_Doctrine_Template_XyzCodable:
the corresponding base model is generated just fine, however, while processing
Doctrine_Core::generateModelsFromYaml($schemaPath, $modelsPath, $options);
a PHP warning such as
Warning: include(Doctrine\Template\Wurst\Doctrine\Template\XyzCodable.php) [function.include]: failed to open stream: No such file or directory in F:\public\wurst\local\zf\library\Zend\Loader.php on line 83 Warning: include() [function.include]: Failed opening 'Doctrine\Template\Wurst\Doctrine\Template\XyzCodable.php for inclusion (include_path='F:\public\wurst\local\zf\public\..\application\../library/Minify;F:\public\wurst\local\zf\public\..\application\../library/Doctrine;F:\public\ao\local\zf\public\..\application\..\library;.;C:\php5\pear')
is produced.
I believe that this issue should be fixed, as custom templates and behaviours should not necessarily reside in the Doctrine namespace, especially not when updating via SVN.
I think you are not understanding correctly. You are not using this correctly.
Doctrine_Manager::getInstance()->setImpl('XyzCodable', 'Wurst_Doctrine_Template_XyzCodable');Go back to the documentation and read what setImpl() is for. The class name "Wurst_Doctrine_Template_XyzCodable" is fine, your Zend autoloader should be configured to not throw fatal errors. Be sure that one of your autoloaders can autoload the class "Wurst_Doctrine_Template_XyzCodable"