Closed NUMERICKS closed 4 years ago
Hi, see the UPGRADE guide and the updated specification.
The upgrade guide shows no real alternative for the use-case where the subscribed targets are dynamic.
There is no way to define what "private" means when your application decides who can see what. Now you need to know before hand what topics you want to subscribe to and refresh the token for each change to the underlying data.
Additionally the wildcard selector becomes useless and dangerious if something becomes private, which used to be incredibly usefull if you didn't know what your topics were, as a client. Now everone with a wildcard target gets everything, always.
Same here. This is especially a big problem if you have hundred of thousands of entities which a user should only see if some condition is there. With targets we could easily differentiate but with this version things go bad.
Same feeling for me, for example with a simple chat system, how do you do if the user join or leave a private channel ? Before you could use the target like chan/$name
but now do you need to regenerate a new token for each action ?
No you don't: see the end of this paragraph for an example.
Thanks @dunglas
Updated from Mercure v0.3 to v0.11, everything went well, thanks @dunglas ! Targets are replaced with topics, it's very similar mechanics:
Hi,
It looks like targets have been removed since v10.0
So I was doing something like the following code with
symfony/mercure
So my users received the event cause they subscribe to
/users/{id}
through mercureAuthorization Since then it does not work anymore.What would be a proper solution to get the same result ? How
target
has been substituted ?Thank you