sulu / SuluArticleBundle

Bundle for managing localized content-rich entities like blog-posts in the Sulu content management system
MIT License
57 stars 77 forks source link

Use load instead LoadTemplate for compatibility with Twig 3 #471

Closed plozmun closed 4 years ago

plozmun commented 4 years ago
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets -
Related issues/PRs -
License MIT

What's in this PR?

Method loadTemplate was deprecated in Twig 1.28 only for internal use, see this https://twig.symfony.com/doc/1.x/api.html#rendering-templates and https://twig.symfony.com/doc/1.x/tags/include.html With Twig 3.0 this method fail:

Too few arguments to function Twig\Environment::loadTemplate(), 1 passed in /var/www/html/vendor/sulu/article-bundle/Controller/WebsiteArticleController.php on line 162 and at least 2 expected

BC Breaks/Deprecations

No BC Breaks. This bundle requires ^1.41

plozmun commented 4 years ago

ping @danrot @alexander-schranz

alexander-schranz commented 4 years ago

@plozmun bugfixes should target the lowest version where it appears, can you rebase to release/2.0 branch.

plozmun commented 4 years ago

Done!

alexander-schranz commented 4 years ago

@plozmun thank you for your contribution!