Permalink
Browse files

bug #21552 [FrameworkBundle] Fix annotations cache folder path (akeeman)

This PR was submitted for the master branch but it was merged into the 3.2 branch instead (closes #21552).

Discussion
----------

[FrameworkBundle] Fix annotations cache folder path

| Q             | A
| ------------- | ---
| Branch?       |  3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | n/a
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

The argument at index 2 sets a cache path as it extends the file system adapter by default since e59f0e0, where it did set the version before that. This change now results in annotation cache folders showing up in the project root (because of the overwritten cache root folder).
Because cache.annotations has a parent now, this line is not needed anymore and fixes the problem.

Commits
-------

8e5cfa7 Fix annotations cache folder path
  • Loading branch information...
2 parents 7f79a50 + 8e5cfa7 commit 81ad336a8af83c9a8e9b4eca14320ef0590412a4 @nicolas-grekas nicolas-grekas committed Feb 7, 2017
Showing with 0 additions and 1 deletion.
  1. +0 −1 src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
@@ -1235,7 +1235,6 @@ private function registerPropertyInfoConfiguration(array $config, ContainerBuild
private function registerCacheConfiguration(array $config, ContainerBuilder $container)
{
$version = substr(str_replace('/', '-', base64_encode(hash('sha256', uniqid(mt_rand(), true), true))), 0, 22);
- $container->getDefinition('cache.annotations')->replaceArgument(2, $version);
$container->getDefinition('cache.adapter.apcu')->replaceArgument(2, $version);
$container->getDefinition('cache.adapter.system')->replaceArgument(2, $version);
$container->getDefinition('cache.adapter.filesystem')->replaceArgument(2, $config['directory']);

0 comments on commit 81ad336

Please sign in to comment.