I don't understand. It is named app.yml, so it is meant for application
configuration. So it seems to make sense that it would only be available
when a symfony application context exists.
- Jon
On Thu, Oct 30, 2008 at 9:40 AM, Olivier Mansour <[EMAIL PROTECTED]> wrote:
>
>
> 2008/10/30 Jonathan Wage <[EMAIL PROTECTED]>
>
>> No because by default tasks are completely bare and do not have any
>> symfony application context. In order for "app" settings to be present, it
>> must have "app" context.
>
>
> I undestand but I slightly disagree with you.
>
> You have the opportunity to define settings for all apps (understand the
> project) in /config/app.yml, but you can't access it if your not in a app
> context :-(
>
> Thanks again for your tips
> Olivier
>
>
>>
>>
>> - Jon
>>
>>
>> On Thu, Oct 30, 2008 at 9:25 AM, Olivier Mansour <[EMAIL PROTECTED]>wrote:
>>
>>>
>>>
>>> 2008/10/30 Jonathan Wage <[EMAIL PROTECTED]>
>>>
>>>> Your task needs to have application context. So you will need to add an
>>>> application argument and env option to your task so you can instantiate the
>>>> symfony context. Then those things will be available to you in tasks.
>>>
>>>
>>> thanks a lot
>>>
>>> Don't you think it's a strange behavior because my settings are project
>>> related ?
>>>
>>> Olivier
>>>
>>>
>>>>
>>>>
>>>> - Jon
>>>>
>>>>
>>>> On Thu, Oct 30, 2008 at 5:16 AM, Olivier Mansour <[EMAIL PROTECTED]>wrote:
>>>>
>>>>> Hey
>>>>>
>>>>> In config/app.yml I have something like this
>>>>>
>>>>> all:
>>>>> test:
>>>>> foo: bar
>>>>>
>>>>> In a task sfConfig::get('app_test_foo') return NULL. In a web context
>>>>> it works.
>>>>>
>>>>> Is it a bug or is there something special to init in order to have
>>>>> access to those settings. I am using sf1.2
>>>>>
>>>>> Thanks
>>>>> Olivier
>>>>>
>>>>> --
>>>>> Olivier Mansour
>>>>> [EMAIL PROTECTED]
>>>>> http://www.glagla.org
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Jonathan H. Wage
>>>> Open Source Software Developer & Evangelist
>>>> http://www.jwage.com
>>>> http://www.doctrine-project.org
>>>> http://www.symfony-project.org
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Olivier Mansour
>>> [EMAIL PROTECTED]
>>> http://www.glagla.org
>>>
>>>
>>>
>>
>>
>> --
>> Jonathan H. Wage
>> Open Source Software Developer & Evangelist
>> http://www.jwage.com
>> http://www.doctrine-project.org
>> http://www.symfony-project.org
>>
>>
>>
>
>
> --
> Olivier Mansour
> [EMAIL PROTECTED]
> http://www.glagla.org
>
> >
>
--
Jonathan H. Wage
Open Source Software Developer & Evangelist
http://www.jwage.com
http://www.doctrine-project.org
http://www.symfony-project.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---