PHPackages                             aranytoth/yii2-onesignal - 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. aranytoth/yii2-onesignal

ActiveYii2-extension

aranytoth/yii2-onesignal
========================

This is composer dependency update based on vasadibt/yii2-onesignal

0495↓100%1PHP

Since Dec 13Pushed 2y agoCompare

[ Source](https://github.com/aranytoth/yii2-onesignal)[ Packagist](https://packagist.org/packages/aranytoth/yii2-onesignal)[ RSS](/packages/aranytoth-yii2-onesignal/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (1)Used By (0)

Yii2 Onesignal api
==================

[](#yii2-onesignal-api)

This is a restful api to onesignal.

[![Total Downloads](https://camo.githubusercontent.com/010fc68aeeee56e572381ce71e86e31b0dd0910de8912d829a4f1f586ad80e97/68747470733a2f2f706f7365722e707567782e6f72672f76617361646962742f796969322d6f6e657369676e616c2f646f776e6c6f616473)](https://packagist.org/packages/vasadibt/yii2-onesignal)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c2d6d0356611891c5edeb35e8c1554e8741d010bc369a202faa1635859f0e726/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f76617361646962742f796969322d6f6e657369676e616c2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/vasadibt/yii2-onesignal/?branch=master)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist vasadibt/yii2-onesignal "dev-master"

```

or add

```
"vasadibt/yii2-onesignal": "dev-master"

```

to the require section of your `composer.json` file.

Config
------

[](#config)

Once the extension is installed, you have to configure the api component:

```
'components' => [
    'onesignal' => [
        'class' => '\vasadibt\onesignal\OneSignal',
        'appId' => 'your-app-id-hash-code',
        'appAuthKey' => 'SetYourAppAuthKey',
        'userAuthKey' => 'SetYourUserAuthKey',
        'enabled' => YII_ENV_PROD ? true : false,
    ],
],
```

Usage
-----

[](#usage)

Call api endpoints:

```
Yii::$app->onesignal->apps->getAll();

Yii::$app->onesignal->devices->getOne('asd-asd-asd-asd-asd-asd');
Yii::$app->onesignal->devices->getAll();

Yii::$app->onesignal->notifications->add([
    'include_player_ids' => ['player-hash-code-12345-123456789'],
    'contents' => ["en" => 'New message'],
]);

Yii::$app->onesignal->notifications->add([
    'included_segments' => ['All'],
    'contents' => ["en" => 'New message'],
]);
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity20

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/8e5c5530a718bfebc2eef2041ac1f94593be657e6d41f4313afb0c3d17001448?d=identicon)[aranytoth](/maintainers/aranytoth)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/aranytoth-yii2-onesignal/health.svg)

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

PHPackages © 2026

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