Lukas Kahwe Smith wrote:
> On 02.11.2009, at 10:10, Fabien Potencier wrote:
>
>>> Now how do I get @db_logger into the services.yml definition?
>> It was not possible before today, as a parameter could not be a
>> reference to a service.
>>
>> As of r23506, this is possible, so your problem is solved.
>>
>> In dev, the db_logger parameter can be a reference to the db_logger service:
>>
>> parameters:
>> db_logger: @db_logger
>
>
> Thanks, overlooked this reply (*nudge* dedicated mailinglist *nudge*).
>
> But I am seeing issues with caching. In the generated code it uses
> $this->getParameter('db_logger')
> This however is not the instance of the db_logger service, instead its an
> instance of sfServiceReference:
>
> object(sfServiceReference)[2
> ]
>
> protected 'id' => string 'db_logger' (length=9)
>
> I am not sure what your plan is here, but I have attached a simple patch that
> makes getParameter() check if the parameter is an instance of
> sfServiceReference. though this will obviously not work with getParameters(),
> so this is probably not what you intended.
>
This is definitely an issue we should fix. Can you create a ticket and
attach your patch?
Thanks,
Fabien
> regards,
> Lukas Kahwe Smith
> [email protected]
>
>
> --
>
> 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=.
>
>
--
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=.