Merge pull request #278 from benja-M-1/fix/paths-from-config

Use the configured paths for Porpel and Phing
This commit is contained in:
Toni Uebernickel 2014-11-01 14:45:18 +01:00
commit 1e667f256f

View file

@ -44,20 +44,16 @@ class PropelExtension extends Extension
$container->setParameter('propel.phing_path', $phingPath);
}
if (!$container->hasParameter('propel.path')) {
if (!isset($config['path'])) {
throw new \InvalidArgumentException('PropelBundle expects a "path" parameter that must contain the absolute path to the Propel ORM vendor library. The "path" parameter must be defined under the "propel" root node in your configuration.');
} else {
$container->setParameter('propel.path', $config['path']);
}
if (isset($config['path'])) {
$container->setParameter('propel.path', $config['path']);
} elseif (!$container->hasParameter('propel.path')) {
throw new \InvalidArgumentException('PropelBundle expects a "path" parameter that must contain the absolute path to the Propel ORM vendor library. The "path" parameter must be defined under the "propel" root node in your configuration.');
}
if (!$container->hasParameter('propel.phing_path')) {
if (!isset($config['phing_path'])) {
if (isset($config['phing_path'])) {
$container->setParameter('propel.phing_path', $config['phing_path']);
} elseif (!$container->hasParameter('propel.phing_path')) {
throw new \InvalidArgumentException('PropelBundle expects a "phing_path" parameter that must contain the absolute path to the Phing vendor library. The "phing_path" parameter must be defined under the "propel" root node in your configuration.');
} else {
$container->setParameter('propel.phing_path', $config['phing_path']);
}
}
if (isset($config['logging']) && $config['logging']) {