-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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: phpstan/phpstan#9567 Commits ------- cd68de5 Fix callable phpdoc for twig elements
- Loading branch information
Showing
3 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters