From 69848973f45d886225111979853535690bfa7ff6 Mon Sep 17 00:00:00 2001 From: William DURAND Date: Sat, 7 Apr 2012 21:16:26 +0200 Subject: [PATCH] Handled Composer install to avoid the defintion of Propel/Phing paths --- DependencyInjection/PropelExtension.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/DependencyInjection/PropelExtension.php b/DependencyInjection/PropelExtension.php index f00f89b..916233d 100644 --- a/DependencyInjection/PropelExtension.php +++ b/DependencyInjection/PropelExtension.php @@ -37,6 +37,14 @@ class PropelExtension extends Extension $configuration = new Configuration($container->getParameter('kernel.debug')); $config = $processor->processConfiguration($configuration, $configs); + // Composer + if (file_exists($propelPath = $container->getParameter('kernel.root_dir') . '/../vendor/propel/propel1')) { + $container->setParameter('propel.path', $propelPath); + } + if (file_exists($phingPath = $container->getParameter('kernel.root_dir') . '/../vendor/phing/phing/classes')) { + $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.');