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. [HTTP &amp; Networking](/categories/http)
4. /
5. alkurn/yii2-fcm

ActiveYii2-extension[HTTP &amp; Networking](/categories/http)

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

Yii2 Firebase Cloud Messaging adapter

0431PHP

Since Jun 24Pushed 7y 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 2w ago

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 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

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)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.6k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69122.6k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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