Task #29412

Remove generic PDO backend

Added by Karsten Dambekalns almost 4 years ago. Updated almost 4 years ago.

Status:Resolved Start date:2011-09-01
Priority:Should have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:Persistence
Target version:TYPO3 Flow Base Distribution - 1.0 beta 2
Sprint: Has patch:
PHP Version: 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 i... Resolved 2011-09-05

Associated revisions

Revision 45cacad1
Added by Karsten Dambekalns almost 4 years ago

[!!!][TASK] Remove generic persistence PDO backend

The generic persistence PDO backend is no longer maintained,
there is no use for it. If you want to target a RDBMS, use the
Doctrine 2 integration.

Change-Id: Ife28072288018b233f3781c7f70f63a8cd1c6b39
Resolves: #29412

History

#1 Updated by Mr. Hudson almost 4 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 almost 4 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 almost 4 years ago

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

Also available in: Atom PDF