Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jan 6, 2024
1 parent 9d2e340 commit fea57c1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

env:
SYMFONY_PHPUNIT_DISABLE_RESULT_CACHE: 1
SYMFONY_DEPRECATIONS_HELPER: ignoreFile=./tests/ignore-use-yield-deprecations

permissions:
contents: read
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 3.9.0 (2023-XX-XX)

* Add a new "yield" mode for output generation
The "use_yield" Environment option controls the strategy: use "false" for "echo", "true" for "yield"
* Add return type for Symfony 7 compatibility
* Fix premature loop exit in Security Policy lookup of allowed methods/properties
* Deprecate all internal extension functions in favor of methods on the extension classes
Expand Down
4 changes: 1 addition & 3 deletions tests/ErrorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,7 @@ public function getErroredTemplates()
],
];
}
/* These tests don't make sense to me
Depending on whether you're using echo ->render() or display(), they don't behave in the same way

public function testTwigLeakOutputInDebugMode()
{
$output = exec(sprintf('%s %s debug', \PHP_BINARY, escapeshellarg(__DIR__.'/Fixtures/errors/leak-output.php')));
Expand All @@ -319,7 +318,6 @@ public function testDoesNotTwigLeakOutput()

$this->assertSame('', $output);
}
*/
}

class ErrorTest_Foo
Expand Down
4 changes: 2 additions & 2 deletions tests/Fixtures/errors/leak-output.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function broken()
$loader = new ArrayLoader([
'index.html.twig' => 'Hello {{ "world"|broken }}',
]);
$twig = new Environment($loader, ['debug' => isset($argv[1])]);
$twig = new Environment($loader, ['debug' => isset($argv[1]), 'use_yield' => false]);
$twig->addExtension(new BrokenExtension());

$twig->display('index.html.twig');
echo $twig->render('index.html.twig');
1 change: 1 addition & 0 deletions tests/ignore-use-yield-deprecations
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
%Since twig/twig 3.9.0: Not setting "use_yield" to "true" is deprecated.%

0 comments on commit fea57c1

Please sign in to comment.