From 3ee928ea19ae126f6fa9e01e9dadc08bd063933a Mon Sep 17 00:00:00 2001 From: William DURAND Date: Wed, 13 Apr 2011 18:07:53 +0200 Subject: [PATCH] Revert "Injected propel.connection in the PropelDataCollector collector" This reverts commit 284dfeb355d5f1393375a877c67439296eb3c184. --- DataCollector/PropelDataCollector.php | 11 ++--------- Resources/config/propel.xml | 1 - 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/DataCollector/PropelDataCollector.php b/DataCollector/PropelDataCollector.php index d50d4c1..bdd096a 100644 --- a/DataCollector/PropelDataCollector.php +++ b/DataCollector/PropelDataCollector.php @@ -31,12 +31,6 @@ class PropelDataCollector extends DataCollector * @var \PropelConfiguration */ protected $propelConfiguration; - /** - * Propel connection - * - * @var \PropelPDO - */ - protected $propelConnection; /** * Constructor @@ -44,12 +38,11 @@ class PropelDataCollector extends DataCollector * @param \Propel\PropelBundle\Logger\PropelLogger $logger A PropelLogger * @param string $connectionName A connection name */ - public function __construct(\Propel\PropelBundle\Logger\PropelLogger $logger, $connectionName, \PropelConfiguration $propelConfiguration, \PropelPDO $propelConnection) + public function __construct(\Propel\PropelBundle\Logger\PropelLogger $logger, $connectionName, \PropelConfiguration $propelConfiguration) { $this->logger = $logger; $this->connectionName = $connectionName; $this->propelConfiguration = $propelConfiguration; - $this->propelConnection = $propelConnection; } /** @@ -60,7 +53,7 @@ class PropelDataCollector extends DataCollector { $this->data = array( 'queries' => $this->buildQueries(), - 'querycount' => $this->propelConnection->getQueryCount(), + 'querycount' => \Propel::getConnection($this->connectionName)->getQueryCount(), 'connectionName' => $this->connectionName, ); } diff --git a/Resources/config/propel.xml b/Resources/config/propel.xml index bf60d3f..feb0fc1 100644 --- a/Resources/config/propel.xml +++ b/Resources/config/propel.xml @@ -24,7 +24,6 @@ %propel.dbal.default_connection% -