Issue Task Closed

#109152phpstan: disable treatPhpDocTypesAsCertain

Benni Mack 03/04/26, 12:49 updated 03/31/26, 08:09

Description

Why should we do this?

1. We don’t have strict / native PHP types everywhere, and thus
need to check for e.g. “is_array()” even though the type hint
says “@param array”. This is a breaking change if we’d change
this but right now “not a bug” for us.

2. “non-empty-string” options are currently not helpful for TYPO3
as a framework, as we expect a “non-empty-string” but user-land
code might still hand in an empty string so we do need to check for
such cases.

3. narrowed types such as “$this->avatarProviders” being
“AvatarProviderInterface[]” cannot be natively typed in some
cases, and should thus be a help for the IDE but not an exception
in TYPO3’s phpstan baseline.

Reviews 1

History 24

  1. Benni Mack commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-03-04T15:55:09+00:00" > 03/04/26, 15:55 </span>

    Applied in changeset commit:dcfd7d60fbb20ddff7c79cb15d04f226212ac864.