Skip to content

Commit

Permalink
minor #3855 Update signature to acknowledge a TemplateWrapper (richar…
Browse files Browse the repository at this point in the history
…dhj)

This PR was merged into the 3.x branch.

Discussion
----------

Update signature to acknowledge a TemplateWrapper

`$name` legitimately can be of type `Twig\TemplateWrapper`. This is already considered in line 1331. This PR updates the method signature in the PHPDoc.

This PR is necessary because other developers may rely on the signature, see contao/contao#6169.

Commits
-------

b0cabc0 Update signature to acknowledge a TemplateWrapper
  • Loading branch information
fabpot committed Oct 20, 2023
2 parents f1b5227 + b0cabc0 commit 51cfad8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Extension/CoreExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -1303,12 +1303,12 @@ function twig_test_iterable($value)
/**
* Renders a template.
*
* @param array $context
* @param string|array $template The template to render or an array of templates to try consecutively
* @param array $variables The variables to pass to the template
* @param bool $withContext
* @param bool $ignoreMissing Whether to ignore missing templates or not
* @param bool $sandboxed Whether to sandbox the template or not
* @param array $context
* @param string|array|TemplateWrapper $template The template to render or an array of templates to try consecutively
* @param array $variables The variables to pass to the template
* @param bool $withContext
* @param bool $ignoreMissing Whether to ignore missing templates or not
* @param bool $sandboxed Whether to sandbox the template or not
*
* @return string The rendered template
*/
Expand Down

0 comments on commit 51cfad8

Please sign in to comment.