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/flystem
viasuperbalist/flysystem-google-storage
and by\Kreait\Firebase\Storage::getFilesystem()
has been deprecated.
General
- Using the
Kreait\Firebase
class has been deprecated. Please instantiate the services you need directly:
<?php
use 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_DEPRECATED
warning (only if PHP is configured to show them).