Task #29412

Remove generic PDO backend

Added by Karsten Dambekalns about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
Should have
Category:
Persistence
Start date:
2011-09-01
Due date:
% Done:

100%

Estimated time:
Sprint:
PHP Version:
Has patch:
Complexity:

Description

With the integration of Doctrine the old PDO based persistence backend is obsolete. The generic persistence basics will stay, for use by things like the CouchDB package.


Related issues

Blocked by TYPO3.Flow - Bug #29486: injectSettings() doesn't receive always the settings of its own packageResolvedRobert Lemke2011-09-05

Actions
#1

Updated by Mr. Hudson about 10 years ago

  • Status changed from Accepted to Under Review

Patch set 1 of change Ife28072288018b233f3781c7f70f63a8cd1c6b39 has been pushed to the review server.
It is available at http://review.typo3.org/4729

#2

Updated by Christopher Hlubek about 10 years ago

There seems to be a problem caused by "autowiring off". With that annotation the backend has to be configured explicitly:

TYPO3.Couchdb/Configuration/Objects.yaml:

TYPO3\FLOW3\Persistence\Generic\Backend\BackendInterface:
  className: 'TYPO3\CouchDB\Persistence\Backend\CouchDbBackend'
TYPO3\FLOW3\Persistence\PersistenceManagerInterface:
  className: 'TYPO3\FLOW3\Persistence\Generic\PersistenceManager'
TYPO3\FLOW3\Persistence\Generic\PersistenceManager:
  properties:
    backend:
      object: TYPO3\CouchDB\Persistence\Backend\CouchDbBackend

That works to initialize the PersistenceManager. But now the settings for the PersistenceManager are not injected correctly. After a look at the generated proxy code the persistence settings are fetched from the CouchDB package and not from the FLOW3 package:

Data/Temporary/Testing/Cache/Code/FLOW3_Object_Classes/TYPO3_FLOW3_Persistence_Generic_PersistenceManager.php:

       /**
         * Autogenerated Proxy Method
         */
         private function FLOW3_Proxy_injectProperties() {
                $this->injectBackend(\TYPO3\FLOW3\Core\Bootstrap::$staticObjectManager->get('TYPO3\CouchDB\Persistence\Backend\CouchDbBackend'));
                $this->injectQueryFactory(new \TYPO3\FLOW3\Persistence\Generic\QueryFactory());
                $this->injectDataMapper(\TYPO3\FLOW3\Core\Bootstrap::$staticObjectManager->get('TYPO3\FLOW3\Persistence\Generic\DataMapper'));
                $this->injectPersistenceSession(\TYPO3\FLOW3\Core\Bootstrap::$staticObjectManager->get('TYPO3\FLOW3\Persistence\Generic\Session'));
                $this->injectSystemLogger(\TYPO3\FLOW3\Core\Bootstrap::$staticObjectManager->get('TYPO3\FLOW3\Log\SystemLoggerInterface'));
                $this->injectReflectionService(\TYPO3\FLOW3\Core\Bootstrap::$staticObjectManager->get('TYPO3\FLOW3\Reflection\ReflectionService'));
                $this->injectSettings(\TYPO3\FLOW3\Core\Bootstrap::$staticObjectManager->get('TYPO3\FLOW3\Configuration\ConfigurationManager')->getConfiguration(\TYPO3\FLOW3\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.CouchDB'));
        }

#3

Updated by Karsten Dambekalns about 10 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF