Skip to content

2.0.0

Latest

Choose a tag to compare

@ttypic ttypic released this 28 Oct 17:57
· 4 commits to main since this release
112950f

The first release of the ably/pubsub-server package, superseding
ably/ably-php. See UPDATING.md for the migration guide and
the full mapping table.

Breaking changes:

  • The package is now ably/pubsub-server, installed with composer require ably/pubsub-server. ably/ably-php is superseded and receives security and critical-bug fixes only for one year from this release, from the maintenance/1.x branch.
  • The namespace is now Ably\PubSub\. Every class other than the client keeps its name, so Ably\Models\Message becomes Ably\PubSub\Models\Message.
  • The client class Ably\AblyRest is now Ably\PubSub\PubSubHttpClient (PDR-091d). Applications that only construct through Server::createHttpClient() are unaffected; type hints and DI bindings naming the class must be updated.
  • Clients are constructed through Ably\PubSub\Server::createHttpClient(), which declares the server side on the wire. It accepts everything the constructor accepted: an options array, an API key string, a token string, or a ClientOptions instance. A client constructed directly declares no side, and is rejected on accounts with monthly-active-user pricing enabled.
  • Removed AblyRest::setAblyAgentHeader() and AblyRest::setLibraryFlavourString(), replaced by the per-client agents client option.
  • Removed ably-loader.php; Composer's autoloader is the only supported install path.
  • Added the endpoint client option (REC1, REC2), which is now the only way to choose where the client connects. The default primary domain is main.realtime.ably.net, with fallback hosts main.[a-e].fallback.ably-realtime.com.
  • Removed the environment and restHost client options in favour of endpoint. They are now ignored if passed, so a client still setting environment connects to production.
  • Setting port or tlsPort no longer disables the default fallback hosts; a hostname endpoint does.
  • ClientOptions::getPrimaryRestHost() is now getPrimaryDomain(). Defaults::$restHost, Defaults::$realtimeHost and Defaults::getEnvironmentFallbackHosts() are replaced by Defaults::$endpoint, Defaults::getPrimaryDomain() and Defaults::getEndpointFallbackHosts().
  • Removed the demo/ Heroku application and its Procfile.
  • The minimum supported PHP version is now 8.1; the SDK is tested on 8.1 through 8.5.