SfConfig :: get job in symfony

I tried using the parameter in the app.yml file inside the task in symfony 1.4, but it does not get the value.

sfConfig::get() 

Do you have any tips?

+7
source share
1 answer

By default, tasks are launched only with the project - this means that they do not have access to your settings in app.yml. You either need to:

  • explicitly pass the application parameter every time you call the task, this is done as:

     php symfony ns:task --application=frontend 
  • add it as the default parameter in configure() :

     $this->addOptions(array( new sfCommandOption('application', "app", sfCommandOption::PARAMETER_REQUIRED, 'The application name', "frontend") )); 
+14
source

All Articles