PHPackages                             elfadl/yii2-firebase-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. elfadl/yii2-firebase-helper

ActiveYii2-extension[API Development](/categories/api)

elfadl/yii2-firebase-helper
===========================

Yii2 Component to connect to Firebase Database

v0.0.3(5y ago)05MITPHPCI failing

Since Jul 23Pushed 5y agoCompare

[ Source](https://github.com/elfadl/yii2-firebase-helper)[ Packagist](https://packagist.org/packages/elfadl/yii2-firebase-helper)[ RSS](/packages/elfadl-yii2-firebase-helper/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (6)Versions (4)Used By (0)

yii2-firebase
=============

[](#yii2-firebase)

[![Latest Stable Version](https://camo.githubusercontent.com/957f76bb2f8935be49fdd78f181657b65332a8d5741637dc2dacef114ff26a01/68747470733a2f2f706f7365722e707567782e6f72672f656c6661646c2f796969322d66697265626173652d68656c7065722f762f737461626c65)](https://packagist.org/packages/elfadl/yii2-firebase-helper)[![Total Downloads](https://camo.githubusercontent.com/3c2379f49b6c957e7c22e0143b8942bf43426a7fbd4bb5c59bff727f6a5c4176/68747470733a2f2f706f7365722e707567782e6f72672f656c6661646c2f796969322d66697265626173652d68656c7065722f646f776e6c6f616473)](https://packagist.org/packages/elfadl/yii2-firebase-helper)[![Latest Unstable Version](https://camo.githubusercontent.com/472d7ef005565c62a21a7085fe3e1182ecc688a557875b6bf687542fb699eb37/68747470733a2f2f706f7365722e707567782e6f72672f656c6661646c2f796969322d66697265626173652d68656c7065722f762f756e737461626c65)](https://packagist.org/packages/elfadl/yii2-firebase-helper)[![License](https://camo.githubusercontent.com/8acc2dc415f896bf251a9c28a83cfb096238830f888cf7ea188dbb6832de9b9e/68747470733a2f2f706f7365722e707567782e6f72672f656c6661646c2f796969322d66697265626173652d68656c7065722f6c6963656e7365)](https://packagist.org/packages/elfadl/yii2-firebase-helper)

This Yii2 component wraps [kreait/firebase-php](https://github.com/kreait/firebase-php/) and allow to easy connect to the Firebase realtime database

Installation
------------

[](#installation)

Preferred way to install is through [Composer](https://getcomposer.org):

```
php composer.phar require elfadl/yii2-firebase-helper
```

Configuration
-------------

[](#configuration)

```
...
'components' => [
    'firebase' => [
        'class'=>'elfadl\Firebase\Firebase',
        'credential_file'=>'service_account.json', // (see https://firebase.google.com/docs/admin/setup#add_firebase_to_your_app)
        'database_uri'=>'https://my-project.firebaseio.com', // (optional)
    ]
...
]
```

### Optional

[](#optional)

to use the autocomplete function of IDE (i.e. Phpstorm) you can optionally replace in the web/index.php the inclusion of Yii.php file and the Application instance:

replace:

```
require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php');
//and
(new yii\web\Application($config))->run();
```

with:

```
require (__DIR__.'/../../vendor/grptx/yii2-firebase/src/yii2/Yii.php');
//and
(new \elfadl\Firebase\web\Application($config))->run();
```

now when you need you can use elfadl\\Firebase\\yii2\\Yii instead of Yii to use autocomplete of your IDE

Usage
-----

[](#usage)

Retrive a *database* ,*reference* and a *value*

```
$database = Yii::$app->firebase->getDatabase();
$reference = $database->getReference('path/to/child/location');
$value = $reference->getValue();
```

or just the *reference* and a *value*

```
$reference = Yii::$app->firebase->getReference('path/to/child/location');
$value = $reference->getValue();
```

for other method see [firebase-php.readthedocs.io.](https://firebase-php.readthedocs.io/en/latest/realtime-database.html)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~8 days

Total

3

Last Release

2103d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9e32ddd102b23f1f32da55f76be2989e4811becdbed05e44a4278b5d41d37f53?d=identicon)[kamal.elfadl](/maintainers/kamal.elfadl)

---

Top Contributors

[![elfadl](https://avatars.githubusercontent.com/u/15197158?v=4)](https://github.com/elfadl "elfadl (7 commits)")

---

Tags

firebaseyii2PHP7yii2-components

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/elfadl-yii2-firebase-helper/health.svg)

```
[![Health](https://phpackages.com/badges/elfadl-yii2-firebase-helper/health.svg)](https://phpackages.com/packages/elfadl-yii2-firebase-helper)
```

###  Alternatives

[grptx/yii2-firebase

Yii2 Component to connect to Firebase Database

1419.9k](/packages/grptx-yii2-firebase)[dotzero/yii2-amocrm

Расширение для Yii Framework 2 реализующее клиент для работы с API amoCRM

1639.7k](/packages/dotzero-yii2-amocrm)[conquer/services

Yii2 soap wsdl web services

1632.5k](/packages/conquer-services)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1243.1k1](/packages/skeeks-yii2-google-api)[apexwire/yii2-restclient

Tools to use API as ActiveRecord for Yii2

143.5k](/packages/apexwire-yii2-restclient)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
