PHPackages                             alkurn/yii2-fcm - 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. alkurn/yii2-fcm

ActiveYii2-extension

alkurn/yii2-fcm
===============

Yii2 Firebase Cloud Messaging adapter

0430PHP

Since Jun 24Pushed 6y ago1 watchersCompare

[ Source](https://github.com/alkurn/yii2-fcm)[ Packagist](https://packagist.org/packages/alkurn/yii2-fcm)[ RSS](/packages/alkurn-yii2-fcm/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 Firebase Cloud Messaging
=============================

[](#yii2-firebase-cloud-messaging)

This component wraps [paragraph1/php-fcm](https://packagist.org/packages/paragraph1/php-fcm) library.

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

[](#installation)

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

```
$ composer require alkurn/yii2-fcm:~0.1 --prefer-dist
```

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

[](#configuration)

Add component to your application config:

```
...
'components' => [
    'fcm' => [
        'class' => 'alkurn\fcm\Fcm',
        'apiKey' => 'your API key', // Server API Key (you can get it here: https://firebase.google.com/docs/server/setup#prerequisites)
    ],
],
...
```

Usage
-----

[](#usage)

You can find more usage examples [here](https://packagist.org/packages/paragraph1/php-fcm).

```
$note = Yii::$app->fcm->createNotification("title", "body");
$note->setIcon('icon')
    ->setColor('#ffffff')
    ->setBadge(1);

$message = Yii::$app->fcm->createMessage();
$message->addRecipient(new Device('your-device-token'));
$message->setNotification($note)
    ->setData(['someId' => 111]);

$response = Yii::$app->fcm->send($message);
var_dump($response->getStatusCode());
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/485ae3b1c7496e2d8d100c7c12274e3e7d490afc132ef1b3a2b2a30f10727e1e?d=identicon)[gmankar](/maintainers/gmankar)

---

Top Contributors

[![TechAlkurn](https://avatars.githubusercontent.com/u/56467158?v=4)](https://github.com/TechAlkurn "TechAlkurn (2 commits)")

### Embed Badge

![Health badge](/badges/alkurn-yii2-fcm/health.svg)

```
[![Health](https://phpackages.com/badges/alkurn-yii2-fcm/health.svg)](https://phpackages.com/packages/alkurn-yii2-fcm)
```

PHPackages © 2026

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