Download Latest Version 7.21.1 source code.tar.gz (94.1 kB)
Email in envelope

Get an email when there's a new version of Firebase Admin PHP SDK

Home / 7.20.0
Name Modified Size InfoDownloads / Week
Parent folder
7.20.0 source code.tar.gz 2025-07-17 92.0 kB
7.20.0 source code.zip 2025-07-17 206.9 kB
README.md 2025-07-17 2.3 kB
Totals: 3 Items   301.2 kB 1
  • You can now get a user by their federated identity provider (e.g. Google, Facebook, etc.) UID with Kreait\Firebase\Auth::getUserByProviderUid(). (#1000).

Since this method couldn't be added to the Kreait\Firebase\Contract\Auth interface without causing a breaking change, a new transitional interface/contract named Kreait\Firebase\Contract\Transitional\FederatedUserFetcher was added. This interface will be removed in the next major version of the SDK.

There are several ways to check if you can use the getUserByProviderUid() method:

:::php
use Kreait\Firebase\Contract\Transitional\FederatedUserFetcher;
use Kreait\Firebase\Factory;

$auth = (new Factory())->createAuth();
// The return type is Kreait\Firebase\Contract\Auth, which doesn't have the method

if (method_exists($auth, 'getUserByProviderUid')) {
    $user = $auth->getUserByProviderUid('google.com', 'google-uid');
}

if ($auth instanceof \Kreait\Firebase\Auth) { // This is the implementation, not the interface
    $user = $auth->getUserByProviderUid('google.com', 'google-uid');
}

if ($auth instanceof FederatedUserFetcher) {
    $user = $auth->getUserByProviderUid('google.com', 'google-uid');
}
  • The new method Kreait\Firebase\Factory::withDefaultCache() allows you to set a default cache implementation for the SDK. This is useful if you want to use one cache implementation for all components that support caching. (Documentation)

Deprecated

  • Kreait\Firebase\Factory::getDebugInfo

What's Changed

New Contributors

Full Changelog: https://github.com/kreait/firebase-php/compare/7.19.0...7.20.0

Source: README.md, updated 2025-07-17