thanhct / firebase-php
Firebase Admin SDK
3.9.4
2018-02-03 15:17 UTC
Requires
- php: ^7.0
- ext-mbstring: *
- ext-openssl: *
- fig/http-message-util: ^1.1
- google/auth: ^0.11.0|^1.0
- guzzlehttp/guzzle: ^6.2.1
- kreait/firebase-tokens: ^1.1.1
- lcobucci/jwt: ^3.2
- mtdowling/jmespath.php: ^2.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.0
- phpstan/phpstan-phpunit: ^0.9.2
- phpunit/phpunit: ^6.0
This package is not auto-updated.
Last update: 2026-05-30 05:42:38 UTC
README
Interact with Google Firebase from your PHP application.
Quickstart
Full documentation at firebase-php.readthedocs.io.
composer require thanhct/firebase-php 3.9.4
<?php require __DIR__.'/vendor/autoload.php'; use Kreait\Firebase\Factory; use Kreait\Firebase\ServiceAccount; $serviceAccount = ServiceAccount::fromJsonFile(__DIR__.'/google-service-account.json'); $firebase = (new Factory) ->withServiceAccount($serviceAccount) ->withDatabaseUri('https://my-project.firebaseio.com') ->create(); $database = $firebase->getDatabase(); $newPost = $database ->getReference('blog/posts') ->push([ 'title' => 'Post title', 'body' => 'Post body' ]); $newPost->getChild('title')->set('Changed post title'); $newPost->remove();
For errors and missing features, please use the issue tracker.
For general support, join the #php channel at https://firebase.community/.