Skip to content

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

Closed

Conversation

bocharsky-bw
Copy link
Contributor

Fix #967 and some vulnerability issues in deps

{
if (!$template instanceof TemplateWrapper && !$template instanceof Template) {
throw new \Exception(sprintf(
Copy link
Member

@yceruto yceruto Apr 26, 2019

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.

Copy link
Contributor Author

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

Copy link
Member

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.

Copy link
Contributor Author

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 👍

@yceruto
Copy link
Member

yceruto commented Apr 26, 2019

Shouldn't we also update this line?

"twig/twig": "^2.6",

@bocharsky-bw
Copy link
Contributor Author

Shouldn't we also update this line?

Hm, don't think we needed. Updated to what?

@javiereguiluz
Copy link
Member

Thank you Victor; it's merged now.

@bocharsky-bw bocharsky-bw deleted the fix-getting-template-source branch April 30, 2019 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

500 error after update
3 participants