-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix getting template source and update deps #968
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix getting template source and update deps #968
Conversation
src/Twig/SourceCodeExtension.php
Outdated
{ | ||
if (!$template instanceof TemplateWrapper && !$template instanceof Template) { | ||
throw new \Exception(sprintf( |
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.
I'm not sure this exception is needed... this function is private/local and $twig->resolveTemplate($template)
only returns TemplateWrapper
or Template
.
I'd suggest adding a PHPDoc block instead.
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.
I'm fine with PHPDoc, just was coding defensively... Let's wait for more feedback then
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.
I agree with Yonel on this one.
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.
OK, it's simpler now 👍
Shouldn't we also update this line? Line 33 in 4bc69f6
|
Hm, don't think we needed. Updated to what? |
Thank you Victor; it's merged now. |
Fix #967 and some vulnerability issues in deps