I have tried to use a parameter in my app.yml file inside a task in symfony 1.4, but it doesnt get the value.
sfConfig::get()
Do you have any advice?
By default tasks are ran only with a project - meaning they don't have access to your settings in app.yml. You either need to:
explicitly pass an app parameter every time you call the task, this is done like:
php symfony ns:task --application=frontend
add it as a default parameter in your configure()
:
$this->addOptions(array(
new sfCommandOption('application', "app", sfCommandOption::PARAMETER_REQUIRED, 'The application name', "frontend")
));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With