AC-2192: deprecations fix - #133
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors several Twig extensions and console commands to use namespaced Twig classes (such as AbstractExtension, TwigFilter, TwigFunction, TwigTest, and Environment) instead of deprecated legacy ones. Feedback on these changes highlights critical runtime issues, including a missing import for UnrecognizedTypeException in FieldDefinitionExtension, and references to non-existent methods (extractTypeName and getInlineArgumentNames) in FieldDefinitionExtension and ApiMethodExtension respectively.
| use Twig\Extension\AbstractExtension; | ||
| use Twig\TwigFunction; |
There was a problem hiding this comment.
The class UnrecognizedTypeException is thrown on line 61 of this file, but it is not imported. This will cause a runtime fatal error when the exception is thrown. Please import the class.
use Paysera\\Bundle\\CodeGeneratorBundle\\Exception\\UnrecognizedTypeException;\nuse Twig\\Extension\\AbstractExtension;\nuse Twig\\TwigFunction;| new TwigFunction('php_inline_arguments_no_typehint', [$this, 'inlineArgumentsNoTypehint']), | ||
| new TwigFunction('php_get_return_type', [$this, 'getReturnType'], ['needs_context' => true]), | ||
| new TwigFunction('php_generate_method_arguments', [$this, 'generateMethodArguments'], ['needs_context' => true]), | ||
| new TwigFunction('php_inline_argument_names', [$this, 'getInlineArgumentNames']), |
0b7489f to
cdc913d
Compare
6bd9ead to
6e0e42c
Compare
No description provided.