Skip to content

Releases: move-backend/ApnsPHP

3.0.3

19 Sep 16:22
3.0.3
Compare
Choose a tag to compare

General:

CI:

Full Changelog: 3.0.2...3.0.3

ApnsPHP 3.0.2

05 Jun 13:57
Compare
Choose a tag to compare

CI

  • Fix codestyle issues in sample files
  • Enforce passing phpcs and phpstan
  • Configure PHPUnit whitelist based on directories

Push

  • Adapt JWT generation to be compatible with more versions of lcobucci/jwt

ApnsPHP 3.0.1

26 Jan 14:00
Compare
Choose a tag to compare

Push

ApnsPHP 3.0.0

08 Sep 13:07
Compare
Choose a tag to compare

A lot of work went into this release to cleanup the code base. Old functionality that
is no longer supported by Apple was removed, as well as functionality like the embedded logger
or the push server code that are better served by specialized, external projects.

The remaining functionality is now entirely unit tested, which should make it easier
to maintain going forward. Also helping in this regard is the cleanup on the documentation
side, the codestyle fixes as well as CI checks with phpstan. There is still some more
that can be done on this front, but overall it should be in very good shape for the
future.

We're already using this version of the code in multiple production projects,
so it should be safe to use. Calling it a beta for now just to make sure we didn't miss
anything.

Release highlights:

  • Use PSR-4 namespaces
  • Renamed exception classes
  • Merged SharedConfig/ApnsPHP_Abstract into the Push class
  • Added getRecipientsCount() and deprecated getRecipientsNumber()
  • Added getJsonWebToken() to simplify extending the Push class (Thanks to @BafS)
  • Update payload limit to 4KiB (Thanks to @BafS)
  • Add push-type header (Thanks to @BafS)
  • Add unit tests
  • Improved GitHub actions
  • Use phpdoc instead of doxygen
  • Removed Objective-C demo
  • Dropped support for the binary protocol
  • Dropped push server code
  • Dropped the EmbeddedLogger

Changes since 3.0.0beta1:

  • Switch to SPDX license and copyright headers
  • Comply with REUSE v3.0
  • Add a .editorconfig file

Upgrading from m2mobi/apns-php version 2.0.0:

class ApnsPHP_Exception renamed to ApnsPHP\Exception
class ApnsPHP_Message renamed to ApnsPHP\Message
class ApnsPHP_Message_Custom renamed to ApnsPHP\Message\CustomMessage
class ApnsPHP_Message_Exception renamed to ApnsPHP\Message\Exception
class ApnsPHP_Message_Safari renamed to ApnsPHP\Message\SafariMessage
class ApnsPHP_Push renamed to ApnsPHP\Push
class ApnsPHP_Push_Exception renamed to ApnsPHP\Push\Exception
constant ApnsPHP_Abstract::ENVIRONMENT_PRODUCTION renamed to ApnsPHP\Push::ENVIRONMENT_PRODUCTION
constant ApnsPHP_Abstract::ENVIRONMENT_SANDBOX renamed to ApnsPHP\Push::ENVIRONMENT_SANDBOX
constant ApnsPHP_Abstract::DEVICE_BINARY_SIZE renamed to ApnsPHP\Push::DEVICE_BINARY_SIZE
constant ApnsPHP_Abstract::WRITE_INTERVAL renamed to ApnsPHP\Push::WRITE_INTERVAL
constant ApnsPHP_Abstract::CONNECT_RETRY_INTERVAL renamed to ApnsPHP\Push::CONNECT_RETRY_INTERVAL

ApnsPHP_Abstract was merged into ApnsPHP\Push

class ApnsPHP_Feedback removed
class ApnsPHP_Log_Embedded removed
class ApnsPHP_Push_Server removed
class ApnsPHP_Push_Server_Exception removed
constant ApnsPHP_Abstract::PROTOCOL_BINARY removed
constant ApnsPHP_Abstract::PROTOCOL_HTTP removed
constant ApnsPHP_Abstract::SOCKET_SELECT_TIMEOUT removed

method ApnsPHP_Abstract::setLogger() removed
method ApnsPHP_Abstract::getLogger() removed
method ApnsPHP_Abstract::setRootCertificateAuthority() removed
method ApnsPHP_Abstract::getCertificateAuthority removed
method ApnsPHP_Abstract::setSocketSelectTimeout removed
method ApnsPHP_Abstract::getSocketSelectTimeout removed

method ApnsPHP_Abstract::getRecipientsNumber is deprecated. Please use ApnsPHP\Message::getRecipientsCount() instead.

ApnsPHP\Push constructor changed from

