From 6d93a12a229d3473ac483e1298dba53fcc4ba96e Mon Sep 17 00:00:00 2001 From: Artem Ryzhkov Date: Thu, 16 May 2019 22:08:29 +0700 Subject: [PATCH] remove deprecated parameter 'kernel.root_dir' --- DependencyInjection/Configuration.php | 2 +- README.md | 2 +- Tests/DependencyInjection/AcceleratorCacheExtensionTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 8260da5..2e550c7 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -24,7 +24,7 @@ public function getConfigTreeBuilder() ->end() ->defaultNull() ->end() - ->scalarNode('web_dir')->defaultValue('%kernel.root_dir%/../web')->end() + ->scalarNode('web_dir')->defaultValue('%kernel.project_dir%/web')->end() ->enumNode('mode') ->values(array(CacheClearerService::MODE_FOPEN, CacheClearerService::MODE_CURL)) ->defaultValue(CacheClearerService::MODE_FOPEN) diff --git a/README.md b/README.md index 85f6c60..74eb165 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ public function registerBundles() # app/config/config.yml accelerator_cache: host: http://example.com - web_dir: %kernel.root_dir%/../web + web_dir: %kernel.project_dir%/web ``` 4. If you want to use curl rather than fopen set the following option: diff --git a/Tests/DependencyInjection/AcceleratorCacheExtensionTest.php b/Tests/DependencyInjection/AcceleratorCacheExtensionTest.php index 702612d..cce9d41 100644 --- a/Tests/DependencyInjection/AcceleratorCacheExtensionTest.php +++ b/Tests/DependencyInjection/AcceleratorCacheExtensionTest.php @@ -15,7 +15,7 @@ public function testDefaults() $this->load(); $this->assertContainerBuilderHasParameter('accelerator_cache.host', '%router.request_context.scheme%://%router.request_context.host%'); - $this->assertContainerBuilderHasParameter('accelerator_cache.web_dir', '%kernel.root_dir%/../web'); + $this->assertContainerBuilderHasParameter('accelerator_cache.web_dir', '%kernel.project_dir%/web'); $this->assertContainerBuilderHasParameter('accelerator_cache.template'); $this->assertContains('die(json_encode(AcceleratorCacheClearer::clearCache(%%user%%, %%opcode%%)));', $this->container->getParameter('accelerator_cache.template')); $this->assertContainerBuilderHasParameter('accelerator_cache.mode', 'fopen');