Breaking: #109926 - Removed Extbase parameter type evaluation via DocBlock 

See forge#109926

Description 

Extbase resolved the target type of a controller action argument (and other reflected method parameters) from the method DocBlock when no native PHP type declaration was given:

/**
 * @param \MyVendor\MyExtension\Domain\Model\MyModel $item
 */
public function showAction($item): ResponseInterface
Copied!

This fallback was deprecated with #94115 in TYPO3 v11 in favor of native PHP type declarations. It has now been removed.

As part of this removal, the internal helper class \TYPO3\CMS\Extbase\Reflection\DocBlock\Tags\Null_ , which only existed to silence DocBlock parsing of this argument resolution, has been removed.

Impact 

The type of a method parameter is now solely determined from its native PHP type declaration. A parameter that relies on a @param DocBlock tag without a native type declaration no longer receives a type.

For controller actions this means an \TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentTypeException is thrown when the action is dispatched. In combination with a #[Validate] attribute, an \TYPO3\CMS\Extbase\Validation\Exception\InvalidTypeHintException is thrown while the class schema is built.

Affected installations 

Extbase extensions with controller actions or other reflected methods that still declare argument types via @param DocBlock tags instead of native PHP type declarations. Such code has emitted a deprecation since TYPO3 v11 and, for the #[Validate] case, already raised a runtime exception since v12.

Migration 

Use native PHP type declarations, available since TYPO3 v10:

public function showAction(\MyVendor\MyExtension\Domain\Model\MyModel $item): ResponseInterface
Copied!