Skip to content

Commit

Permalink
[PropelBundle] fixed Propel configuraiton when no dbal is configured
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Jun 12, 2010
1 parent b48cc5b commit 16f7d3a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Expand Up @@ -23,6 +23,11 @@ class PropelExtension extends LoaderExtension
*/
public function configLoad($config, BuilderConfiguration $configuration)
{
if (!$configuration->hasDefinition('propel')) {
$loader = new XmlFileLoader(__DIR__.'/../Resources/config');
$configuration->merge($loader->load($this->resources['propel']));
}

if (!$configuration->hasParameter('propel.path')) {
if (!isset($config['path'])) {
throw new \InvalidArgumentException('The "path" parameter is mandatory.');
Expand All @@ -31,13 +36,11 @@ public function configLoad($config, BuilderConfiguration $configuration)
$configuration->setParameter('propel.path', $config['path']);
}

if (isset($config['path']))
{
if (isset($config['path'])) {
$configuration->setParameter('propel.path', $config['path']);
}

if (isset($config['phing_path']))
{
if (isset($config['phing_path'])) {
$configuration->setParameter('propel.phing_path', $config['phing_path']);
}

Expand Down
@@ -1,3 +1,3 @@
homepage:
pattern: /
pattern: /
defaults: { _controller: WebBundle:Default:index }

0 comments on commit 16f7d3a

Please sign in to comment.