Answer the question
In order to leave comments, you need to log in
How are services loaded in symfony?
Trying to figure out symfony3.3
in a cached container
%project_root%/var/cache/dev/appDevDebugProjectContainer.php
/**
* Gets the public 'assets.context' shared service.
*
* @return \Symfony\Component\Asset\Context\RequestStackContext
*/
protected function getAssets_ContextService()
{
return $this->services['assets.context'] = new \Symfony\Component\Asset\Context\RequestStackContext(${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->get('request_stack')) && false ?: '_'});
}
${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->get('request_stack')) && false ?: '_'}
$this->get('request_stack')
isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->get('request_stack')
${($_ = isset($this->services['request_stack']) ? $this->services['request_stack'] : $this->get('request_stack')) && false ?: '_'}
Answer the question
In order to leave comments, you need to log in
A small correction - it's better to say "compiled" instead of "cached" container. The latter captures the essence better.
About the question. As far as I understand, for some reason, class names may contain the $ symbol when compiled, so the class name cannot be deduced in the usual way. See here: https://github.com/symfony/symfony/pull/19681/file...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question