Affects Version/s: 1.2.3
Fix Version/s: None
When using a behaviour with generateFile=true, som eproblematic issues occur:
Let's take for example i18n:
generatePath: <?php echo sfConfig::get('sf_lib_dir') ?>/model/doctrine/translations
1) The translation model class and it's base class are not created with generate.php (aka symfony doctrine:build --model), but every time a translation model is used. This is not the expected behaviour, because
a) this makes autoloading these classes impossible.
b) the APC cache always sees a new change time, and recaches the fiels. This results in a quick fragmentation of the cache with segmentation faults in the long run.
2) The permissions for the created files are wrong. Normal executable php scripts should not be writable by the web server (admitting that with the current implementation, this is not problem, because the files are created again for each request)
3) The path is hard coded. This brakes deployment by svn update, and I would prefer not to build models on a production server.
- generate the files at build model time
- hopefully find a solution with the path
I realize that most development resources are now in the new doctrine, but this issue (especially the apc fragmentation) is a huge problem for me. If you won't fix it, let me know, then I would try to propose a patch. I checked the code, and the building and behaviour internal part of doctrine are not too well documented, and my patch would be far from perfect.