Repository navigation
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 withcomposer require ably/pubsub-server.ably/ably-phpis superseded and receives security and critical-bug fixes only for one year from this release, from themaintenance/1.xbranch. - The namespace is now
Ably\PubSub\. Every class other than the client keeps its name, soAbly\Models\MessagebecomesAbly\PubSub\Models\Message. - The client class
Ably\AblyRestis nowAbly\PubSub\PubSubHttpClient(PDR-091d). Applications that only construct throughServer::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 aClientOptionsinstance. A client constructed directly declares no side, and is rejected on accounts with monthly-active-user pricing enabled. - Removed
AblyRest::setAblyAgentHeader()andAblyRest::setLibraryFlavourString(), replaced by the per-clientagentsclient option. - Removed
ably-loader.php; Composer's autoloader is the only supported install path. - Added the
endpointclient option (REC1, REC2), which is now the only way to choose where the client connects. The default primary domain ismain.realtime.ably.net, with fallback hostsmain.[a-e].fallback.ably-realtime.com. - Removed the
environmentandrestHostclient options in favour ofendpoint. They are now ignored if passed, so a client still settingenvironmentconnects to production. - Setting
portortlsPortno longer disables the default fallback hosts; a hostnameendpointdoes. ClientOptions::getPrimaryRestHost()is nowgetPrimaryDomain().Defaults::$restHost,Defaults::$realtimeHostandDefaults::getEnvironmentFallbackHosts()are replaced byDefaults::$endpoint,Defaults::getPrimaryDomain()andDefaults::getEndpointFallbackHosts().- Removed the
demo/Heroku application and itsProcfile. - The minimum supported PHP version is now 8.1; the SDK is tested on 8.1 through 8.5.