Ph3nol / NotificationPusher

Standalone PHP library for easy devices notifications push.
MIT License
1.18k stars 273 forks source link

Facade documentation unclear/misleading #186

Closed tbsmark86 closed 4 years ago

tbsmark86 commented 5 years ago

I find it rather surprising that the facade sends each message to every device instead of treating the input as a list of pairs.

I suggest that this is explicitly stated in the documentation. Or the code could be changed.

Also the response array is somewhat buggy: It only contains the last response for each token.

seyfer commented 4 years ago

@tbsmark86 please, propose a PR with contribution how you see it or how it should be.

tbsmark86 commented 4 years ago

For my use case i've hacked the code.

Before doing any PR I would need to know what is the wanted way? The current code with clear documentation or a change in the code? Of course an API change could break other code :/

In addition i'am not firm with this PSR stuff so i can't really do a pull request.

seyfer commented 4 years ago

@tbsmark86 how did you hack the code for your use case?

tbsmark86 commented 4 years ago

` --- GcmPushService.php-orig 2019-04-05 11:30:59.979263566 +0200 +++ GcmPushService.php 2019-12-02 09:41:14.345779480 +0100 @@ -92,6 +92,7 @@ // Then declare an adapter. $gcmAdapter = new GcmAdapter($adapterParams); ·

`

Patch for apns is the same

seyfer commented 4 years ago

@tbsmark86 PR for the documentation update will be merged for sure for change in the code, I'm not sure, but having a separate PR for it would help to review and to have it in the history for future considerations.

tbsmark86 commented 4 years ago

I think I finally understand where I've gone wrong. Was to blind to see later once the Bug appeared and my users where complaining about being bombed by messages :)