mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-08 16:36:58 +00:00
-
This commit is contained in:
@@ -20,6 +20,9 @@ jobs:
|
||||
|
||||
continue-on-error: ${{ matrix.experimental }}
|
||||
|
||||
env:
|
||||
SYMFONY_DEPRECATIONS_HELPER: ignoreFile=./tests/ignore-use-yield-deprecations
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version:
|
||||
@@ -132,7 +135,7 @@ jobs:
|
||||
|
||||
- name: "Run tests"
|
||||
working-directory: extra/${{ matrix.extension }}
|
||||
run: ../../vendor/bin/simple-phpunit
|
||||
run: SYMFONY_DEPRECATIONS_HELPER=ignoreFile=../../tests/ignore-use-yield-deprecations ../../vendor/bin/simple-phpunit
|
||||
|
||||
integration-tests:
|
||||
needs:
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-3
@@ -304,8 +304,7 @@ EOHTML
|
||||
],
|
||||
];
|
||||
}
|
||||
/* 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')));
|
||||
@@ -319,7 +318,6 @@ EOHTML
|
||||
|
||||
$this->assertSame('', $output);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
class ErrorTest_Foo
|
||||
|
||||
@@ -27,7 +27,7 @@ class BrokenExtension extends AbstractExtension
|
||||
$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');
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
%Since twig/twig 3.9.0: Not setting "use_yield" to "true" is deprecated.%
|
||||
Reference in New Issue
Block a user