8000 [FrameworkBundle] removed doctrine/cache as a dependency · symfony/symfony@a4e336e · GitHub
[go: up one dir, main page]

Skip to content

Commit a4e336e

Browse files
committed
[FrameworkBundle] removed doctrine/cache as a dependency
1 parent b57895c commit a4e336e

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

UPGRADE-3.4.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ Finder
1616
FrameworkBundle
1717
---------------
1818

19+
* The `doctrine/cache` dependency has been removed; require it via `composer
20+
require doctrine/cache` if you are using Doctrine cache in your project.
21+
1922
* The `validator.mapping.cache.doctrine.apc` service has been deprecated.
2023

2124
* Using the `KERNEL_DIR` environment variable or the automatic guessing based

src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ CHANGELOG
44
3.4.0
55
-----
66

7+
* Removed `doctrine/cache` from the list of required dependencies in `composer.json`
8+
* Deprecated `validator.mapping.cache.doctrine.apc` service
79
* Deprecated using the `KERNEL_DIR` environment variable with `KernelTestCase::getKernelClass()`.
810
* Deprecated the `KernelTestCase::getPhpUnitXmlDir()` and `KernelTestCase::getPhpUnitCliConfigArgument()` methods.
911

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,9 @@ private function addValidationSection(ArrayNodeDefinition $rootNode)
663663
->children()
664664
->scalarNode('cache')
665665
->beforeNormalization()
666-
// Can be removed in 4.0, when validator.mapping.cache.apc is removed
666+
// Can be removed in 4.0, when validator.mapping.cache.doctrine.apc is removed
667667
->ifString()->then(function ($v) {
668-
if ('validator.mapping.cache.apc' === $v && !class_exists('Doctrine\Common\Cache\ApcCache')) {
668+
if ('validator.mapping.cache.doctrine.apc' === $v && !class_exists('Doctrine\Common\Cache\ApcCache')) {
669669
throw new LogicException('Doctrine APC cache for the validator cannot be enabled as the Doctrine Cache package is not installed.');
670670
}
671671

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,10 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
12201220
$loader->load('annotations.xml');
12211221

12221222
if ('none' !== $config['cache']) {
1223+
if (!class_exists('Doctrine\Common\Cache\CacheProvider')) {
1224+
throw new LogicException('Annotations cannot be enabled as the Doctrine Cache library is not installed.');
1225+
}
1226+
12231227
$cacheService = $config['cache'];
12241228

12251229
if ('php_array' === $config['cache']) {

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
"symfony/filesystem": "~2.8|~3.0|~4.0",
3030
"symfony/finder": "~2.8|~3.0|~4.0",
3131
"symfony/routing": "~3.4|~4.0",
32-
"symfony/stopwatch": "~2.8|~3.0|~4.0",
33-
"doctrine/cache": "~1.0"
32+
"symfony/stopwatch": "~2.8|~3.0|~4.0"
3433
},
3534
"require-dev": {
35+
"doctrine/cache": "~1.0",
3636
"fig/link-util": "^1.0",
3737
"symfony/asset": "~3.3|~4.0",
3838
"symfony/browser-kit": "~2.8|~3.0|~4.0",

0 commit comments

Comments
 (0)
0