Fabien Potencier d58c8be15d minor #4698 Add throw tag to parse methods (VincentLanglet)
This PR was merged into the 3.x branch.

Discussion
----------

Add throw tag to parse methods

Hi `@fabpot`, with PHPStan improving every day his exception checking, it's useful to have well documented method.

I didn't update all of them (there are too many), and focus on the one I have issue with:
- Almost all the InfixExpressionParserInterface/PrefixExpressionParserInterface implements throws a SyntaxError in parse method
- Parser::parse method is catching SyntaxError and rethrowing them so it should be added to the phpdoc
- Since Parser::parse catch Parser::subparse, it would be useful to add the phpdoc to subparse

Commits
-------

790eee7ae0 Add throw tag to parse methods
2025-11-05 13:48:28 +01:00
2025-07-29 09:57:34 +02:00
2025-07-29 10:07:07 +02:00
2025-02-14 08:38:53 +01:00
2025-07-29 10:07:07 +02:00
2025-10-29 11:57:52 -04:00
2025-01-31 21:45:36 +01:00
2024-11-20 20:05:33 +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%