kreait/firebase-bundle
Symfony bundle integrating the Firebase Admin PHP SDK. Configure service accounts and access Firebase services (Auth, Firestore/Database, Messaging, Storage) via Symfony’s DI and configuration, with support for modern Symfony setups (Flex or manual).
kreait/firebase-php 8.xkreait/firebase-php 8.xhttp_client_options service configurationKreait\Firebase\FactoryIf you previously used http_request_logger or http_request_debug_logger,
migrate to a Kreait\Firebase\Http\HttpClientOptions service and wire your logging through Guzzle middleware.
# config/services.yaml
services:
App\Firebase\HttpClientOptionsFactory: ~
app.firebase.http_client_options:
class: Kreait\Firebase\Http\HttpClientOptions
factory: ['[@App](https://github.com/App)\Firebase\HttpClientOptionsFactory', 'create']
<?php
namespace App\Firebase;
use Kreait\Firebase\Http\HttpClientOptions;
final class HttpClientOptionsFactory
{
public function __construct(private readonly LoggingMiddleware $loggingMiddleware)
{
}
public function create(): HttpClientOptions
{
return HttpClientOptions::default()
->withGuzzleMiddleware($this->loggingMiddleware);
}
}
# config/packages/firebase.yaml
kreait_firebase:
projects:
my_project:
http_client_options: 'app.firebase.http_client_options'
If you customized bundle internals with compiler passes or direct container lookups:
Kreait\Firebase\Factory is no longer registered as a container service.kreait_firebase.<project>.project_factory) instead of using only Kreait\Firebase\Symfony\Bundle\DependencyInjection\Factory\ProjectFactory.If your app modified the ProjectFactory definition directly, update your code to target the per-project service id(s).
Added support for PHP 8.5 and Symfony 8 (#74)
Make services lazy to instantiate them only when they are actually used (#66)
Added support for PHP 8.4 (#64)
Added the ability to override the project id (#63)
Added Support for overriding the ProjectFactory (#60)
Added Support for AppCheck (#54)
Actually support Symfony 7 (#53)
Added support for PHP 8.3 and Symfony 7 (#52)
kreait/firebase-php from 6.x to 7.xThis is a release with breaking changes. Please review the following changes and adapt your application where needed.
kreait/firebase-php ^6.0kreait/firebase-php <6.0Kreait\Firebase\Contract\* interfaces, not the Kreait\Firebase\* implementationsIf you or your team rely on this project and me maintaining it, please consider becoming a Sponsor 🙏
Added support for caching the authentication tokens used for connecting to the Firebase servers.
Enable it in your config file:
# app/config/config.yml (Symfony without Flex)
# config/packages/firebase.yaml (Symfony with Flex)
kreait_firebase:
projects:
my_project:
# ...
auth_token_cache: app.cache
If you or your team rely on this project and me maintaining it, please consider becoming a Sponsor 🙏
Added support for caching the authentication tokens used for connecting to the Firebase servers.
Enable it in your config file:
# app/config/config.yml (Symfony without Flex)
# config/packages/firebase.yaml (Symfony with Flex)
kreait_firebase:
projects:
my_project:
# ...
auth_token_cache: app.cache
If you or your team rely on this project and me maintaining it, please consider becoming a Sponsor 🙏
Fixed service alias deprecation when used with Symfony 4.4 (#38)
If you or your team rely on this project and me maintaining it, please consider becoming a Sponsor 🙏
Kreait\Firebase\Contract\*) available via dependency injection."kreait/firebase-php": "^5.25.0"If you or your team rely on this project and me maintaining it, please consider becoming a Sponsor 🙏
psr/cache and psr/simple-cache as direct dependencies.symfony/cache dependency to address CVE.tenant_id to make a project tenant aware. (#31)PHP ^8.0 is now an allowed (but untested) PHP version
It is now possible to log HTTP requests and responses to the Firebase APIs by specifying a logger's service ID. You can do so by setting http_request_logger and http_request_debug_logger with the service ID of an already configured logger, e.g. monolog.logger.
^5.5 of the Firebase Admin SDK.master to main - if you're using dev-master as a version constraint in your composer.json, please update it to dev-main.If you are not using any classes or methods marked as [@deprecated](https://github.com/deprecated) or [@internal](https://github.com/internal) you should be able to upgrade from a 1.x release to 2.0 without changes to your code.
kreait/firebase-php to ^5.0symfony/cache to address CVE-2019-10912Service Account credentials can now be provided as an array (#20)
^3.4|^4.2|^5.0Added support for Symfony 5.x
Upgraded symfony/dependency-injection to avoid CVE-2019-10910
Kreait\Firebase class is deprecated, please use the individual components instead.Kreait\Firebase service is deprecated, please also use the individual components instead.How can I help you explore Laravel packages today?