Closed GregoireGiraud closed 1 month ago
Got the same problem, ended up putting use_symfony_listeners
to false.
I'd like to keep using use_symfony_listeners: true for some time, until I replace everything that needs it.
use_symfony_listeners: true
will stay forever it should be just the same if needed. I'm testing this.
Thanks a lot for the quick fix !
API Platform version(s) affected: 3.3.7
Description
Hey,
I just tried to upgrade my project from
3.2.25
to3.3.7
.In my project, I have the
securityPostValidation
attribute on several entities. My tests failed, and I noticed that all security logic insidesecurityPostValidation
was ignored and never applied.I then tried all patch versions of
api-platform/core
and the bug was reproduced since3.3.2
(and didn't occur in3.3.0
).I noticed that adding
use_symfony_listeners: false
fixed the problem and thatsecurityPostValidation
was again called.How to reproduce
Create an entity, and add this config.
In
config/packages/api_platform.yaml
Toggle
use_symfony_listeners
value and check yourPOST
calls. It succeeds when having value set totrue
while it should fail with theis_granted(false)
Possible Solution
I don't have the solution ! I'd like to keep using
use_symfony_listeners: true
for some time, until I replace everything that needs it.Additional Context
Same problem when using
ApiResource.operations
to define myPOST
endpoint