Project

General

Profile

Actions

Bug #93439

open

Inconsistencies in type annotations

Added by Markus Klösges about 3 years ago. Updated about 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2021-02-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

Actions #1

Updated by Christian Kuhn about 2 years ago

- 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.

Actions

Also available in: Atom PDF