Releases: kreait/firebase-php
7.24.0
Changed
- Realtime Database references are now validated by the API instead of locally. Validation rules can change at any time, and the SDK can only adapt to changes in the API. While local checks could prevent obviously invalid paths, they'd also require an SDK update whenever Firebase loosens a rule. Developers can be trusted not to use invalid paths 😅.
- Removed the
#[SensitiveParameter]attribute again, because it's supported by PHP 8.1 itself, but not in combination with Valinor. (#1034)
Important
Support the project: This SDK is downloaded 1M+ times monthly and powers thousands of applications.
If it saves you or your team time, please consider sponsoring its development.
7.23.0
Require cuyz/valinor:^2.2.1 for better mapping.
7.22.0
Added
- Added support for PHP 8.5
Changed
- The project now features a custom logo (I came up with it myself, and took the wise decision to not look up if there's something similar already)
- Refined README for improved clarity, removed outdated documentation sections, and streamlined project support messaging with a more positive call to action
- Documentation now uses the modern Furo theme, providing a cleaner and more pleasant reading experience
Important
Support the project: This SDK is downloaded 1M+ times monthly and powers thousands of applications.
If it saves you or your team time, please consider sponsoring its development.
7.21.2
Fixed
- Re-added the
#[SensitiveParameter]attribute because, while it's not supported in PHP 8.1, it can still be used if placed in a standalone line above the variable or property. - Re-added support for JSON files with any file extension
- With the introduction of Valinor, Service Account credentials were required to have more fields than necessary to work with the SDK, although it only needs the client email, private key, and project ID.
7.21.1
Fixes
Removed the #[SensitiveParameter] attribute because it's not supported in PHP 8.1.
7.21.0
7.20.0
-
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\Authinterface without causing a breaking change, a new transitional interface/contract namedKreait\Firebase\Contract\Transitional\FederatedUserFetcherwas 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:
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
- Enable getting a user by their federated IdP UID by @jeromegamez in #1003
- Add and address PHPStan strict rules by @jeromegamez in #1006
- Add previous exceptions to api exceptions by @BackEndTea in #1008
New Contributors
- @BackEndTea made their first contribution in #1008
Full Changelog: 7.19.0...7.20.0
7.19.0
Added
- You can now save on method call by passing a custom Firestore database name to
Kreait\Firebase\Factory::createFirestore($databaseName)instead of having to chain::withFirestoreDatabase($databaseName)->createFirestore() - It is now possible to set live activity tokens in Apns configs.
Kreait\Firebase\Http\HttpClientOptions::withGuzzleMiddleware()andKreait\Firebase\Http\HttpClientOptions::withGuzzleMiddlewares()now accept callable strings, in addition to callables. (#1004)
Deprecated
Kreait\Firebase\Factory::withFirestoreDatabase()
7.18.0
It is now possible to configure multi factor authentication for a user.
7.17.0
FCM Error responses with status code 502 are now caught and converted to ServerUnavailable exceptions.