Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Cache] Remove support for Doctrine Cache #42967

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 1 commit into from
Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
[Cache] Remove support for Doctrine Cache
  • Loading branch information
derrabus committed Sep 9, 2021
commit d4a0d83c58610be17a082a71219e062b2f914845
1 change: 1 addition & 0 deletions 1 src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ CHANGELOG
* Remove all other values than "none", "php_array" and "file" for `framework.annotation.cache`
* Register workflow services as private
* Remove support for passing a `RouteCollectionBuilder` to `MicroKernelTrait::configureRoutes()`, type-hint `RoutingConfigurator` instead
* Remove the `cache.adapter.doctrine` service

5.4
---
Expand Down
22 changes: 0 additions & 22 deletions 22 src/Symfony/Bundle/FrameworkBundle/Resources/config/cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Symfony\Component\Cache\Adapter\AdapterInterface;
use Symfony\Component\Cache\Adapter\ApcuAdapter;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Adapter\DoctrineAdapter;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\MemcachedAdapter;
use Symfony\Component\Cache\Adapter\PdoAdapter;
Expand Down Expand Up @@ -93,28 +92,7 @@
->call('setLogger', [service('logger')->ignoreOnInvalid()])
->tag('cache.pool', ['clearer' => 'cache.default_clearer', 'reset' => 'reset'])
->tag('monolog.logger', ['channel' => 'cache'])
;

if (class_exists(DoctrineAdapter::class)) {
$container->services()->set('cache.adapter.doctrine', DoctrineAdapter::class)
->abstract()
->args([
abstract_arg('Doctrine provider service'),
'', // namespace
0, // default lifetime
])
->call('setLogger', [service('logger')->ignoreOnInvalid()])
->tag('cache.pool', [
'provider' => 'cache.default_doctrine_provider',
'clearer' => 'cache.default_clearer',
'reset' => 'reset',
])
->tag('monolog.logger', ['channel' => 'cache'])
->deprecate('symfony/framework-bundle', '5.4', 'The abstract service "%service_id%" is deprecated.')
;
}

$container->services()
->set('cache.adapter.filesystem', FilesystemAdapter::class)
->abstract()
->args([
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
use Symfony\Component\Cache\Adapter\ApcuAdapter;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Adapter\ChainAdapter;
use Symfony\Component\Cache\Adapter\DoctrineAdapter;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\ProxyAdapter;
use Symfony\Component\Cache\Adapter\RedisAdapter;
Expand Down Expand Up @@ -1522,23 +1521,6 @@ public function testCachePoolServices()
}
}

/**
* @group legacy
*/
public function testDoctrineCache()
{
if (!class_exists(DoctrineAdapter::class)) {
self::markTestSkipped('This test requires symfony/cache 5.4 or lower.');
}

$container = $this->createContainerFromFile('doctrine_cache', [], true, false);
$container->setParameter('cache.prefix.seed', 'test');
$container->addCompilerPass(new CachePoolPass());
$container->compile();

$this->assertCachePoolServiceDefinitionIsCreated($container, 'cache.bar', 'cache.adapter.doctrine', 5);
}

public function testRedisTagAwareAdapter()
{
$container = $this->createContainerFromFile('cache', [], true);
Expand Down Expand Up @@ -1973,9 +1955,6 @@ private function assertCachePoolServiceDefinitionIsCreated(ContainerBuilder $con
case 'cache.adapter.apcu':
$this->assertSame(ApcuAdapter::class, $parentDefinition->getClass());
break;
case 'cache.adapter.doctrine':
$this->assertSame(DoctrineAdapter::class, $parentDefinition->getClass());
break;
case 'cache.app':
case 'cache.adapter.filesystem':
$this->assertSame(FilesystemAdapter::class, $parentDefinition->getClass());
Expand Down
110 changes: 0 additions & 110 deletions 110 src/Symfony/Component/Cache/Adapter/DoctrineAdapter.php

This file was deleted.

2 changes: 1 addition & 1 deletion 2 src/Symfony/Component/Cache/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CHANGELOG
6.0
---

* Remove `DoctrineProvider`
* Remove `DoctrineProvider` and `DoctrineAdapter`

5.4
---
Expand Down
1 change: 0 additions & 1 deletion 1 src/Symfony/Component/Cache/LockRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ final class LockRegistry
__DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'ChainAdapter.php',
__DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'CouchbaseBucketAdapter.php',
__DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'CouchbaseCollectionAdapter.php',
__DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'DoctrineAdapter.php',
__DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'FilesystemAdapter.php',
__DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'FilesystemTagAwareAdapter.php',
__DIR__.\DIRECTORY_SEPARATOR.'Adapter'.\DIRECTORY_SEPARATOR.'MemcachedAdapter.php',
Expand Down
35 changes: 0 additions & 35 deletions 35 src/Symfony/Component/Cache/Tests/Adapter/DoctrineAdapterTest.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
namespace Symfony\Component\Cache\Tests\DependencyInjection;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Cache\Adapter\ArrayAdapter;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
use Symfony\Component\Cache\Adapter\TagAwareAdapter;
use Symfony\Component\Cache\Adapter\TraceableAdapter;
use Symfony\Component\Cache\Adapter\TraceableTagAwareAdapter;
use Symfony\Component\Cache\DataCollector\CacheDataCollector;
use Symfony\Component\Cache\DependencyInjection\CacheCollectorPass;
use Symfony\Component\Cache\Tests\Fixtures\ArrayCache;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
Expand Down Expand Up @@ -79,7 +79,7 @@ public function testProcessCacheObjectsAreDecorated()
$collector = $container->register('data_collector.cache', CacheDataCollector::class);

$container
->register('cache.object', ArrayCache::class)
->register('cache.object', ArrayAdapter::class)
->addTag('cache.pool', ['name' => 'cache.object']);

$container
Expand Down
52 changes: 0 additions & 52 deletions 52 src/Symfony/Component/Cache/Tests/Fixtures/ArrayCache.php

This file was deleted.

1 change: 0 additions & 1 deletion 1 src/Symfony/Component/Cache/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
},
"require-dev": {
"cache/integration-tests": "dev-master",
"doctrine/cache": "^1.6|^2.0",
"doctrine/dbal": "^2.10|^3.0",
"predis/predis": "^1.1",
"psr/simple-cache": "^1.0",
Expand Down
9 changes: 4 additions & 5 deletions 9 src/Symfony/Component/Cache/phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@
<element key="time-sensitive">
<array>
<element key="0"><string>Cache\IntegrationTests</string></element>
<element key="1"><string>Doctrine\Common\Cache</string></element>
<element key="2"><string>Symfony\Component\Cache</string></element>
<element key="3"><string>Symfony\Component\Cache\Tests\Fixtures</string></element>
<element key="4"><string>Symfony\Component\Cache\Tests\Traits</string></element>
<element key="5"><string>Symfony\Component\Cache\Traits</string></element>
<element key="1"><string>Symfony\Component\Cache</string></element>
<element key="2"><string>Symfony\Component\Cache\Tests\Fixtures</string></element>
<element key="3"><string>Symfony\Component\Cache\Tests\Traits</string></element>
<element key="4"><string>Symfony\Component\Cache\Traits</string></element>
</array>
</element>
</array>
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.