Issue Bug Closed

#93439Inconsistencies in type annotations

Markus Klösges 02/04/21, 22:02 updated 02/06/26, 17:06

Description

Some parts of Extbase have wrong type annotations which lead to wrong results of static code analysis

- Extbase Repository->findByUid()/findByIdentifier might return null when a non-existent uid is queried
(It might be argued, that Repositories should be generics and therefore the ‘object’ return type should be replaced by the generic type)
- Extbase AbstractDomainObject->getUid() might return null
- Extbase Mvc Request >getOriginalRequest might return null
TYPO3\CMS\Core\Resource\ResourceFactory->getStorageObjectFromCombinedIdentifier might return null

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Christian Kuhn commented <span data-processor="relativetime" data-value="2022-02-19T10:02:34+00:00" > 02/19/22, 10:02 </span>

    - Extbase Repository->findByUid()/findByIdentifier might return null when a non-existent uid is queried
    (It might be argued, that Repositories should be generics and therefore the 'object' return type should be replaced by the generic type)
    - Extbase AbstractDomainObject->getUid() might return null
    - Extbase Mvc Request >getOriginalRequest might return null

    Those have been changed meanwhile.

    TYPO3\CMS\Core\Resource\ResourceFactory->getStorageObjectFromCombinedIdentifier might return null

    This one seems to be still open.

  2. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2026-02-06T17:06:23+00:00" > 02/06/26, 17:06 </span>

    getStorageObjectFromCombinedIdentifier has been removed, closing issue as solved