Skip to content
Snippets Groups Projects
Commit 82fe6c57 authored by Alexander Schnitzler's avatar Alexander Schnitzler Committed by Benni Mack
Browse files

[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: default avatarOliver Bartsch <bo@cedev.de>
Reviewed-by: default avatarBenni Mack <benni@typo3.org>
Tested-by: default avatarOliver Bartsch <bo@cedev.de>
Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarBenni Mack <benni@typo3.org>
parent ed6e0d39
Branches
Tags
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment