mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 12:37:15 +00:00
fix typo
This commit is contained in:
+1
-1
@@ -869,7 +869,7 @@ determine how to convert the code to PHP:
|
||||
|
||||
{# it is converted to the following PHP code: (6 & 2) || (6 & 16) #}
|
||||
|
||||
Change the default precedence by explicitely grouping expressions with parentheses:
|
||||
Change the default precedence by explicitly grouping expressions with parentheses:
|
||||
|
||||
.. code-block:: twig
|
||||
|
||||
|
||||
@@ -69,9 +69,9 @@ final class SecurityPolicy implements SecurityPolicyInterface
|
||||
foreach ($tags as $tag) {
|
||||
if (!\in_array($tag, $this->allowedTags)) {
|
||||
if ('extends' === $tag) {
|
||||
trigger_deprecation('twig/twig', '3.12', 'The "extends" tag is always allowed in sandboxes, but won\'t be in 4.0, please enable it explicitely in your sandbox policy if needed.');
|
||||
trigger_deprecation('twig/twig', '3.12', 'The "extends" tag is always allowed in sandboxes, but won\'t be in 4.0, please enable it explicitly in your sandbox policy if needed.');
|
||||
} elseif ('use' === $tag) {
|
||||
trigger_deprecation('twig/twig', '3.12', 'The "use" tag is always allowed in sandboxes, but won\'t be in 4.0, please enable it explicitely in your sandbox policy if needed.');
|
||||
trigger_deprecation('twig/twig', '3.12', 'The "use" tag is always allowed in sandboxes, but won\'t be in 4.0, please enable it explicitly in your sandbox policy if needed.');
|
||||
} else {
|
||||
throw new SecurityNotAllowedTagError(\sprintf('Tag "%s" is not allowed.', $tag), $tag);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ class SandboxTest extends TestCase
|
||||
*/
|
||||
public function testSandboxForExtendsAndUseTags(string $tag, string $template)
|
||||
{
|
||||
$this->expectDeprecation(sprintf('Since twig/twig 3.12: The "%s" tag is always allowed in sandboxes, but won\'t be in 4.0, please enable it explicitely in your sandbox policy if needed.', $tag));
|
||||
$this->expectDeprecation(sprintf('Since twig/twig 3.12: The "%s" tag is always allowed in sandboxes, but won\'t be in 4.0, please enable it explicitly in your sandbox policy if needed.', $tag));
|
||||
|
||||
$twig = $this->getEnvironment(true, [], self::$templates, []);
|
||||
$twig->createTemplate($template, 'index')->render([]);
|
||||
|
||||
Reference in New Issue
Block a user