Przeglądaj źródła

Merge pull request #15 from dzuelke/configpath

Clean up handling/naming of parameter "config.path"
Marc 13 lat temu
rodzic
commit
33f3b9d154

+ 1 - 1
lib/Mmoreramerino/GearmanBundle/Resources/config/services.yml

@@ -1,5 +1,5 @@
 parameters:
-    config.path:                /config/gearman/
+    gearman.config.path:        %kernel.root_dir%/config/gearman/%kernel.environment%.yml
 
     gearman.client.class:       Mmoreramerino\GearmanBundle\Service\GearmanClient
     gearman.cache.class:        Mmoreramerino\GearmanBundle\Service\GearmanCache

+ 1 - 1
lib/Mmoreramerino/GearmanBundle/Service/GearmanSettings.php

@@ -76,7 +76,7 @@ class GearmanSettings extends ContainerAware
     {
         if (null === $this->filepath) {
             $rootDir = $this->container->get('kernel')->getRootDir();
-            $this->filepath = $rootDir . $this->container->getParameter('config.path') . $this->container->get('kernel')->getEnvironment().'.yml';
+            $this->filepath = $this->container->getParameter('gearman.config.path');
         }
 
         return $this->filepath;