Changelog History
Page 9
-
v4.34.0 Changes
October 13, 2019โ Added
โช Firestore
- ๐ You can now access your project's Firestore database. (Documentation)
General
- ๐ It is now possible to override the HTTP Handler used for API requests. (Documentation)
๐ Changes
Messaging
- When sending a message with a notification that has neither a title nor a body, the Firebase API returns an error. This is now prevented by checking for the existence of one of both when creating a notification. It is still possible to explicitely use empty strings.
Storage
- The direct integration of
league/flystemviasuperbalist/flysystem-google-storageand by\Kreait\Firebase\Storage::getFilesystem()has been deprecated.
General
- ๐ Using the
Kreait\Firebaseclass has been deprecated. Please instantiate the services you need directly:
<?php use Kreait\Firebase; -
v4.33.0 Changes
October 11, 2019โ Added
โช Firestore
- ๐ You can now access your project's Firestore database. (Documentation)
General
- ๐ It is now possible to override the HTTP Handler used for API requests. (Documentation)
๐ Changes
Messaging
- When sending a message with a notification that has neither a title nor a body, the Firebase API returns an error. This is now prevented by checking for the existence of one of both when creating a notification. It is still possible to explicitely use empty strings.
Storage
- ๐ The direct integration of
league/flystemviasuperbalist/flysystem-google-storageand by\Kreait\Firebase\Storage::getFilesystem()has been deprecated.
General
๐ Using the
Kreait\Firebaseclass has been deprecated. Please instantiate the services you need directly:<?phpuse Kreait\Firebase;# deprecated$firebase = (new Firebase\Factory())// ->withServiceAccount(...)// ->...->create();$auth = $firebase->getAuth();$database = $firebase->getDatabase();$messaging = $firebase->getMessaging();$remoteConfig = $firebase->getRemoteConfig();$storage = $firebase->getStorage();# recommended$factory = (new Firebase\Factory())// ->withServiceAccount(...)// ->...// no call to ->create();$auth = $factory->createAuth();$database = $factory->createDatabase();$messaging = $factory->createMessaging();$remoteConfig = $factory->createRemoteConfig();$storage = $factory->createStorage();
When using
Kreait\Firebase\Factory::withServiceAccount()auto-discovery will be disabled.๐ Calling a deprecated method will trigger a
E_USER_DEPRECATEDwarning (only if PHP is configured to show them).
-
v4.32.0 Changes
September 13, 2019โ Added
Dynamic Links
- ๐ You can now create Dynamic Links and retrieve statistics for Dynamic Links. (Documentation)
use Kreait\Firebase; $firebaseFactory = new Firebase\Factory(); $dynamicLinksDomain = 'https://example.page.link'; $dynamicLinks = $firebaseFactory->createDynamicLinksService($dynamicLinksDomain); $shortLink = $dynamicLinks->createShortLink('https://domain.tld/some/path'); $stats = $dynamicLinks->getStatistics('https://example.page.link/wXYZ');๐ Changes
General
- It is now possible to give the path to a Service Account JSON file directly to the factory instead of instantiating a
ServiceAccountinstance beforehand.
use Kreait\Firebase; $firebase = (new Firebase\Factory()) ->withServiceAccount('/path/to/google-service-account.json') ->create();Realtime Database
- ๐
Kreait\Firebase\Database::getRules()has been deprecated in favor ofKreait\Firebase\Database::getRuleSet()
-
v4.31.0 Changes
August 22, 2019๐ Bugfixes
Messaging
- ๐ Fixed the inability to correctly parse a response from the Firebase Batch Messaging when
Messaging::sendMulticast()orMessaging::sendAll()was used with only one recipient.
๐ Changed
Auth
- ๐ The third parameter of
Kreait\Firebase\Auth::verifyIdToken()($allowTimeInconsistencies) has been deprecated because, since 4.25.0, a default leeway of 5 minutes is already applied. Using it will trigger aE_USER_DEPRECATEDwarning. - 0๏ธโฃ Previously the "verified" status of an user email could be
nullif not defined - it will now befalseby default
- ๐ Fixed the inability to correctly parse a response from the Firebase Batch Messaging when
-
v4.30.1 Changes
August 17, 2019๐ Changed
Database
- ๐ Fixed a deprecation warning when getting the root reference with
Kreait\Firebase\Database::getReference()without giving a path.
Messaging
- ๐ When sending multiple messages at once, it can happen in some cases that the HTTP sub-responses can not be parsed which would cause an exception. Until we figure out the cause, those exceptions are now caught, with the caveat that the resulting send-report is not correct (it will show 0 successes and 0 failures even if the messages were successfully sent).
- ๐ Fixed a deprecation warning when getting the root reference with
-
v4.30.0 Changes
August 16, 2019๐ Changed
Kreait\Firebase\Factorynow exposes the methods to create the single components (Auth, Messaging, Remote Config, Storage) directly in order to enable its usage in kreait/laravel-firebase. -
v4.29.0 Changes
August 13, 2019โ Added
Cloud Messaging
- โ Added
Kreait\Firebase\Messaging::sendAll()to send up to 100 messages to multiple targets (tokens, topics, and conditions) in one request. (Documentation) - A condition will now ensure that no more than five topics are provided. Previously, the Firebase REST API would have rejected the message with a non-specific "Invalid condition expression provided."
Remote Config
- The Remote Config history can now be filtered. (Documentation)
- A published Remote Config template now contains a version that can be retrieved with
Kreait\Firebase\RemoteConfig\Template::getVersion() - The parameters of a Remote Config template can now be retrieved with
Kreait\Firebase\RemoteConfig\Template::getParameters()
๐ Changed
Cloud Messaging
Kreait\Firebase\Messaging::sendMulticast()now makes full use of the FCM batch API, resulting in substantial performance improvements.- Values passed to
Kreait\Firebase\Messaging\MessageData::withData()will now be cast to strings instead of throwing InvalidArgument exceptions when they are not strings.
- โ Added
-
v4.28.0 Changes
July 29, 2019โ Added
General
- The SDK is now able to handle connection issues more gracefully. The following exceptions will now be thrown
when a connection could not be established:
Kreait\Firebase\Auth\ApiConnectionFailedKreait\Firebase\Database\ApiConnectionFailedKreait\Firebase\Messaging\ApiConnectionFailedKreait\Firebase\RemoteConfig\ApiConnectionFailed
Cloud Messaging
- It is now possible to retrieve extended information about application instances related to a registration token, including the topics an application instance/registration token is subscribed to. (Documentation)
๐ Changed
General
- ๐ป Each component now has its own catchable exception interface, e.g.
Kreait\Firebase\Exception\AuthExceptionorKreait\Firebase\Exception\DatabaseException. - The following exceptions are now interfaces implemented by specific errors instead of extensible classes:
Kreait\Firebase\Exception\AuthExceptionKreait\Firebase\Exception\DatabaseException(new)Kreait\Firebase\Exception\MessagingExceptionKreait\Firebase\Exception\RemoteConfigException
- ๐
Kreait\Firebase\Auth\CustomTokenViaGoogleIamis no longer using deprecated methods to build a custom token. - ๐ Getting requests and responses from exceptions is now considered deprecated. If you want to debug HTTP requests,
use the Firebase factory to debug the HTTP client via configuration or an additional middleware.
- The SDK is now able to handle connection issues more gracefully. The following exceptions will now be thrown
when a connection could not be established:
-
v4.27.0 Changes
July 19, 2019โ Added
Cloud Messaging
- Notifications can now be provided with an image URL (Documentation)
- You can use
Kreait\Firebase\Messaging\RawMessageFromArray(array $data)to create a message without the SDK checking it for validity before sending it. This gives you full control over the sent message, but also means that you have to send/validate a message in order to know if it's valid or not. (Documentation) - It is now possible to add platform independent FCM options to a message. (Documentation)
๐ Changed
Cloud Messaging
- โ Removed ability to specify multiple message targets (Condition/Token/Topic) at once when creating an FCM message
through
CloudMessage::fromArray(). Previously, only the first matched target was used. Now, anInvalidArgumentexception is thrown.
-
v4.26.0 Changes
June 23, 2019๐ This is an under-the-hood release and should not affect any existing functionality:
- Internal classes have been marked as
@internal - Micro-Optimizations
- PHPStan's analysis level has been set to
max psr/simple-cachewas implicitely required and is now explicitely required- ๐ท Simplified the Travis CI configuration (this should now enably PRs to be tested without errors)
- Internal classes have been marked as