Use the configured paths for Porpel and Phing
This commit is contained in:
parent
89e91ad5d4
commit
4acee59d80
|
@ -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']) {
|
||||
|
|
Loading…
Reference in a new issue