bug #24743 [FrameworkBundle] Do not activate the cache if Doctrine's cache is not present (sroze)
This PR was merged into the 3.4 branch.
Discussion
----------
[FrameworkBundle] Do not activate the cache if Doctrine's cache is not present
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #24683
| License | MIT
| Doc PR | ø
Annotations are automatically enabled when the `doctrine/annotations` package is around. These annotations are enabled with the `php_array` cache by default, which require `doctrine/cache`.
This PR allow this scenario to happen by disabling the annotation cache when `doctrine/cache` is not present.
Commits
-------
c5c7a2304d
Do not activate the cache if Doctrine's cache is not present
This commit is contained in:
commit
ffc98842eb
@ -12,6 +12,7 @@
|
||||
namespace Symfony\Bundle\FrameworkBundle\DependencyInjection;
|
||||
|
||||
use Doctrine\Common\Annotations\Annotation;
|
||||
use Doctrine\Common\Cache\Cache;
|
||||
use Symfony\Bundle\FullStack;
|
||||
use Symfony\Component\Asset\Package;
|
||||
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
|
||||
@ -741,7 +742,7 @@ class Configuration implements ConfigurationInterface
|
||||
->info('annotation configuration')
|
||||
->{class_exists(Annotation::class) ? 'canBeDisabled' : 'canBeEnabled'}()
|
||||
->children()
|
||||
->scalarNode('cache')->defaultValue('php_array')->end()
|
||||
->scalarNode('cache')->defaultValue(interface_exists(Cache::class) ? 'php_array' : 'none')->end()
|
||||
->scalarNode('file_cache_dir')->defaultValue('%kernel.cache_dir%/annotations')->end()
|
||||
->booleanNode('debug')->defaultValue($this->debug)->end()
|
||||
->end()
|
||||
|
Reference in New Issue
Block a user