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.

regards,
Lukas Kahwe Smith
m...@pooteeweet.org


--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=.


Attachment: sfServiceContainer.php.patch
Description: Binary data

Reply via email to