sfPropel15Plugin error, “class ‘FooPeer’ does not have a method ‘getUniqueColumnNames'”
Stupid me made the same mistake twice in a row so I’m documenting it for humanity.
I’m updating an old Symfony project to use Symfony 1.3/1.4 and Propel 1.5 through François Zaninotto’s sfPropel15Plugin.
Problem:
I followed the README, right? But…
$ ./symfony propel:build --forms >> schema converting "C:/web/myproject/config/schema.yml" to XML >> schema putting C:/web/myproject/config/generated-schema.xml >> propel Running "om" phing task >> file- C:/web/myproject/config/generated-schema.xml >> autoload Resetting application autoloaders >> autoload Resetting CLI autoloader >> propel generating form classes PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class 'FooPeer' does not have a method 'getUniqueColumnNames' in C:\web\myproject\plugins\sfPropel15Plugin\lib\generator\sfPropelFormGenerator.class.php on line 485 PHP Stack trace: PHP 1. {main}() C:\web\myproject\symfony:0 PHP 2. include() C:\web\myproject\symfony:14 PHP 3. sfSymfonyCommandApplication->run() C:\symfony1.3\lib\command\cli.php:20 PHP 4. sfTask->runFromCLI() C:\symfony1.3\lib\command\sfSymfonyCommandApplication.class.php:76 PHP 5. sfBaseTask->doRun() C:\symfony1.3\lib\task\sfTask.class.php:97 PHP 6. sfPropelBuildTask->execute() C:\symfony1.3\lib\task\sfBaseTask.class.php:68 PHP 7. sfTask->run() C:\web\myproject\plugins\sfPropel15Plugin\lib\task\sfPropelBuildTask.class.php:135 PHP 8. sfBaseTask->doRun() C:\symfony1.3\lib\task\sfTask.class.php:173 PHP 9. sfPropelBuildFormsTask->execute() C:\symfony1.3\lib\task\sfBaseTask.class.php:68 PHP 10. sfGeneratorManager->generate() C:\web\myproject\plugins\sfPropel15Plugin\lib\task\sfPropelBuildFormsTask.class.php:72 PHP 11. sfPropelFormGenerator->generate() C:\symfony1.3\lib\generator\sfGeneratorManager.class.php:126 PHP 12. sfGenerator->evalTemplate() C:\web\myproject\plugins\sfPropel15Plugin\lib\generator\sfPropelFormGenerator.class.php:106 PHP 13. require() C:\symfony1.3\lib\generator\sfGenerator.class.php:84 PHP 14. sfPropelFormGenerator->getUniqueColumnNames() C:\web\myproject\plugins\sfPropel15Plugin\data\generator\sfPropelForm\default\template\sfPropelFormGeneratedTemplate.php:34 PHP 15. call_user_func() C:\web\myproject\plugins\sfPropel15Plugin\lib\generator\sfPropelFormGenerator.class.php:485 ... etc ... |
Solution
I removed too much of the default config in propel.ini..
Make sure this original line is still intact in propel.ini, even though you’ve removed/commented out all the propel.behavior
lines that point to the old sfPropelPlugin:
propel.behavior.default = symfony,symfony_i18n |
That is true, thank you for this 🙂