Skip to content

Releases: web-push-libs/web-push-php

v1.1

28 Jul 23:39
Compare
Choose a tag to compare

PHP 5.6 is now needed.

  • added content of the response if failure
  • fixed a bug that occured when phpecc was updated to 0.4.0
  • fixed returning the correct number of responses if there are both success and errors
  • stopped replacing GCM URLs because servers are now updated

v1.0.1

13 May 21:25
Compare
Choose a tag to compare

You can use URL-safe base 64 user public keys and auth tokens now without the need to convert to MIME base 64 encoded keys.

v1.0 - Payload support

28 Apr 14:48
Compare
Choose a tag to compare

Summary

You can now send notifications with a payload ! Payload is encrypted with the user public key and user authentication secret that you can get with the Web Push API (subscription.getKey('p256dh') and subscription.getKey('auth')). You should have every instructions you need in the README.
For the moment, encryption is made through Spomky-Labs/php-aes-gcm. An improved version of the openssl_encrypt function of the native PHP binding of OpenSSL should be available in PHP7.1 and this library will use it when it is available.
Payload will be correctly decrypted by Chrome 50+ and Firefox 46+.

Upgrade notes

  • [BC break] new API of sendNotification(string $endpoint, string $payload, string $userPublicKey, string $userAuthSecret, bool $flush) in order to take into account the user auth secret. (notice the $flush parameter being shifted to the right)
  • Automatic padding of the payload can be disabled to save bandwidth with $webPush->setAutomaticPadding(false). Note that it's not recommended for security reasons.
  • [fix] When there was multiple notifications in the queue and when you would send another notification with the intent to flush the queue, if there was an error with any of the notification, the function would return only the first result.

0.2.2

20 Feb 10:29
Compare
Choose a tag to compare

The TTL header is now included in every HTTP requests, the default duration being 4 weeks. See more info on the README.

0.2.1

04 Dec 12:47
Compare
Choose a tag to compare

Fix flush.

0.2.0

03 Dec 17:53
Compare
Choose a tag to compare

The API has changed for a better developper experience. You now queue the notifications and flush when you want to send them. See README.

0.1.0

27 Nov 22:26
Compare
Choose a tag to compare
0.1.0 Pre-release
Pre-release
  • works with Chrome
  • currently not tested on Firefox without payload
  • see branch payload for support of payload (in dev)