mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-18 13:26:37 +00:00
72c91f6260b0da2063cf46b17f3c67c169cb9457
This PR was squashed before being merged into the 3.x branch.
Discussion
----------
Add return type annotations on Twig 3 to prepare Twig 4
Started to add missing type annotation following `@stof` comment [here](https://github.com/twigphp/Twig/pull/4523#discussion_r1901915880).
Update: I checked here every class (but one) in the `src` directory.
But you should ~~probably~~ **certainely** have another look.
Remains:
- src/ExpressionParser.php, where i'm not confident enough about the best return types (AbstractExpression|null works almost everytime, but lack some precision)
- extra directory
- tests directory
I'm happy to let them to someone else.... this was less fun than I expected 😅
Commits
-------
82be13429c Add return type annotations on Twig 3 to prepare Twig 4
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
Description
Languages
PHP
99.9%