Fabien Potencier e145d36266 minor #3856 Fix callable phpdoc for twig elements (VincentLanglet)
This PR was merged into the 3.x branch.

Discussion
----------

Fix callable phpdoc for twig elements

Hi `@fabpot`
```
[MyRuntime::class, 'myMethod]
```
is not a valid callable in PHP 8 https://3v4l.org/tWqPs

But this syntax is supported because twig has a special behavior
```
$compiler->raw(sprintf('$this->env->getRuntime(\'%s\')->%s', $callable[0], $callable[1]));
```

The PHPDoc should be updated in order to reflect the real behavior and solve static analysis errors.
A phpstan discussion can be found here: https://github.com/phpstan/phpstan/discussions/9567

Commits
-------

cd68de5e Fix callable phpdoc for twig elements
2023-07-05 12:13:55 +02:00
2022-12-26 17:29:12 +01:00
2023-06-28 14:29:30 +02:00
2023-07-05 11:30:59 +02:00
2022-09-16 12:46:43 +02:00
2023-06-09 16:03:53 +02:00
2023-02-15 10:01:39 +01:00
2023-02-08 08:44:48 +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://blackfire.io/docs/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%