Actions
Bug #65667
closedObjectManager can't resolve underscored namespace classes to new PHP's native namespace classes since TYPO3 6.2.10
Start date:
2015-03-11
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:
Description
Since TYPO3 6.2.10 the class resolving from old namespace way with underscores seems to not work with the object manager/object container anymore. This can lead to very strange problems, because the object manager instantiates singleton classes maybe twice.
Example:
$persistenceManager1 = $this->objectManager->get('TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManagerInterface'); $persistenceManager2 = $this->objectManager->get('Tx_Extbase_Persistence_ManagerInterface'); // Since TYPO3 6.2.10 results in different hash values, because they are two different instances var_dump(spl_object_hash($persistenceManager1)); var_dump(spl_object_hash($persistenceManager2)); // Thus since TYPO3 6.2.10 following comparison returns FALSE var_dump($persistenceManager1 === $persistenceManager2); // Same behavior with another example class (here with object manager) $objectManager1 = $this->objectManager->get('Tx_Extbase_Object_ObjectManagerInterface'); $objectManager2 = $this->objectManager->get('TYPO3\CMS\Extbase\Object\ObjectManagerInterface'); var_dump(spl_object_hash($objectManager1)); var_dump(spl_object_hash($objectManager2)); var_dump($objectManager1 === $objectManager2); // Returns FALSE
Best regards,
Rob
Actions