8000 [FrameworkBundle] Remove dependency on Doctrine cache by fabpot · Pull Request #23131 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] Remove dependency on Doctrine cache #23131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[FrameworkBundle] removed doctrine/cache as a dependency
  • Loading branch information
fabpot committed Jun 12, 2017
commit a4e336ea3494a5acc9343d537254807df10ee3a6
3 changes: 3 additions & 0 deletions UPGRADE-3.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ Finder
FrameworkBundle
---------------

* The `doctrine/cache` dependency has been removed; require it via `composer
require doctrine/cache` if you are using Doctrine cache in your project.

* The `validator.mapping.cache.doctrine.apc` service has been deprecated.

* Using the `KERNEL_DIR` environment variable or the automatic guessing based
Expand Down
2 changes: 2 additions & 0 deletions src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ CHANGELOG
3.4.0
-----

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,9 @@ private function addValidationSection(ArrayNodeDefinition $rootNode)
->children()
->scalarNode('cache')
->beforeNormalization()
// Can be removed in 4.0, when validator.mapping.cache.apc is removed
// Can be removed in 4.0, when validator.mapping.cache.doctrine.apc is removed
->ifString()->then(function ($v) {
if ('validator.mapping.cache.apc' === $v && !class_exists('Doctrine\Common\Cache\ApcCache')) {
if ('validator.mapping.cache.doctrine.apc' === $v && !class_exists('Doctrine\Common\Cache\ApcCache')) {
throw new LogicException('Doctrine APC cache for the validator cannot be enabled as the Doctrine Cache package is not installed.');
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,10 @@ private function registerAnnotationsConfiguration(array $config, ContainerBuilde
$loader->load('annotations.xml');

if ('none' !== $config['cache']) {
if (!class_exists('Doctrine\Common\Cache\CacheProvider')) {
throw new LogicException('Annotations cannot be enabled as the Doctrine Cache library is not installed.');
}

$cacheService = $config['cache'];

if ('php_array' === $config['cache']) {
Expand Down
4 changes: 2 additions & 2 deletions src/Symfony/Bundle/FrameworkBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
"symfony/filesystem": "~2.8|~3.0|~4.0",
"symfony/finder": "~2.8|~3.0|~4.0",
"symfony/routing": "~3.4|~4.0",
"symfony/stopwatch": "~2.8|~3.0|~4.0",
"doctrine/cache": "~1.0"
"symfony/stopwatch": "~2.8|~3.0|~4.0"
},
"require-dev": {
"doctrine/cache": "~1.0",
"fig/link-util": "^1.0",
"symfony/asset": "~3.3|~4.0",
"symfony/browser-kit": "~2.8|~3.0|~4.0",
Expand Down
0