diff --git a/CHANGELOG b/CHANGELOG index 080673f47..ecc59c5a4 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ * Fix `IntlExtension` letting the pattern derived from a date formatter prototype override an explicit locale * Fix `IntlExtension` not honoring the locale of a date formatter prototype configured with no date and time styles * Speed up macro calls + * Fix `TemplateWrapper::unwrap()` failing when called without arguments, which is now deprecated * Add `TemplateWrapper::getDefaultEscapeStrategy()` to know the escaping strategy a template was compiled with * Report a clear error when `random`, `reverse`, `shuffle`, and `split` receive a string that is not valid UTF-8 * Fix the deprecation about omitting parentheses when calling a macro being reported twice for the same call diff --git a/src/TemplateWrapper.php b/src/TemplateWrapper.php index e08fd2cd8..7fbd99765 100644 --- a/src/TemplateWrapper.php +++ b/src/TemplateWrapper.php @@ -124,7 +124,7 @@ final class TemplateWrapper public function unwrap(?Environment $env = null): Template { if (null === $env) { - trigger_deprecation('twig/twig', '3.29', 'Calling "%s()" without arguments is deprecated, pass the Twig environment instead.', __METHOD__); + trigger_deprecation('twig/twig', '3.30', 'Calling "%s()" without arguments is deprecated, pass the Twig environment instead.', __METHOD__); } elseif (!$this->isOwnedBy($env)) { throw new RuntimeError(\sprintf('A "%s" can only be used with the "%s" that created it.', self::class, Environment::class)); } diff --git a/tests/TemplateWrapperTest.php b/tests/TemplateWrapperTest.php index 6b1d2d732..37d63c234 100644 --- a/tests/TemplateWrapperTest.php +++ b/tests/TemplateWrapperTest.php @@ -56,7 +56,7 @@ class TemplateWrapperTest extends TestCase $twig = new Environment(new ArrayLoader(['index' => 'content'])); $wrapper = $twig->load('index'); - $this->expectDeprecation('Since twig/twig 3.29: Calling "Twig\TemplateWrapper::unwrap()" without arguments is deprecated, pass the Twig environment instead.'); + $this->expectDeprecation('Since twig/twig 3.30: Calling "Twig\TemplateWrapper::unwrap()" without arguments is deprecated, pass the Twig environment instead.'); $this->assertInstanceOf(Template::class, $wrapper->unwrap()); }