[TASK] Deprecate parameter type resolving via doc blocks
When a ClassSchema is created for a class, all methods inside said class are analyzed along with their parameters. Ever since extbase existed, the parameter type has been read from the doc block. ``` /** * @param \Foo\Bar\Baz $baz */ public function injectBaz($baz); ``` Since the whole reflection api and PHP itself have been improved in the recent past, parameter types can be detected without looking at doc blocks. It is recommended to use native type hints as follows: ``` public function injectBaz(\Foo\Bar\Baz $baz); ``` The doc block is neiter needed nor supported in the near future. Of course, developers may add a doc block but TYPO3 will no longer evaluate that as of version 12.0. Releases: master Resolves: #94115 Change-Id: Ifc68c0cb8a42b8ab589043afbaebf5dd5763eee5 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/59450 Reviewed-by:Oliver Bartsch <bo@cedev.de> Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
Oliver Bartsch <bo@cedev.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org>
Showing
- typo3/sysext/core/Documentation/Changelog/master/Deprecation-94115-ParameterTypeEvaluationViaDocBlockComments.rst 53 additions, 0 deletions...tion-94115-ParameterTypeEvaluationViaDocBlockComments.rst
- typo3/sysext/extbase/Classes/Reflection/ClassSchema.php 21 additions, 3 deletionstypo3/sysext/extbase/Classes/Reflection/ClassSchema.php
- typo3/sysext/extbase/Tests/Unit/Reflection/ClassSchemaTest.php 1 addition, 1 deletion.../sysext/extbase/Tests/Unit/Reflection/ClassSchemaTest.php
- typo3/sysext/extbase/Tests/Unit/Reflection/Fixture/DummyController.php 1 addition, 2 deletions...extbase/Tests/Unit/Reflection/Fixture/DummyController.php
Please register or sign in to comment