fix(symfony): handle multiple GetCollection in cache invalidation #7951
fix(symfony): handle multiple GetCollection in cache invalidation #7951mrossard wants to merge 4 commits into
Conversation
55f978e to
94252cc
Compare
94252cc to
1ec3ff9
Compare
|
Lots of failing tests mentioning MCP, i suppose it's not related...? |
|
yeah #7950 |
ok thanks, this PR should be ready then :D |
| public function __construct(private readonly PurgerInterface $purger, | ||
| private readonly IriConverterInterface $iriConverter, | ||
| private readonly ResourceClassResolverInterface $resourceClassResolver, | ||
| private readonly ResourceMetadataCollectionFactoryInterface $resourceMetadataCollectionFactory, |
There was a problem hiding this comment.
for bc we can't put an argument in the middle like this
There was a problem hiding this comment.
sorry, didn't think about that, i'll move it to the end.
There was a problem hiding this comment.
I'll have to make it nullable , should i then handle the case where it's null with a fallback to what's currently done ?
There was a problem hiding this comment.
let me have a look as maybe that we need to do that differently?
There was a problem hiding this comment.
I see you've done some modifications, do you want me to look at them? Are you waiting on another change?
I need the underlying bug on my app to be fixed soon, if it can't be done this way i'll add a workaround there. Thanks!
There was a problem hiding this comment.
this is harder to fix then anticipated we'll need #7970
There was a problem hiding this comment.
Thanks for the update, i'll tweek things on my app until it can be done properly!
* loop over every #[Get] when collecting item tags (mirrors the GetCollection fix from api-platform#7951) * restore item tag emission when ResourceMetadataCollectionFactory is not wired (BC fallback regression) * document sub-resource collection limitation, tracked in api-platform#7965
…he invalidation Mirror the Symfony fix on the Eloquent listener: iterate every #[Get] and #[GetCollection] declared on the resource when collecting purge tags.
This fixes the problem where when you have 2 (or more) GetCollection operations, cache invalidation is only called for one of them when you POST a new entity.