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.
When deleting a user account, an empty account was created with the same UID
A Database API Exception did not always include a request
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Reverted deprecations of Kreait\Firebase\Factory::withTokenHandler() and \Kreait\Firebase\Auth\ApiClient::sendEmailVerification()
Reverted deprecations of Kreait\Firebase\Factory::withTokenHandler() and \Kreait\Firebase\Auth\ApiClient::sendEmailVerification()
Deprecated the usage of the Kreait\Firebase\Auth\User object
Kreait\Firebase\Auth::getUserInfo(string $uid): array (Documentation)Kreait\Firebase\Auth::disableUser(string $uid) (Documentation)Kreait\Firebase\Auth::enableUser(string $uid) (Documentation)Kreait\Firebase\Auth::revokeRefreshTokens(string $uid) (Documentation)Kreait\Firebase\Auth::verifyIdToken() (Documentation)Kreait\Firebase\Auth\User objectKreait\Firebase\Auth::sendEmailVerification(Kreait\Firebase\Auth\User\User $user)Kreait\Firebase\Exception\InvalidIdToken was not able to hold every invalid ID token
Kreait\Firebase\Exception\InvalidIdToken was not able to hold every invalid ID token (#152)
Fixed a security issue discovered by @hernandev that enabled an attacker to impersonate any registered user in a Firebase application.
The previously required web API key is not needed for instance creations anymore and all related methods are deprecated. Please replace calls to Kreai…
The previously required web API key is not needed for instance creations anymore and all related methods are deprecated. Please replace calls to Kreait\Firebase\Factory::withServiceAccountAndApiKey() with Kreait\Firebase\Factory::withServiceAccount().
Fixes bug that not more than one custom token could be created at a time.
Fixes bug that not more than one custom token could be created at a time.
Enable ordering by nested children
Enable ordering by nested children (#135)
When an ID Token verification has failed, the resulting exception now includes the token (#139, #140)
When an ID Token verification has failed, the resulting exception now includes the token (#139, #140)
Adds support for getting and updating Realtime Database Rules (#136) (Documentation)
Nothing published for this version
Avoid OutOfBoundsException when a user's email is not set
Avoid OutOfBoundsException when a user's email is not set
Added Kreait\Firebase\Auth\User::getEmail()
Kreait\Firebase\Auth\User::getEmail()Kreait\Firebase\Auth\User::hasVerifiedEmail()Kreait\Firebase\Auth::sendPasswordResetEmail($userOrEmail)
(Documentation)Fixed Travis CI builds for pull requests
Removed final keyword from classes not implementing an interface.
Removed final keyword from classes not implementing an interface.
If you read this: https://github.com/kreait/firebase-bundle is going to be revived, and this release is needed for its progress :)
Restored PHP 7.0 compatibility
Restored PHP 7.0 compatibility
Enabled API exceptions to be debuggable by including the sent request and received response. (Documentation)
Enabled API exceptions to be debuggable by including the sent request and received response. (Documentation)
Reverted Kreait\Firebase\Factory deprecations introduced in 3.2.0
Reverted Kreait\Firebase\Factory deprecations introduced in 3.2.0
Deprecated Kreait\Firebase\Factory::withServiceAccount(), use Kreait\Firebase\Factory::withServiceAccountAndApiKey() instead
Kreait\Firebase\Factory::withServiceAccount(), use Kreait\Firebase\Factory::withServiceAccountAndApiKey() insteadKreait\Firebase::asUserWithClaims(), use Kreait\Firebase\Auth::getUser() and Kreait\Firebase::asUser() insteadKreait\Firebase::getTokenHandler(), use Kreait\Firebase\Auth::createCustomToken() and Kreait\Firebase\Auth::verifyIdToken() instead.Removed the restriction to the google/auth package to versions <1.0
Removed the restriction to the google/auth package to versions <1.0 (#110)
Fixed the error that Service Account Autodiscovery was not working when no Discoverer was given.
Fixed the error that Service Account Autodiscovery was not working when no Discoverer was given.
Deprecated Kreait\Firebase\Factory::withCredentials() (Documentation)
Kreait\Firebase\Factory::withCredentials() (Documentation)Kreait\Firebase\ServiceAccount::discover()Added additional checks to ensure given credentials are valid and readable
When the credentials file has not been found, a CredentialsNotFound exception is thrown, including the information which paths have been tried.
When the credentials file has not been found, a CredentialsNotFound exception is thrown, including the information which paths have been tried.
Removed database secret authentication, as it has been deprecated by Firebase.
Kreait namespace to avoid possible conflicts with official Firebase PHP libraries using the Firebase namespace.Please visit the Migration section in the docs to see which changes in your code are required when upgrading from 2.x to 3.0.
Fixes the problem that it wasn't possible to use startAt/endAt/equalTo with string values.
Fixes the problem that it wasn't possible to use startAt/endAt/equalTo with string values.
Allow the usage of a custom token handler when creating a new Firebase instance by adding the factory method withTokenHandler(\Firebase\Auth\Token\Han
Allow the usage of a custom token handler when creating a new Firebase instance by adding the factory method withTokenHandler(\Firebase\Auth\Token\Handler $handler).
Introduces Firebase\Factory to create Firebase instances, and deprecate the previous static instantiation methods on the Firebase class.
Introduces Firebase\Factory to create Firebase instances, and deprecate the previous static instantiation methods on the Firebase class.
It is now possible to omit an explicit JSON credentials file,
FIREBASE_CREDENTIALSGOOGLE_APPLICATION_CREDENTIALS~/.config/gcloud/application_default_credentials.json (Linux, MacOS)$APPDATA/gcloud/application_default_credentials.json (Windows)The documentation at http://firebase-php.readthedocs.io has been updated
The following methods have been deprecated and will trigger a deprecation warning when used:
Firebase::fromServiceAccount()Firebase::fromDatabaseUriAndSecret()Ensure that guzzlehttp/psr7 1.4.0 is not used, as it breaks backwards compatibility (see guzzle/psr7#138)
Ensure that guzzlehttp/psr7 1.4.0 is not used, as it breaks backwards compatibility (see guzzle/psr7#138)
Updated kreait/firebase-tokens to fix #65 (Invalid token when claims are empty).
Updated kreait/firebase-tokens to fix #65 (Invalid token when claims are empty).
Updated kreait/firebase-tokens to make sure ID token verifications continue to work.
Updated kreait/firebase-tokens to make sure ID token verifications continue to work.
Added the means to work with custom tokens and ID tokens by using kreait/firebase-tokens. See Authentication: Working with Tokens for usage instructio
V2 namespace)
with a solution based on lcobucci/jwt instead of the
abandoned firebase/token-generator.These features are also available in a standalone library: kreait/firebase-tokens
Added a SERVER_TIMESTAMP constant to the Firebase\Database class to ease the population of fields with Firebase's timestamp server value
Added a SERVER_TIMESTAMP constant to the Firebase\Database class to ease the population of fields with Firebase's timestamp server value
use Firebase\Database;
$ref = $db->getReference('my-ref')
->set('created_at', Database::SERVER_TIMESTAMP);
is equivalent to
$ref = $db->getReference('posts/my-post')
->set('created_at', ['.sv' => 'timestamp']);
Updated docs to make clearer that authenticating with a Database Secret is not recommended since the official deprecation by Firebase (see the "Databa…
Reference::getPath() to retrieve the full relative path to a node.Firebase::fromServiceAccount(). Until now, a string would have been treated as the path to a JSON file.Starting with version 2.0, this SDK is PHP7 only! For PHP 5 support, please use Version 1.x.
Starting with version 2.0, this SDK is PHP7 only! For PHP 5 support, please use Version 1.x.
You can find the documentation at http://firebase-php.readthedocs.io .
A PermissionDenied exception is thrown when a request violates the Firebase Realtime Database rules
PermissionDenied exception is thrown when a request violates the
Firebase Realtime Database rulesIndexNotDefined exception is thrown when a Query is performed on an unindexed subtreelimitToFirst() or limitToLast(),
results were lost because Firebase sorts in ascending order and limits the results before
we can process them further.Reference::getChildKeys() to retrieve the key names of a reference's children
Full list of changes: https://github.com/kreait/firebase-php/compare/2.0.0-beta2...2.0.0-beta3
Starting with version 2.0, this SDK is PHP7 only! The SDK is considered stable, but will stay in beta until the documentation at http://firebase-php.readthedocs.io has been finished.
Create a service account as described in the Firebase Docs and download the service account JSON file, or retrieve a database secret from your Firebase application's project settings page.
$firebase = Firebase::fromServiceAccount(__DIR__.'/google-service-account.json');
// or
$firebase = Firebase::fromDatabaseUriAndSecret(
'https://<project>.firebaseio.com',
'<database secret>'
);
$db = $firebase->getDatabase();
$fullTree = $db
->getReference('/')
->orderByKey(SORT_DESC)
->getValue(); // Shortcut for ->getSnapshot()->getValue()
print_r($fullTree);
It seems more than just possible that the ID of a project given in the Google Service Account JSON file is different to the xxx.firebaseio.com subdoma
It seems more than just possible that the ID of a project given in the Google Service Account JSON file is different to the xxx.firebaseio.com subdomain of a Firebase application. It was already possible to pass the URL of the Realtime Database as a second parameter:
$firebase = Firebase::fromServiceAccount(
__DIR__.'/google-service-account.json',
'https://my-project.firebaseio.com'
);
Now a more visible method is available to do the same:
$firebase = Firebase::fromServiceAccount(__DIR__.'/google-service-account.json')
->withDatabaseUri('https://my-project.firebaseio.com');
Full list of changes: https://github.com/kreait/firebase-php/compare/2.0.0-beta1...2.0.0-beta2
Starting with version 2.0, this SDK is PHP7 only! The SDK is considered stable, but will stay in beta until the documentation at http://firebase-php.readthedocs.io has been finished.
Create a service account as described in the Firebase Docs and download the service account JSON file, or retrieve a database secret from your Firebase application's project settings page.
$firebase = Firebase::fromServiceAccount(__DIR__.'/google-service-account.json');
// or
$firebase = Firebase::fromDatabaseUriAndSecret(
'https://<project>.firebaseio.com',
'<database secret>'
);
$db = $firebase->getDatabase();
$fullTree = $db
->getReference('/')
->orderByKey(SORT_DESC)
->getValue(); // Shortcut for ->getSnapshot()->getValue()
print_r($fullTree);
Starting with version 2.0, this SDK is PHP7 only! The SDK is considered stable, but will stay in beta until the documentation at http://firebase-php.r
Starting with version 2.0, this SDK is PHP7 only! The SDK is considered stable, but will stay in beta until the documentation at http://firebase-php.readthedocs.io has been finished.
Create a service account as described in the Firebase Docs and download the service account JSON file, or retrieve a database secret from your Firebase application's project settings page.
$firebase = Firebase::fromServiceAccount(__DIR__.'/google-service-account.json');
// or
$firebase = Firebase::fromDatabaseUriAndSecret(
'https://<project>.firebaseio.com',
'<database secret>'
);
$db = $firebase->getDatabase();
$fullTree = $db
->getReference('/')
->orderByKey(SORT_DESC)
->getValue(); // Shortcut for ->getSnapshot()->getValue()
print_r($fullTree);
Replace deprecated method call when creating a Google HTTP Client
Replace deprecated method call when creating a Google HTTP Client
Simplify query construction and ensure that the correct variable types are used (previously, a numeric value would be wrapped into a string)
Simplify query construction and ensure that the correct variable types are used (previously, a numeric value would be wrapped into a string)
Fixes a bug that prevented querying by boolean values.
Fixes a bug that prevented querying by boolean values.
Thanks to @waleedazam for finding it!
Enables the usage of egeleon/http-adapter ^1.0 in addition to ^0.8.
Enables the usage of egeleon/http-adapter ^1.0 in addition to ^0.8.
See https://github.com/kreait/firebase-php/blob/0.10.2/doc/authentication.md for the updated authentication method. The previous methods still work.
See https://github.com/kreait/firebase-php/blob/0.10.2/doc/authentication.md for the updated authentication method. The previous methods still work.
$firebase->setAuthOverride($uid, array $claims = []).
Firebase::setAuthOverride(string $uid, array $claims = [])Firebase::removeAuthOverride()Firebase::setAuthToken()Firebase::getAuthToken()Firebase::hasAuthToken()Firebase::removeAuthToken()Added support for authentication with a Google Service account
Added support for authentication with a Google Service account
Deprecated magic callers to allow writing $firebase->foo()
$firebase->foo instead of instead of $firebase->getReference('foo')$firebase->foo()Added magic reference methods, to allow writing $firebase->foo() instead of $firebase->getReference('foo')
Added magic reference methods, to allow writing $firebase->foo() instead of $firebase->getReference('foo')
Guesses the best available HTTP Adapter to use for HTTP connections instead of relying on the fixed Curl adapter.
Fixed a bug where Reference::update() would throw an error with multidimensional data.
Fixed a bug where Reference::update() would throw an error with multidimensional data.
Use Tape Recorder Subscriber for Reference Tests
Use Tape Recorder Subscriber as distinct package instead of relying on the PR branch of the Ivory HTTP Adapter.
Use Tape Recorder Subscriber as distinct package instead of relying on the PR branch of the Ivory HTTP Adapter.
Use TapeRecorder subscriber in HTTP adapter to use fixtures instead of real HTTP requests.
FirebaseException to own namespace.Bugfix: Allow whitespaces in locations
Add ext-mbstring as a requirement in composer.json (this will help the library to work on Heroku)
ext-mbstring as a requirement in composer.json (this will help the library to work on Heroku)Fixed an error where the throw of an exception would throw an exception because of a wrong usage of sprintf()
sprintf()Fixed a case where an exception would be thrown inside an exception when no response was present.
The Firebase library now has its own base URL handling so that a stable version of the HTTP adapter can be used.
The logger output now is less verbose and includes full URLs
Permission errors can now be catched as Kreait\Firebase\Exception\PermissionDeniedException
Permission errors can now be catched as Kreait\Firebase\Exception\PermissionDeniedException
Adds support for "equalTo" queries
Adds support for "equalTo" queries
One column per quarter.