Hello
If a project happens to be in a directory which has a /modules/ part in it the
Admin Generator looks for the wrong filename and outputs:
Fatal error:
Class 'autotesttableActions' not found in
/home/ch/workspace/modules/bug/apps/frontend/modules/testtable/actions/actions.class.php on line 11
As you can see there is a directory "modules" above the base directory of the Symfony application "bug". This confuses the following line of symfony-1.1 trunk:
lib/config/sfGeneratorConfigHandler.class.php line 68
...
public function execute($configFiles)
...
// hack to find the module name
preg_match('#modules/([^/]+)/#', $configFiles[0], $match);
$generatorParam['moduleName'] = $match[1];
My suggested fix would be to make the regex "greedy" by adding ".*" at the beginning:
--- lib/config/sfGeneratorConfigHandler.class.php (revision 8631)
+++ lib/config/sfGeneratorConfigHandler.class.php (working copy)
@@ -64,8 +64,8 @@
// generator parameters
$generatorParam = (isset($config['param']) ? $config['param'] : array());
- // hack to find the module name
- preg_match('#modules/([^/]+)/#', $configFiles[0], $match);
+ // hack to find the module name after the last /modules/ directory
+ preg_match('#.*/modules/([^/]+)/#', $configFiles[0], $match);
$generatorParam['moduleName'] = $match[1];
// compile data