Attribute 'classname' is now based on %kernel.debug%

This commit is contained in:
William DURAND 2011-01-26 21:32:57 +01:00
parent 6d4157f673
commit 1529807181

View file

@ -58,14 +58,15 @@ class PropelExtension extends Extension
$mergedConfig = array(
'default_connection' => 'default',
);
$className = $container->getParameter('kernel.debug') ? 'DebugPDO' : 'PropelPDO';
$defaultConnection = array(
'driver' => 'mysql',
'user' => 'root',
'password' => '',
'dsn' => '',
// FIXME: should be automatically changed based on %kernel.debug%
'classname' => 'DebugPDO', //'PropelPDO',
'classname' => $className,
'options' => array(),
'attributes' => array(),
// FIXME: Mysql wants UTF8, not UTF-8 (%kernel.charset%)