Skip to content

fix(mercure): do not use data options when deleting#4056

Merged
alanpoulain merged 1 commit into
api-platform:2.6from
alanpoulain:fix/mercure-delete-options-data
Feb 12, 2021
Merged

fix(mercure): do not use data options when deleting#4056
alanpoulain merged 1 commit into
api-platform:2.6from
alanpoulain:fix/mercure-delete-options-data

Conversation

@alanpoulain

Copy link
Copy Markdown
Member
Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tickets fixes #3969
License MIT
Doc PR N/A

Supersedes #4054.

When using Mercure and when an entity is deleted, APIP evaluates how to retrieve entity properties.
If we use a custom method with @ApiResource(mercure="object.mercureOptions()") the data provided by this function is used, with no regard if we are posting, updating or deleting the entity.
If the custom function returns data, in case of a deletion, the data is still sent.

See bug report to fully understand what's wrong.

@odoucet

odoucet commented Feb 12, 2021

Copy link
Copy Markdown
Contributor

Hello,

I can confirm this MR fixes the issue I have :)

@alanpoulain alanpoulain merged commit 78cb369 into api-platform:2.6 Feb 12, 2021
@alanpoulain

Copy link
Copy Markdown
Member Author

Thanks for testing!

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.

2 participants