Review main Merged

59450[TASK] Deprecate parameter type resolving via doc blocks

Alexander Schnitzler CR +2 V +2 Normal +76 −6 updated 06/14/21, 18:12

Commit message

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.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 4