I was writing a custom Pake task for a project and was completely stumped as to why the task wouldn’t show up from the command line. Since I only usually write pake tasks for plugins, I was completely confused as to why a file named tasks.php in myproject/data/tasks wouldn’t register its tasks. It turns out that symfony has very specific file naming conventions for Pake tasks depending on where you’re writing them.
Symfony tasks located in:
sf_symfony_data_dir/tasks (the symfony library’s tasks) must have an sfPake*.php naming scheme
sf_data_dir/tasks (your project’s tasks) must have a myPake*.php naming scheme
… and of course plugin tasks located in sf_root_dir/plugins/*/data/tasks can use *.php (which is probably why I’ve never run into this little conundrum before.
You can check which tasks are registered in your project by running:
symfony -T
… at the command line.
maybe you should create a ticket about this because it’s kind of counter intuitv..
probably even the developers aren’t aware of this
I’m sure it was a conscious decision by them since most of the classes that you can override are prefixed with “my”… just like the myUser.class.php and myActions.class.php files. It’s just not documented anywhere (at least as far as I can tell). Then again, making your own pake tasks isn’t really documented either.