bug #11860 [Security] Fix usage of unexistent method in DoctrineAclCache. (mauchede)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11860).
Discussion
----------
[Security] Fix usage of unexistent method in DoctrineAclCache.
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #10328
| License | MIT
| Doc PR |
The method `deleteByPrefix` does not exist. I replaced it by `deleteAll`: as @guilhermeblanco said, this method is not available in the interface `Cache` but it is present in the abstract class `CacheProvider`.
Commits
-------
131abd8
[Security] Fix usage of unexistent method in DoctrineAclCache.
This commit is contained in:
commit
1893633fb3
|
@ -12,6 +12,7 @@
|
|||
namespace Symfony\Component\Security\Acl\Domain;
|
||||
|
||||
use Doctrine\Common\Cache\Cache;
|
||||
use Doctrine\Common\Cache\CacheProvider;
|
||||
use Symfony\Component\Security\Acl\Model\AclCacheInterface;
|
||||
use Symfony\Component\Security\Acl\Model\AclInterface;
|
||||
use Symfony\Component\Security\Acl\Model\ObjectIdentityInterface;
|
||||
|
@ -55,7 +56,9 @@ class DoctrineAclCache implements AclCacheInterface
|
|||
*/
|
||||
public function clearCache()
|
||||
{
|
||||
$this->cache->deleteByPrefix($this->prefix);
|
||||
if ($this->cache instanceof CacheProvider) {
|
||||
$this->cache->deleteAll();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Reference in New Issue