-
Notifications
You must be signed in to change notification settings - Fork 637
[1.x] Add support for php-pusher 5.x #698
[1.x] Add support for php-pusher 5.x #698
Conversation
As far as I see, this is supported only for Laravel 8.29.0+ and the upcoming Laravel 9.x. I guess a constraint for Also, I'm not sure if 6.x or 7.x users would get it working because setting the pusher to |
I could try to install a 6.x / 7.x project to test what happens if you'd like? As far as I know laravel <8.29 will recomend ^4.0 and not ^5.0. |
@rennokki I've given this a second thought. I don't think the 5.x upgrade in this project (the composer change) is really nessecary. 5.x clients would be able to connect with just the response change. 4.x clients shouldn't mind the change either. Would that be better? |
We can use this specific check from Laravel core here for the empty response in case this changes a lot. And we can support both versions. |
@rennokki but that check checks the server side version right? It's the client side version that matters. So with a 4.x client you van connect the server, but with a 5.x client you cannot. This is due to that the 5.x client expects a empty response (just like pusher itself does). The 4.x clients just check for a 200 status code and returns the reponse to laravel, which ignores it. So I don't see how this change (the empty reponse) will break anything. It's only more true to how pusher works. |
Right, also the tests run for both stable and lowest, so it's a good to go. |
Alright! Thanks! |
This package is almost compatible with php-pusher 5.x out of the box.
5.x expects a empty repsonse, or a response containing channel information (Expirimental) (See pusher docs: https://pusher.com/docs/channels/library_auth_reference/rest-api#successful-response)
This change looks to be backwards compatible with 4.x since the old php-pusher package didn't do anything with the responded data.