diff --git a/Tests/Domain/DoctrineAclCacheTest.php b/Tests/Domain/DoctrineAclCacheTest.php index a57fc96..58d83d0 100644 --- a/Tests/Domain/DoctrineAclCacheTest.php +++ b/Tests/Domain/DoctrineAclCacheTest.php @@ -11,14 +11,16 @@ namespace Symfony\Component\Security\Acl\Tests\Domain; -use Doctrine\Common\Cache\ArrayCache; +use Doctrine\Common\Cache\Psr6\DoctrineProvider; +use PHPUnit\Framework\TestCase; +use Symfony\Component\Cache\Adapter\ArrayAdapter; use Symfony\Component\Security\Acl\Domain\Acl; use Symfony\Component\Security\Acl\Domain\DoctrineAclCache; use Symfony\Component\Security\Acl\Domain\ObjectIdentity; use Symfony\Component\Security\Acl\Domain\PermissionGrantingStrategy; use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity; -class DoctrineAclCacheTest extends \PHPUnit\Framework\TestCase +class DoctrineAclCacheTest extends TestCase { protected $permissionGrantingStrategy; @@ -29,7 +31,7 @@ public function testConstructorDoesNotAcceptEmptyPrefix($empty) { $this->expectException(\InvalidArgumentException::class); - new DoctrineAclCache(new ArrayCache(), $this->getPermissionGrantingStrategy(), $empty); + new DoctrineAclCache(DoctrineProvider::wrap(new ArrayAdapter()), $this->getPermissionGrantingStrategy(), $empty); } public function getEmptyValue() @@ -94,7 +96,7 @@ protected function getPermissionGrantingStrategy() protected function getCache($cacheDriver = null, $prefix = DoctrineAclCache::PREFIX) { if (null === $cacheDriver) { - $cacheDriver = new ArrayCache(); + $cacheDriver = DoctrineProvider::wrap(new ArrayAdapter()); } return new DoctrineAclCache($cacheDriver, $this->getPermissionGrantingStrategy(), $prefix); diff --git a/composer.json b/composer.json index 420aa08..a759da7 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "symfony/cache": "^4.4|^5.0|^6.0", "symfony/finder": "^4.4|^5.0|^6.0", "symfony/phpunit-bridge": "^5.2|^6.0", - "doctrine/cache": "^1.6", + "doctrine/cache": "^1.11|^2.0", "doctrine/common": "^2.2|^3", "doctrine/persistence": "^1.3.3|^2", "doctrine/dbal": "^2.13.1|^3.1", @@ -36,6 +36,7 @@ ] }, "conflict": { + "doctrine/cache": "<1.11", "doctrine/dbal": "<2.13.1|~3.0.0" }, "extra": {