Project

General

Profile

Actions

Feature #70874

closed

ClassInfo::getIsInitializeable() is not reliable

Added by Klaus Bitto about 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2015-10-20
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

As seen in e.g. https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_6-2/typo3/sysext/extbase/Classes/Object/Container/Container.php#L167 (Container::getInstanceInternal(), if($classInfo->getIsInitializeable() && is_callable(array($instance, 'initializeObject')))), calling $classInfo->getIsInitializeable() appears to not be enough to determine if $instance->initializeObject() can be called. This seems wrong by design.

Maybe ClassInfo::getIsInitializable() should take an instance as argument? Or should there be a public Container::getObjectIsInitializable($instance)? If the is_callable() call is necessary to avoid bugs, then there definitely needs to be an API method for it.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #66482: Extbase persistence layer fails to create empty objects in PHP 5.6.Closed2015-04-19

Actions
Actions

Also available in: Atom PDF