Would it make sens to move DomainObjectInterface to symfony/contracts ? #48257
Unanswered
VincentLanglet
asked this question in
Q&A
Replies: 1 suggested answer 2 replies
-
The recommended solution for authorization is to use custom voters rather than ACLs. So I doubt we will create a new contracts package for it. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
{{editor}}'s edit
{{editor}}'s edit
Loading...
Sorry, something went wrong.
-
symfony/security-acl is not recommended for most situation anymore so even if some libraries can provide acl supports, it would always be better to have an optional support instead of having this as a required dependency.
(sonata-project/SonataAdminBundle#7303 for context).
When working with "domain objects which you want to store ACLs" there is a
DomainObjectInterface
to "return a unique identifier for this domain object".Let's say I have
In this example the domain object is shared between both SecurityInterface implementation. Even if I can load dynamically the service config whether or not the
symfony/security-acl
is installed, the domain object will still need to implement theDomainObjectInterface
so it cannot be a fully optional dependency...Then would it make sens to move DomainObjectInterface to symfony/contracts ? This way
DomainObjectInterface
fromsymfony/acl-contracts
Or am I missing something in the way to move a dependency from require to optional ?
Beta Was this translation helpful? Give feedback.