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
@type property on mercure's 'delete' message #2688
Conversation
ping @dunglas @soyuka @antograssiot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm 👍 for the change but let's see what @dunglas has to say about this before merging.
src/Bridge/Doctrine/EventListener/PublishMercureUpdatesListener.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition. Just a minor change to do. Thanks for this feature!
src/Bridge/Doctrine/EventListener/PublishMercureUpdatesListener.php
Outdated
Show resolved
Hide resolved
needs to target master |
This could be useful.. @toriqo are you up to finish this? |
Just saying: the only way, client side, to know that a Mercure update is a removal instead of an update, is that you only have the If so, why not considering this as a BC break? (I 100% agree with adding the |
This just needs a rebase, and a decision about |
You mean |
Indeed. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Let's add a coin in the juke box - wasn't it just a minor change? |
A client subscribed to more than one topics will know which resource type was deleted without having to parse the @id.
I've picked this one. WDYT @bpolaszek? |
Sounds 👌 |
Let's merge it then. It will be available in 3.1. Thanks everyone. |
Fixes: 585x: Since api-platform/core 3.1: Having mercure.include_type (always include @type in Mercure updates, even delete ones) set to false in the configuration is deprecated. It will be true by default in API Platform 4.0. 4x in CreateColumnLayoutTest::testCreateRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\ColumnLayout 4x in UpdateColumnLayoutTest::testPatchRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\ColumnLayout 4x in CreateMaterialNodeTest::testCreateRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\MaterialNode 4x in UpdateMaterialNodeTest::testPatchRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\MaterialNode 4x in CreateMultiSelectTest::testCreateRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\MultiSelect See api-platform/core#2688
Fixes: 585x: Since api-platform/core 3.1: Having mercure.include_type (always include @type in Mercure updates, even delete ones) set to false in the configuration is deprecated. It will be true by default in API Platform 4.0. 4x in CreateColumnLayoutTest::testCreateRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\ColumnLayout 4x in UpdateColumnLayoutTest::testPatchRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\ColumnLayout 4x in CreateMaterialNodeTest::testCreateRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\MaterialNode 4x in UpdateMaterialNodeTest::testPatchRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\MaterialNode 4x in CreateMultiSelectTest::testCreateRejectsParentsWhichDontSupportChildren from App\Tests\Api\ContentNodes\MultiSelect See api-platform/core#2688
return the type so a client subscribed to more than one topic will know which resource type was deleted without having to parse the @id