public function __construct($nEnvironment, $sProviderCertificateFile, $nProtocol = self::PROTOCOL_BINARY)

to

public function __construct(int $environment, string $providerCertificateFile, Psr\Log\LoggerInterface $logger)

Upgrading from protonlabs/apns-php version 2.2.3:

constant ApnsPHP\SharedConfig::ENVIRONMENT_PRODUCTION renamed to ApnsPHP\Push::ENVIRONMENT_PRODUCTION
constant ApnsPHP\SharedConfig::ENVIRONMENT_SANDBOX renamed to ApnsPHP\Push::ENVIRONMENT_SANDBOX
constant ApnsPHP\SharedConfig::DEVICE_BINARY_SIZE renamed to ApnsPHP\Push::DEVICE_BINARY_SIZE
constant ApnsPHP\SharedConfig::WRITE_INTERVAL renamed to ApnsPHP\Push::WRITE_INTERVAL
constant ApnsPHP\SharedConfig::CONNECT_RETRY_INTERVAL renamed to ApnsPHP\Push::CONNECT_RETRY_INTERVAL

ApnsPHP\SharedConfig was merged into ApnsPHP\Push

class ApnsPHP\Feedback removed
class ApnsPHP\Log\EmbeddedLogger removed
class ApnsPHP\Push\Server removed
class ApnsPHP\Push\Server\Exception removed
constant ApnsPHP\SharedConfig::PROTOCOL_BINARY removed
constant ApnsPHP\SharedConfig::PROTOCOL_HTTP removed
constant ApnsPHP\SharedConfig::SOCKET_SELECT_TIMEOUT removed

method ApnsPHP\SharedConfig::setLogger() removed
method ApnsPHP\SharedConfig::getLogger() removed
method ApnsPHP\SharedConfig::setRootCertificateAuthority() removed
method ApnsPHP\SharedConfig::getCertificateAuthority removed
method ApnsPHP\SharedConfig::setSocketSelectTimeout removed
method ApnsPHP\SharedConfig::getSocketSelectTimeout removed

method ApnsPHP\SharedConfig::getRecipientsNumber is deprecated. Please use ApnsPHP\Message::getRecipientsCount() instead.

ApnsPHP\Push constructor changed from

public function __construct($environment, $providerCertificateFile, $protocol = self::PROTOCOL_BINARY)

to

public function __construct(int $environment, string $providerCertificateFile, Psr\Log\LoggerInterface $logger)

ApnsPHP 3.0.0 beta 1

06 May 14:16
Compare
Choose a tag to compare
ApnsPHP 3.0.0 beta 1 Pre-release
Pre-release

A lot of work went into this release to cleanup the code base. Old functionality that
is no longer supported by Apple was removed, as well as functionality like the embedded logger
or the push server code that are better served by specialized, external projects.

The remaining functionality is now entirely unit tested, which should make it easier
to maintain going forward. Also helping in this regard is the cleanup on the documentation
side, the codestyle fixes as well as CI checks with phpstan. There is still some more
that can be done on this front, but overall it should be in very good shape for the
future.

We're already using this version of the code in multiple production projects,
so it should be safe to use. Calling it a beta for now just to make sure we didn't miss
anything.

Release highlights:

  • Use PSR-4 namespaces
  • Renamed exception classes
  • Merged SharedConfig/ApnsPHP_Abstract into the Push class
  • Added getRecipientsCount() and deprecated getRecipientsNumber()
  • Added getJsonWebToken() to simplify extending the Push class (Thanks to @BafS)
  • Update payload limit to 4KiB (Thanks to @BafS)
  • Add push-type header (Thanks to @BafS)
  • Add unit tests
  • Improved GitHub actions
  • Use phpdoc instead of doxygen
  • Removed Objective-C demo
  • Dropped support for the binary protocol
  • Dropped push server code
  • Dropped the EmbeddedLogger

Upgrading from m2mobi/apns-php version 2.0.0:

class ApnsPHP_Exception renamed to ApnsPHP\Exception
class ApnsPHP_Message renamed to ApnsPHP\Message
class ApnsPHP_Message_Custom renamed to ApnsPHP\Message\CustomMessage
class ApnsPHP_Message_Exception renamed to ApnsPHP\Message\Exception
class ApnsPHP_Message_Safari renamed to ApnsPHP\Message\SafariMessage
class ApnsPHP_Push renamed to ApnsPHP\Push
class ApnsPHP_Push_Exception renamed to ApnsPHP\Push\Exception
constant ApnsPHP_Abstract::ENVIRONMENT_PRODUCTION renamed to ApnsPHP\Push::ENVIRONMENT_PRODUCTION
constant ApnsPHP_Abstract::ENVIRONMENT_SANDBOX renamed to ApnsPHP\Push::ENVIRONMENT_SANDBOX
constant ApnsPHP_Abstract::DEVICE_BINARY_SIZE renamed to ApnsPHP\Push::DEVICE_BINARY_SIZE
constant ApnsPHP_Abstract::WRITE_INTERVAL renamed to ApnsPHP\Push::WRITE_INTERVAL
constant ApnsPHP_Abstract::CONNECT_RETRY_INTERVAL renamed to ApnsPHP\Push::CONNECT_RETRY_INTERVAL

