i am using the propel runtime v1.5.4 and its related propel_generator in my zend_framework/php project since two years without any problems.
Yesterday i have updated the propel_generator via pear to v1.6.5 and the runtime library to v1.6.6. After the first build-proccess with the new generator i have a problem with the generated classmap-[project]-conf.php file:
Old Generator (v1.5.4)
...
'AutocompleteQuery' => 'AutocompleteQuery.php',
'AutocompleteTableMap' => 'map/AutocompleteTableMap.php',
'BaseAclAssertion' => 'om/BaseAclAssertion.php'
...
New Generator (v1.6.5)
...
'AutocompleteQuery' => 'AutocompleteQuery.php',
'AutocompleteTableMap' => '/map/AutocompleteTableMap.php',
'BaseAclAssertion' => '/om/BaseAclAssertion.php'
...
The new generator adds a leading slash before the ‘map’ and ‘om’ path. So the propel autoloader can not find the class-files.
Is there any config-option or a generator-template where i can change this?
Thanks.
It seems the
targetPackagebuild property is empty in your configuration. By default, Propel uses the project name as target package, so that you always have a directory before your classes:I fixed Propel to remove this limitation, that way it will generate a valid package path. I’m talking about packages here because packages are used to determine where to write files.
Documentation to understand packages in Propel:
http://www.propelorm.org/cookbook/multi-component-data-model.html#understanding_packages
Fixed by commit:
https://github.com/propelorm/Propel/commit/b03569a802471b86e6e52287974de17f836c9baa