Fabien Potencier a890011699 feature #4936 Allow to call TemplateWrapper::unwrap() without arguments (derrabus)
This PR was merged into the 3.x branch.

Discussion
----------

Allow to call `TemplateWrapper::unwrap()` without arguments

Fixes #4935, symfony/symfony#66193.

#4910 changed an internal API that has famously been used by Symfony since almost forever. We would now need to change Symfony's 5.4 branch which is security-only. Because of that, I'd like to propose to allow calling `TemplateWrapper::unwrap()` without parameters again. This should allow running Symfony 5.4 with the latest Twig 3 again.

We can revert my change on the 4.x branch.

Commits
-------

bfbe89e3a3 Allow to call TemplateWrapper::unwrap() without arguments
2026-09-22 11:27:53 +01:00
…
…

Twig, the flexible, fast, and secure template language for PHP
==============================================================

Twig is a template language for PHP.

Twig uses a syntax similar to the Django and Jinja template languages which
inspired the Twig runtime environment.

Sponsors
--------

.. raw:: html

    <a href="https://docs.blackfire.io/introduction?utm_source=twig&utm_medium=github_readme&utm_campaign=logo">
        <img src="https://static.blackfire.io/assets/intemporals/logo/png/blackfire-io_secondary_horizontal_transparent.png?1" width="255px" alt="Blackfire.io">
    </a>

More Information
----------------

Read the `documentation`_ for more information.

.. _documentation: https://twig.symfony.com/documentation
Languages
PHP 99.9%