Issue Bug Closed

#107406Revert "Avoid costly database schema queries and class state"

Stefan Bürk 09/06/25, 11:45 updated 12/02/25, 13:58

Description

Nightly CI revelead issues with the recently merged change for #107390
and further investigation revealed that the filesystem cache used for
the is not reliabe in edge cases, for example when trying to lookup the
name of column type read from the filesystem cache using the current
instance doctrine types registry because if the usage of *spl_object_id*
within the registry.

Trying to circument this is issue now is not really doable without more
investigation and broader changes and is therefore reverted now.

#0 /builds/typo3/CI/cms/vendor/doctrine/dbal/src/Types/TypeRegistry.php(61): Doctrine\\DBAL\\Types\\Exception\\TypeNotRegistered::new()\n
#1 /builds/typo3/CI/cms/typo3/sysext/lowlevel/Classes/Controller/DatabaseIntegrityController.php(2735): Doctrine\\DBAL\\Types\\TypeRegistry->lookupName()
#2 /builds/typo3/CI/cms/typo3/sysext/lowlevel/Classes/Controller/DatabaseIntegrityController.php(485): TYPO3\\CMS\\Lowlevel\\Controller\\DatabaseIntegrityController->search()
#3 /builds/typo3/CI/cms/typo3/sysext/lowlevel/Classes/Controller/DatabaseIntegrityController.php(252): TYPO3\\CMS\\Lowlevel\\Controller\\DatabaseIntegrityController->searchAction()
#4 /builds/typo3/CI/cms/typo3/sysext/backend/Classes/Http/RouteDispatcher.php(84): TYPO3\\CMS\\Lowlevel\\Controller\\DatabaseIntegrityController->handleRequest()
...
#49 /builds/typo3/CI/cms/typo3temp/var/tests/acceptance/index.php(21): {closure}()
#50 {main}"}

Using current request/process Doctrine\\DBAL\\Types\\TypeRegistry->lookupName()
instance with a Column->getType() instance when read from filesystem cache leads
to another “type” object instance than the one registerd in the registry, because
@spl_object_id@ is used and ending in a exception that the type is not registered
simply because the same “class” is compared with two different instances and thus
getting different integer id’s and is integrated deep in doctrine dbal.

Reviews 8