Skip to content

Add service definition for PsrAclCache #27

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
Jul 16, 2021
Merged

Add service definition for PsrAclCache #27

merged 1 commit into from
Jul 16, 2021

Conversation

mbabker
Copy link
Contributor

@mbabker mbabker commented Apr 24, 2021

Requires symfony/security-acl#72

This adds the service definition for the new Symfony\Component\Security\Acl\Domain\PsrAclCache class added to the component for use as a cache service.

Copy link
Member

@derrabus derrabus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the service definition alone won't be enough. The bundle would currently still alias the Doctrine cache as security.acl.cache, so the new cache service won't be used.

@mbabker
Copy link
Contributor Author

mbabker commented Apr 25, 2021

The bundle would currently still alias the Doctrine cache as security.acl.cache, so the new cache service won't be used.

That alias is set from the cache.id config node (which defaults to null), it doesn't automatically map to the Doctrine cache implementation.

@mbabker mbabker changed the title Add service definition for SymfonyAclCache Add service definition for PsrAclCache Apr 25, 2021
@derrabus
Copy link
Member

Right, but the bundle does not integrate that new cache either.

How about a new option pool where I can specify one of the cache pools configured by FrameworkBundle that I want to be wired as ACL cache? Of course, we should throw an exception if the app specifies both options, id and pool.

@mbabker
Copy link
Contributor Author

mbabker commented Apr 26, 2021

I've tweaked the bundle config to add the new option and adjusted everything else accordingly. Also added tests covering the cache service setup since none existed previously.

@wouterj wouterj added this to the 2.2 milestone Jul 15, 2021
@wouterj
Copy link
Member

wouterj commented Jul 16, 2021

Thank you @mbabker!

@wouterj wouterj merged commit ede8b50 into symfony:master Jul 16, 2021
@mbabker mbabker deleted the syfmony-cache branch July 16, 2021 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants