Actions
Bug #94305
closedAbstractDomainObject::getUid() has wrong PHPDOC
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2021-06-10
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:
Description
The current master, but also earlier TYPO3 versions, have an incorrect PHPDOC for the getUid()
method of each persisted Extbase entity.
This is the annotation:
@return int the uid or NULL if none set yet.
For code tools (like Rector), this looks like the method will return integer always. But it may also returns null (for new entities). This may lead to unwanted refactorings.
Espeacially in older TYPO3 version, which have no (correct) return type hinting set. There the PHPDOC is the only truth.
Still, PHPDOC and return type hinting does not match.
Actions