Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[TwigBundle] changed the runtime loader to return null if there is no match#20119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
263f637 tod7b912bCompared7b912b toc03fd80Compare| return$this->container->get($this->mapping[$class]); | ||
| if (null !==$this->logger) { | ||
| $this->logger->warning(sprintf('Class "%s" is not configured as a Twig runtime. Add the "twig.runtime" tag to the related service in the container.',$class)); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
What about simply injecting a null/void logger if non is configured?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Because I don't like forcing using a Logger if not available.
… if there is no match (fabpot)This PR was merged into the 3.2-dev branch.Discussion----------[TwigBundle] changed the runtime loader to return null if there is no match| Q | A| ------------- | ---| Branch? | master| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets | n/a| License | MIT| Doc PR | n/aping@stofCommits-------c03fd80 [TwigBundle] changed the runtime loader to return null if there is no match
ping@stof