ApnsPHP_Abstract was merged into ApnsPHP\Push

class ApnsPHP_Feedback removed
class ApnsPHP_Log_Embedded removed
class ApnsPHP_Push_Server removed
class ApnsPHP_Push_Server_Exception removed
constant ApnsPHP_Abstract::PROTOCOL_BINARY removed
constant ApnsPHP_Abstract::PROTOCOL_HTTP removed
constant ApnsPHP_Abstract::SOCKET_SELECT_TIMEOUT removed

method ApnsPHP_Abstract::setLogger() removed
method ApnsPHP_Abstract::getLogger() removed
method ApnsPHP_Abstract::setRootCertificateAuthority() removed
method ApnsPHP_Abstract::getCertificateAuthority removed
method ApnsPHP_Abstract::setSocketSelectTimeout removed
method ApnsPHP_Abstract::getSocketSelectTimeout removed

method ApnsPHP_Abstract::getRecipientsNumber is deprecated. Please use ApnsPHP\Message::getRecipientsCount() instead.

ApnsPHP\Push constructor changed from

public function __construct($nEnvironment, $sProviderCertificateFile, $nProtocol = self::PROTOCOL_BINARY)

to

public function __construct(int $environment, string $providerCertificateFile, Psr\Log\LoggerInterface $logger)

Upgrading from protonlabs/apns-php version 2.2.3:

constant ApnsPHP\SharedConfig::ENVIRONMENT_PRODUCTION renamed to ApnsPHP\Push::ENVIRONMENT_PRODUCTION
constant ApnsPHP\SharedConfig::ENVIRONMENT_SANDBOX renamed to ApnsPHP\Push::ENVIRONMENT_SANDBOX
constant ApnsPHP\SharedConfig::DEVICE_BINARY_SIZE renamed to ApnsPHP\Push::DEVICE_BINARY_SIZE
constant ApnsPHP\SharedConfig::WRITE_INTERVAL renamed to ApnsPHP\Push::WRITE_INTERVAL
constant ApnsPHP\SharedConfig::CONNECT_RETRY_INTERVAL renamed to ApnsPHP\Push::CONNECT_RETRY_INTERVAL

ApnsPHP\SharedConfig was merged into ApnsPHP\Push

class ApnsPHP\Feedback removed
class ApnsPHP\Log\EmbeddedLogger removed
class ApnsPHP\Push\Server removed
class ApnsPHP\Push\Server\Exception removed
constant ApnsPHP\SharedConfig::PROTOCOL_BINARY removed
constant ApnsPHP\SharedConfig::PROTOCOL_HTTP removed
constant ApnsPHP\SharedConfig::SOCKET_SELECT_TIMEOUT removed

method ApnsPHP\SharedConfig::setLogger() removed
method ApnsPHP\SharedConfig::getLogger() removed
method ApnsPHP\SharedConfig::setRootCertificateAuthority() removed
method ApnsPHP\SharedConfig::getCertificateAuthority removed
method ApnsPHP\SharedConfig::setSocketSelectTimeout removed
method ApnsPHP\SharedConfig::getSocketSelectTimeout removed

method ApnsPHP\SharedConfig::getRecipientsNumber is deprecated. Please use ApnsPHP\Message::getRecipientsCount() instead.

ApnsPHP\Push constructor changed from

public function __construct($environment, $providerCertificateFile, $protocol = self::PROTOCOL_BINARY)

to

public function __construct(int $environment, string $providerCertificateFile, Psr\Log\LoggerInterface $logger)

2.0.0

05 May 08:06
Compare
Choose a tag to compare

This is the big 2.0 release of ApnsPHP that brings support for
the HTTP/2 interface. Compared to the beta release there's
two additional fixes:

  • Push: Fix HTTP/2 always sending to the first endpoint
  • Message: Update comments regarding selfForRecipient

2.0.0beta1

05 May 08:04
Compare
Choose a tag to compare
2.0.0beta1 Pre-release
Pre-release

Added

  • Merged HTTP2 support
  • Merged PSR-3 support
  • Added P8 key support