Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Firebase Php

Firebase Php Laravel Package

kreait/firebase-php

Firebase Admin SDK for PHP by kreait lets you access Firebase services like Auth, Firestore, Realtime Database, Storage, and Cloud Messaging from privileged server or cloud environments. Install with Composer: kreait/firebase-php ^8.0.

View on GitHub
Deep Wiki
Context7

Unofficial Firebase Admin SDK for PHP

Frequently asked questions about Firebase Php
How do I install kreait/firebase-php in a Laravel application?
Install the package with Composer using composer require "kreait/firebase-php:^8.0". Then publish or create a Firebase configuration file and provide your service account credentials through Laravel environment variables so the factory can authenticate. The package is designed to work with Laravel's service container and config system, keeping Firebase services separated from your business logic.
Does kreait/firebase-php support Laravel 10 and PHP 8.x?
The SDK is described as having native Laravel compatibility, using service providers for initialization and dependency injection for testability. It is built for modern PHP and integrates with Laravel's config and environment handling, so Laravel 10 and PHP 8.x are the expected target stack. There are no known incompatibilities listed in the evaluation, but you should still confirm the exact PHP and Laravel constraints in the package's composer.json before upgrading a production app.
Which Firebase services does this SDK support?
The SDK provides privileged server-side access to Firebase Authentication, Firestore, Realtime Database, Storage, and Cloud Messaging. Version 8.6.0 also adds Remote Config experiment value resolution on top of static parameter overrides. It is not a complete replacement for every Firebase product, so features such as Cloud Functions management and Analytics are not covered and should be handled through other tooling.
How should I handle Firebase service account credentials securely in Laravel?
Store the service account JSON or individual credential values in Laravel environment variables and reference them from your Firebase config file, never committing the key material to version control. Keep credentials out of client-side bundles because this is an Admin SDK intended for privileged server or cloud environments. Rotate keys if exposure is suspected, and restrict access to the .env file on each environment.
Can I test Firebase code without a real Firebase project?
Yes, version 8.6.0 adds emulator support so you can exercise Remote Config-adjacent flows, Realtime Database, and Authentication without real credentials or a live Firebase project. Emulator endpoints are just configuration values, so you can set them in phpunit.xml or a test environment file. Be aware that custom token generation for Auth still requires signing credentials, so emulator coverage is broad but not fully credential-free.
Does kreait/firebase-php integrate with Laravel's event dispatcher?
Version 8.5.0 lets the Firebase factory accept a PSR-14 event dispatcher, so Firebase-side domain events such as user changes, token revocation, sent messages, and template publishes can flow into your application's event bus. Because injection happens at the SDK factory layer, you will likely need a thin custom service provider binding to bridge Laravel's Illuminate\Contracts\Events\Dispatcher into Kreait\Firebase\Factory. Treat event payloads and listener signatures as a coupling point in your integration.
Are Firebase event listeners dispatched synchronously, and can I queue them?
Event dispatch is synchronous and in-process, so a slow listener sits directly on the request path for login and push flows. To keep auth and messaging latency flat, route heavy work through queued jobs or Laravel's queue-aware listeners rather than doing expensive work inline. Also watch for changes to event classes, since some may be stable API while others are incidental implementation detail.
How does the SDK handle Firebase rate limits, retries, and error backoff?
The SDK surfaces Firebase API failures as exceptions, but the provided material does not document a built-in retry or backoff policy. In practice you should add retry logic at your application layer or through your HTTP client middleware, and handle quota and rate-limit errors explicitly. Instrument outbound calls so you can see when Firebase throttles your project and adjust batching accordingly.
Is kreait/firebase-php officially maintained, and how often is it updated?
It is an unofficial, community-maintained Firebase Admin SDK for PHP, not an official Google SDK. The project moved from the kreait to the beste GitHub organization in January 2026 while keeping the Kreait\Firebase namespace and the kreait/firebase-php package name, and it is downloaded over a million times monthly. Verify current GitHub activity and issue-resolution velocity before committing, because an unofficial SDK can lag behind Firebase API changes.
What changed in 8.6.0, and is it safe to upgrade?
Version 8.6.0 is additive with no deprecations or breaking changes indicated, so upgrade risk is low. It adds Remote Config experiment value resolution and broadens emulator support for local and CI testing. If you cache Remote Config output, watch the experiment variant-resolution shape separately from static parameter values, since it can change independently and becomes a new coupling point.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib