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:
commit
864a58faa3
@ -849,7 +849,7 @@ class FrameworkExtension extends Extension
|
|||||||
}
|
}
|
||||||
|
|
||||||
$container
|
$container
|
||||||
->getDefinition('annotations.php_file_cache')
|
->getDefinition('annotations.filesystem_cache')
|
||||||
->replaceArgument(0, $cacheDir)
|
->replaceArgument(0, $cacheDir)
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -863,7 +863,7 @@ class FrameworkExtension extends Extension
|
|||||||
|
|
||||||
$container
|
$container
|
||||||
->getDefinition('annotations.cached_reader')
|
->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'])
|
->replaceArgument(2, $config['debug'])
|
||||||
;
|
;
|
||||||
$container->setAlias('annotation_reader', 'annotations.cached_reader');
|
$container->setAlias('annotation_reader', 'annotations.cached_reader');
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
<argument /><!-- Debug-Flag -->
|
<argument /><!-- Debug-Flag -->
|
||||||
</service>
|
</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 -->
|
<argument /><!-- Cache-Directory -->
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
|
@ -321,9 +321,9 @@ abstract class FrameworkExtensionTest extends TestCase
|
|||||||
{
|
{
|
||||||
$container = $this->createContainerFromFile('full');
|
$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.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()
|
public function testFileLinkFormat()
|
||||||
|
Reference in New Issue
Block a user