The database charset is now configurable.
First, the 'FIXME:' said more or less to use %kernel.charset% to configure the database charset. But charsets are not database charsets. That's why a new config parameter has appeared : propel.config: charset: "UTF8" This parameter is optional and default is "UTF8".
This commit is contained in:
parent
1529807181
commit
3ca3404d44
|
@ -40,6 +40,13 @@ class PropelExtension extends Extension
|
|||
if (isset($config['phing_path'])) {
|
||||
$container->setParameter('propel.phing_path', $config['phing_path']);
|
||||
}
|
||||
|
||||
if (isset($config['charset'])) {
|
||||
$charset = $config['charset'];
|
||||
} else {
|
||||
$charset = 'UTF8';
|
||||
}
|
||||
$container->setParameter('propel.charset', $charset);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -69,8 +76,7 @@ class PropelExtension extends Extension
|
|||
'classname' => $className,
|
||||
'options' => array(),
|
||||
'attributes' => array(),
|
||||
// FIXME: Mysql wants UTF8, not UTF-8 (%kernel.charset%)
|
||||
'settings' => array('charset' => array('value' => 'UTF8')),
|
||||
'settings' => array('charset' => array('value' => $container->getParameter('propel.charset'))),
|
||||
);
|
||||
|
||||
foreach ($configs as $config) {
|
||||
|
|
Loading…
Reference in a new issue