A Symfony Bundle for the Firebase PHP Admin SDK
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
DependencyInjection Fix deprecated root node Feb 8, 2019
Resources/config Rewrite with support for the latest PHP SDK Apr 6, 2018
Tests Specify credentials for all definitions Apr 7, 2018
.editorconfig Rewrite with support for the latest PHP SDK Apr 6, 2018
.gitattributes Rewrite with support for the latest PHP SDK Apr 6, 2018
.gitignore Rewrite with support for the latest PHP SDK Apr 6, 2018
.php_cs Rewrite with support for the latest PHP SDK Apr 6, 2018
.travis.yml Release 1.1.0 Apr 7, 2018
CHANGELOG.md Release 1.2.0 Feb 8, 2019
CODE_OF_CONDUCT.md Rewrite with support for the latest PHP SDK Apr 6, 2018
FirebaseBundle.php Rewrite with support for the latest PHP SDK Apr 6, 2018
LICENSE Rewrite with support for the latest PHP SDK Apr 6, 2018
Makefile Rewrite with support for the latest PHP SDK Apr 6, 2018
README.md
composer.json
phpunit.xml.dist Rewrite with support for the latest PHP SDK Apr 6, 2018

README.md

Firebase SDK Bundle

A Symfony Bundle for the Firebase PHP SDK.

Current version Build Status GitHub license Total Downloads Gitter


Installation

Add the bundle using Composer

composer require kreait/firebase-bundle ^1.0
// Symfony without Flex
// in %kernel.root_dir%/AppKernel.php
$bundles = array(
    // ...
    new Kreait\Firebase\Symfony\Bundle\FirebaseBundle(),
);

// Symfony with Flex
// in config/bundles.php
return [
    // ...
    Kreait\Firebase\Symfony\Bundle\FirebaseBundle::class => ['all' => true],
];

Configuration

# app/config/config.yml (Symfony without Flex)
# config/packages/firebase.yaml (Symfony with Flex)
kreait_firebase:
    projects:
        # You can access your firebase project with
        # $container->get('kreait_firebase.first')
        first:
            # Optional: If set to false, the service and its alias
            # can only be used via dependency injection
            public: true
            # Optional: If set to true, this project is used when
            # using Kreait\Firebase as a type hint for dependency injection
            default: false
            # Optional: Path to the projects Service Account credentials file
            # If omitted, the library will try to discover it.
            credentials: '%kernel.project_dir%/config/service_account_credentials.json'
            # You can find the database URI at 
            # https://console.firebase.google.com/project/first/database/data
            database_uri: 'https://my-project.firebaseio.com'
            # Optional: If set, you can access your project with
            # $container->get('firebase') 
            alias: 'firebase'
        second: # $container->get('kreait_firebase.second')
            database_uri: 'https://second.firebaseio.com'
        third: # $container->get('kreait_firebase.third')
            ...
        

Support

For bug reports and feature requests, use the issue tracker.

For help with and discussion about the PHP SDK and Bundle, join the Gitter Channel dedicated to this library.

For questions about Firebase in general, use Stack Overflow or join the Firebase Slack Community.