NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #504 most downloaded on Packagist
Firebase Admin SDK
Latest stable
8.6.0
Last release 1 months ago
08 Oct 2026
Release timing varies
gaps range from 2 weeks to 4 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
249 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
The Messaging component didn't work for projects with non-word characters in their project ID.
Added methods to verify password reset codes and confirm password reset requests (Documentation), thanks to @joemugen
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Replaced usages of mb_strlen() on request bodies with Psr\Http\Message\StreamInterface::getSize() to determine the Content-Length of a request to prev
Replaced usages of mb_strlen() on request bodies with Psr\Http\Message\StreamInterface::getSize() to determine the Content-Length of a request to prevent unexpected side effects (#348)
Removed deprecation warnings (E_USER_DEPRECATED) when using Kreait\Firebase and Kreait\Firebase\Factory
E_USER_DEPRECATED) when using Kreait\Firebase and Kreait\Firebase\FactoryServiceBuilder class that comes with the google/cloud-core package. This enables the usage of google/cloud-core versions smaller than 1.19 (for example in older projects that can't use newer versions)Kreait\Firebase\Factory is now injected into Kreait\Firebase instead of each individual component.Storage and Firestore clients are now instantiated directly instead of relying on the ServiceBuilder class that comes with the google/cloud-core packa
Storage and Firestore clients are now instantiated directly instead of relying on the ServiceBuilder class that comes with the google/cloud-core package. This enables the usage of google/cloud-core versions smaller than 1.19 (for example in older projects that can't use newer versions)
…has been deprecated.
league/flystem via superbalist/flysystem-google-storage and by \Kreait\Firebase\Storage::getFilesystem() has been deprecated.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();
Kreait\Firebase\Factory::withServiceAccount() auto-discovery will be disabled.E_USER_DEPRECATED warning (only if PHP is configured to show them).Kreait\Firebase\Database::getRules() has been deprecated in favor of Kreait\Firebase\Database::getRuleSet()
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');
It is now possible to give the path to a Service Account JSON file directly to the factory instead of having to instantiate a ServiceAccount instance beforehand.
use Kreait\Firebase;
$firebase = (new Firebase\Factory())
->withServiceAccount('/path/to/google-service-account.json')
->create();
Kreait\Firebase\Database::getRules() has been deprecated in favor of Kreait\Firebase\Database::getRuleSet()The third parameter of Kreait\Firebase\Auth::verifyIdToken() ($allowTimeInconsistencies) has been deprecated because, since 4.25.0, a default leeway o…
Messaging::sendMulticast() or Messaging::sendAll() was used with only one recipient.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 a E_USER_DEPRECATED warning.null if not defined - it will now be false by defaultFixed a deprecation warning when getting the root reference with Kreait\Firebase\Database::getReference() without giving a path.
Kreait\Firebase\Database::getReference() without giving a path.Kreait\Firebase\Factory now exposes the methods to create the single components (Auth, Messaging, Remote Config, Storage) directly in order to enable
Kreait\Firebase\Factory now exposes the methods to create the single components (Auth, Messaging, Remote Config, Storage) directly in order to enable its usage in kreait/laravel-firebase.
Added Kreait\Firebase\Messaging::sendAll() to send up to 100 messages to multiple targets (tokens, topics, and conditions) in one request. (Documentat
Kreait\Firebase\Messaging::sendAll() to send up to 100 messages to multiple targets (tokens, topics, and conditions) in one request. (Documentation)Kreait\Firebase\RemoteConfig\Template::getVersion()Kreait\Firebase\RemoteConfig\Template::getParameters()Kreait\Firebase\Messaging::sendMulticast() now makes full use of the FCM batch API, resulting in substantial performance improvements.Kreait\Firebase\Messaging\MessageData::withData() will now be cast to strings instead of throwing InvalidArgument exceptions when they are not strings.Kreait\Firebase\Auth\CustomTokenViaGoogleIam is no longer using deprecated methods to build a custom token.
Kreait\Firebase\Auth\ApiConnectionFailedKreait\Firebase\Database\ApiConnectionFailedKreait\Firebase\Messaging\ApiConnectionFailedKreait\Firebase\RemoteConfig\ApiConnectionFailedKreait\Firebase\Exception\AuthException or Kreait\Firebase\Exception\DatabaseException.Kreait\Firebase\Exception\AuthExceptionKreait\Firebase\Exception\DatabaseException (new)Kreait\Firebase\Exception\MessagingExceptionKreait\Firebase\Exception\RemoteConfigExceptionKreait\Firebase\Auth\CustomTokenViaGoogleIam is no longer using deprecated methods to build a custom token.Cloud Messaging: Notifications can now be provided with an image URL (Documentation)
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)CloudMessage::fromArray(). Previously, only the first matched target was used. Now, an InvalidArgument exception is thrown.This is an under-the-hood release and should not affect any existing functionality:
This is an under-the-hood release and should not affect any existing functionality:
@internalmaxpsr/simple-cache was implicitely required and is now explicitely requiredWhen verifying ID tokens a leeway of 5 minutes is applied when verifying time based claims.
When verifying ID tokens a leeway of 5 minutes is applied when verifying time based claims.
You can now send one message to multiple devices with Kreait\Firebase\Messaging::sendMulticast($message, $deviceTokens) (Documentation)
You can now send one message to multiple devices with Kreait\Firebase\Messaging::sendMulticast($message, $deviceTokens) (Documentation)
Custom attributes can now be deleted from a user with Kreait\Firebase\Auth::deleteCustomUserAttributes($uid)
Custom attributes can now be deleted from a user with Kreait\Firebase\Auth::deleteCustomUserAttributes($uid) (#300)
Kreait\Firebase\Messaging\CloudMessage can now be created without a target. The existence of a message target is now validated on send. This enables r
Kreait\Firebase\Messaging\CloudMessage can now be created without a target. The existence of a message target is now validated on send. This enables re-using a message for multiple targets.Kreait\Firebase\Factory::withDisabledAutoDiscovery() (Documentation)Fixed return value on Kreait\Firebase\Database\Transaction::set(): it returned the HTTP response, but should return nothing.
Fixed return value on Kreait\Firebase\Database\Transaction::set(): it returned the HTTP response, but should return nothing.
You can now wrap Realtime Database Saves and Deletions in Transactions/Conditional requests. (Documentation)
You can now wrap Realtime Database Saves and Deletions in Transactions/Conditional requests. (Documentation) (#108)
Fixed TypeErrors when processing certain API exceptions
Fixed TypeErrors when processing certain API exceptions (#295)
Sent emails can now be localized by providing a $locale parameter to the following methods:
Sent emails can now be localized by providing a $locale parameter to the following methods:
Kreait\Firebase\Auth::sendEmailVerification($uid, $continueUrl = null, $locale = null)Kreait\Firebase\Auth::sendPasswordResetEmail($email, $continueUrl = null, $locale = null)Improved the error message when encountering an invalid Service Account specification to help developers use the correct one (provided by @puf in this
Improved the error message when encountering an invalid Service Account specification to help developers use the correct one (provided by @puf in this StackOverflow answer)
When verifying ID tokens, allowed time inconsistencies now include the auth_time clime, in addition to the iat claim.
When verifying ID tokens, allowed time inconsistencies now include the auth_time clime, in addition to the iat claim. (#278)
When creating Kreait\Firebase\Exception\MessagingException from a GuzzleHttp\Exception\RequestException, the HTTP response returned was lost.
When creating Kreait\Firebase\Exception\MessagingException from a GuzzleHttp\Exception\RequestException, the HTTP response returned was lost.
Instances of Kreait\Firebase\Exception\MessagingException now have better messages (#274).
Instances of Kreait\Firebase\Exception\MessagingException now have better messages (#274).
Kreait\Firebase\Messaging\CloudMessage: You can now create a new message with a different target from an existing message by using the withChangedTarg
Kreait\Firebase\Messaging\CloudMessage: You can now create a new message with a different target from an existing message by using the withChangedTarget() method (Documentation).
The signature of an ID Token is now verified even if a prior error occured (thanks @kanoblake for reporting the issue and providing a test case)
Firebase\Auth\Token\Exception\InvalidSignature exception. It extends the previously thrown Firebase\Auth\Token\Exception\InvalidToken,
so existing behaviour doesn't change.When loading a non-existing/invalid service account file, error details are now included.
Added support for Remote Config Template validation (Documentation)
When on GCP/GCE, the environment was overriding an explicitely injected service account for API request authentication.
When on GCP/GCE, the environment was overriding an explicitely injected service account for API request authentication.
The SDK can now be used configuration-free on Google Cloud Engine.
The SDK can now be used configuration-free on Google Cloud Engine.
Kreait\Firebase\Messaging\CloudMessage can handle all currently supported types of messages and supersedes the specialized message types.
Kreait\Firebase\Messaging\CloudMessage can handle all currently supported types of messages and supersedes the specialized message types.Kreait\Firebase\Messaging\MessageToTopic::fromArray()
Kreait\Firebase\Messaging\CloudMessage::fromArray()Kreait\Firebase\Messaging\MessageToTopic::create($topic)
Kreait\Firebase\Messaging\CloudMessage::withTarget('topic', $topic)Kreait\Firebase\Messaging\ConditionalMessage::fromArray()
Kreait\Firebase\Messaging\CloudMessage::fromArray()Kreait\Firebase\Messaging\ConditionalMessage::create($condition)
Kreait\Firebase\Messaging\CloudMessage::withTarget('condition', $condition)Kreait\Firebase\Messaging\MessageToRegistrationToken::fromArray()
Kreait\Firebase\Messaging\CloudMessage::fromArray()Kreait\Firebase\Messaging\MessageToRegistrationToken::create($token)
Kreait\Firebase\Messaging\CloudMessage::withTarget('token', $token)Sanitizing the project ID by default changed the output of the method \Kreait\Firebase\ServiceAccount::getProjectId(), so a new method \Kreait\Firebas
Sanitizing the project ID by default changed the output of the method \Kreait\Firebase\ServiceAccount::getProjectId(), so a new method \Kreait\Firebase\ServiceAccount::getSanitizedProjectId() is now used instead.
Project IDs that cannot be used for database URIs directly are sanitized when configuring a Service Account
Kreait\Firebase\Exception\RemoteConfig\OperationAborted exception. Firebase has
changed the error to "VERSION MISMATCH", which now results in a Kreait\Firebase\Exception\RemoteConfig\VersionMismatch exception.
The new exception inherits from the old exception, so no code changes are required.Kreait\Firebase\Exception\RemoteConfigException now includes the full error as returned by the Firebase API.Fixed generating a random child key with $reference->push()->getKey()
Added support for setting a continueUrl to email actions (#220, thanks to Wade Womersley)
Added support for setting a continueUrl to email actions (#220, thanks to Wade Womersley)
Fixed the import of existing Remote Config conditions
Fixed the import of existing Remote Config conditions (#218)
A more descriptive exception is thrown when adding a parameter to a Remote Config template that refers to a condition that doesn't exist.
Add support for validating FCM messages without actually sending them (#216) (Documentation)
Add support for validating FCM messages without actually sending them (#216) (Documentation)
Enabled custom configuration and middlewares for the underlying HTTP client (Documentation)
{} instead of [])Add support for non-alphabetical chars in keys in Database snapshots
Add support for non-alphabetical chars in keys in Database snapshots (#212)
Enabled the caching of Google's public keys used for ID Token verification (#210) (Documentation)
Enabled the caching of Google's public keys used for ID Token verification (#210) (Documentation)
Added a flag to Kreait\Firebase\Auth::verifyIdToken() to ignore IssuedInTheFuture exceptions (Documentation)
Added a flag to Kreait\Firebase\Auth::verifyIdToken() to ignore IssuedInTheFuture exceptions (Documentation)
Added support for FCM Topic management (Documentation)
Kreait\Firebase\Messaging::subscribeToTopic($topic, $registrationTokens)Kreait\Firebase\Messaging::unsubscribeFromTopic($topic, $registrationTokens)Kreait\Firebase\Factory extensible so that it can be extended by libraries that want to build on it.
grpc PHP extension.Fixed marking disabled users as enabled when using arrays
Added support to unlink identity providers from a user
Added support to unlink identity providers from a user
Kreait\Firebase\Auth::unlinkProvider($uid, $provider) ($provider can be a string or an array of strings)Added support to remove the phone number from a user (#195)
phoneNumber to nulldeletePhoneNumber to truedeleteProvider to ['phone']Added support for FCM message configurations (Android, APNS, WebPush) (initiated by @Casperhr, thanks!)
Added support for FCM message configurations (Android, APNS, WebPush) (initiated by @Casperhr, thanks!)
You can find the updated Documentation here.
Added support for Firebase Cloud Messaging (Documentation)
Added support for setting custom attributes/claims on users (Documentation, Official Firebase documentation)
Kreait\Firebase\Auth::setCustomUserAttributes($uid, array $attributes)void return typesAdded support for the Firebase Remote Config (Documentation)
Added support for the Firebase Remote Config (Documentation)
Handle non-existing users consistently
Handle non-existing users consistently (#186)
Fixed setting email verification flags
Fixed setting email verification flags (#183)
Renamed method with typo Storage::getFileystem() to the correct Storage::getFilesystem()
Renamed method with typo Storage::getFileystem() to the correct Storage::getFilesystem() (#182)
A new ready-to-go repository with usage examples can be found at https://github.com/jeromegamez/firebase-php-examples
A new ready-to-go repository with usage examples can be found at https://github.com/jeromegamez/firebase-php-examples
Kreait\Firebase\Auth::createUser($properties)Kreait\Firebase\Auth::updateUser($uid, $properties)Kreait\Firebase\Auth::getUserByPhoneNumber($phoneNumber)Kreait\Firebase\Auth::getUser() and Kreait\Firebase\Auth::getUser() were throwing a TypeError
when trying to create a user record from an empty data set (the Firebase API returns an empty
response when no user is found). Now, a Kreait\Firebase\Exception\UserNotFound exception
is thrown instead.Kreait\Firebase\Auth\ApiClient::signupNewUser()Kreait\Firebase\Auth\ApiClient::enableUser()Kreait\Firebase\Auth\ApiClient::disableUser()Kreait\Firebase\Auth\ApiClient::changeUserPassword()Kreait\Firebase\Auth\ApiClient::changeUserEmail()Kreait\Firebase\Storage::getFilesystem() was using/overwriting the configured buckets
Kreait\Firebase\Storage::getFilesystem() was using/overwriting the configured bucketsDue to improper caching in the Firebase Factory, configuring a new Firebase instance with another service account would have used a wrongly configured
Due to improper caching in the Firebase Factory, configuring a new Firebase instance with another service account would have used a wrongly configured storage.
Added support for the Firebase Cloud Storage (Documentation)
Added support for the Firebase Cloud Storage (Documentation)
The timestamps validSince, createdAt and lastLoginAt included in user records were not parsed correctly.
The timestamps validSince, createdAt and lastLoginAt included in user records were not parsed correctly.
Fix Undefined index "users" while retrieving list of users
All deprecated methods and classes have been removed.
Kreait\Firebase\Auth\User has been replaced with Kreait\Firebase\Auth\UserRecordUser now accept UIDs only.Kreait\Firebase\Auth::getUserByEmail(string $email)Kreait\Firebase\Auth::getUserByEmailAndPassword()Kreait\Firebase\Auth::getUserInfo()Since 4.0, defining authentication overrides is only possible when creating a new Firebase instance via
the factory (see Authenticate with limited privileges). Thus, the following methods have been removed:
Kreait\Firebase::asUser()Kreait\Firebase::asUserWithClaims()Kreait\Firebase\Database::withCustomAuth()Kreait\Firebase\Database\ApiClient::withCustomAuth()The SDK now makes full use of the kreait/firebase-tokens library and throws its exceptions when an ID token is considered invalid.
Also, the option to specify a custom expiration time when creating custom tokens has been removed. Following the official Firebase SDKs, the lifetime of a custom token is one hour.
Added documentation: (Troubleshooting: ID Tokens are issued in the future)
One column per quarter.