bug #16173 [FrameworkBundle] Replace PhpFileCache by FilesystemCache (nicolas-grekas)

This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Replace PhpFileCache by FilesystemCache

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #16168
| License       | MIT
| Doc PR        | -

Commits
-------

a6cb1c0 [FrameworkBundle] Replace PhpFileCache by FilesystemCache
This commit is contained in:
Fabien Potencier 2015-10-08 22:20:50 +02:00
commit 864a58faa3
3 changed files with 5 additions and 5 deletions

View File

@ -849,7 +849,7 @@ class FrameworkExtension extends Extension
}
$container
->getDefinition('annotations.php_file_cache')
->getDefinition('annotations.filesystem_cache')
->replaceArgument(0, $cacheDir)
;
@ -863,7 +863,7 @@ class FrameworkExtension extends Extension
$container
->getDefinition('annotations.cached_reader')
->replaceArgument(1, new Reference('file' !== $config['cache'] ? $config['cache'] : 'annotations.php_file_cache'))
->replaceArgument(1, new Reference('file' !== $config['cache'] ? $config['cache'] : 'annotations.filesystem_cache'))
->replaceArgument(2, $config['debug'])
;
$container->setAlias('annotation_reader', 'annotations.cached_reader');

View File

@ -19,7 +19,7 @@
<argument /><!-- Debug-Flag -->
</service>
<service id="annotations.php_file_cache" class="Doctrine\Common\Cache\PhpFileCache" public="false">
<service id="annotations.filesystem_cache" class="Doctrine\Common\Cache\FilesystemCache" public="false">
<argument /><!-- Cache-Directory -->
</service>

View File

@ -321,9 +321,9 @@ abstract class FrameworkExtensionTest extends TestCase
{
$container = $this->createContainerFromFile('full');
$this->assertEquals($container->getParameter('kernel.cache_dir').'/annotations', $container->getDefinition('annotations.php_file_cache')->getArgument(0));
$this->assertEquals($container->getParameter('kernel.cache_dir').'/annotations', $container->getDefinition('annotations.filesystem_cache')->getArgument(0));
$this->assertSame('annotations.cached_reader', (string) $container->getAlias('annotation_reader'));
$this->assertSame('annotations.php_file_cache', (string) $container->getDefinition('annotations.cached_reader')->getArgument(1));
$this->assertSame('annotations.filesystem_cache', (string) $container->getDefinition('annotations.cached_reader')->getArgument(1));
}
public function testFileLinkFormat()