PHPackages                             futuredialog/pushworkers - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. futuredialog/pushworkers

ActiveLibrary[Queues &amp; Workers](/categories/queues)

futuredialog/pushworkers
========================

Push workers

0109PHP

Since Dec 6Pushed 5y ago2 watchersCompare

[ Source](https://github.com/FutureDialog/workers)[ Packagist](https://packagist.org/packages/futuredialog/pushworkers)[ RSS](/packages/futuredialog-pushworkers/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

FutureDialog Worker
===================

[](#futuredialog-worker)

Pipes
-----

[](#pipes)

- push\_android

    Android push notifications
- push\_ios

    Ios APNS push notifications
- push\_win

    Win WNS push notifications
- key\_ios

    Pem keys for APNS

Push Notifications
------------------

[](#push-notifications)

**Send**

```
$data = [
    'apiKey' => '',
    'recipients' => [
    ],
    'notification' => [
        'title' => '',
        'body' => '',
    ],
    'payload' => [
    ],
    'onFail' => 'fail_tube',
    'onSuccess' => 'success_tube',
    'onComplete' => 'complete_tube'
];

```

- apiKey

    *required | string or array(for WNS only)*

    FCM Api key or APNS Key name

    **For WNS apiKey must be and array:**

    ```
      $apiKey = [
          'client_id' => '',
          'client_sectet' => ''
      ]

    ```
- recipients

    *required | array*

    Array of recipients.

    Array of device tokens: Ex:

    ```
      [
          'devide_token',
          'devide_token',
          'devide_token',
          ...
      ];

    ```

    Or array of recipients with your optional data. Data will be returned in callback pipe as is.

    ```
      [
          [
              'token' => 'devide_token', // Required property
              // Your optional data you want to receive with callback
              'recipient_id' => '1',
              'recipient_data' => '[],
              ...
          ],
          [
              'token' => 'devide_token', // Required property
              // Your optional data you want to receive with callback
              'recipient_id' => '2',
              'recipient_data' => '[],
              ...
          ],
          ...
      ];

    ```
- notification

    - title

        *required | string*

        Title of the push notification
    - body

        *required | string*

        Body of the push notification
    - icon

        *optional | string | Android only*

        The name of your drawable resource as string
    - color

        *optional | string | in #rrggbb format | Android only*

        Background color of the notification icon when showing details on notifications
    - badge

        *optional | int*

        Add number of notifications to your apps icon
    - sound

        *optional | string | IOS only*

        Set the sound to play.
    - type

        *required for WNS only | string*

        One of the following:

        - raw
        - badge
        - tile | toast
- payload

    *optional | array*

    Data that will be send with push notification
- onFail

    *optional | string*

    Pipe to notify failed jobs.

    Response example for array of recipient's tokens:

    ```
      {
          "job_id":31,
          "time":1498549975,
          "count":1,
          "data":[
              {
                  "token":"device_token",
                  "status":false,
                  "error":"NotRegistered"
              }
          ]
      }

    ```

    Response example for array of recipients:

    ```
          {
              "job_id":42,
              "time":1498550263,
              "count":1,
              "data":[
                  {
                      "token":"0a39ae8b1d2c933fec9d8cb8dfb672905a275f0b7bc0ce6035829da3a72a2c03",
                      "status":false,
                      "error":"Error info",
                      // your optional data goes here
                      'recipient_id' => '1',
                      'recipient_data' => '[],
                  }
              ]
          }

    ```
- onSuccess

    *optional | string*

    Pipe to notify successfull jobs

    Response example for array of recipient's tokens:

    ```
      {
          "job_id":31,
          "time":1498549975,
          "count":1,
          "data":[
              {
                  "token":"device_token",
                  "status":true
              }
          ]
      }

    ```

    Response example for array of recipients:

    ```
          {
              "job_id":42,
              "time":1498550263,
              "count":1,
              "data":[
                  {
                      "token":"device_token",
                      "status":true
                      // your optional data goes here
                      'recipient_id' => '1',
                      'recipient_data' => '[],
                  }
              ]
          }

    ```
- onComplete

    *optional | string*

    Pipe to notify completed jobs

    Response example for array of recipient's tokens:

    ```
      {
          "job_id":31,
          "time":1498549975,
          "success":1,
          "failure":1,
          "data":[
              {
                  "token":"device_token",
                  "status":true
              },
              {
                  "token":"device_token",
                  "status":false,
                  "error":"NotRegistered"
              }
          ]
      }

    ```

    Response example for array of recipients:

    ```
      {
          "job_id":42,
          "time":1498550263,
          "success":1,
          "failure":1,
          "data":[
              {
                  "token":"device_token",
                  "status":true
                  // your optional data goes here
                  'recipient_id' => '1',
                  'recipient_data' => '[],
              },
              {
                  "token":"device_token",
                  "status":false,
                  "error":"Error info"
                  // your optional data goes here
                  'recipient_id' => '1',
                  'recipient_data' => '[],
              }
          ]
      }

    ```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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/4fa58adbd773781ebfd1b9ca220d93a245d549c5e3611b6a1ee7f31acb4d0eaf?d=identicon)[futuredialog](/maintainers/futuredialog)

---

Top Contributors

[![Rimato](https://avatars.githubusercontent.com/u/4750180?v=4)](https://github.com/Rimato "Rimato (8 commits)")[![apianykh](https://avatars.githubusercontent.com/u/11498578?v=4)](https://github.com/apianykh "apianykh (1 commits)")

### Embed Badge

![Health badge](/badges/futuredialog-pushworkers/health.svg)

```
[![Health](https://phpackages.com/badges/futuredialog-pushworkers/health.svg)](https://phpackages.com/packages/futuredialog-pushworkers)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[amphp/parser

A generator parser to make streaming parsers simple.

14952.8M16](/packages/amphp-parser)[amphp/serialization

Serialization tools for IPC and data storage in PHP.

13451.1M18](/packages/amphp-serialization)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2238.8M171](/packages/react-async)

PHPackages © 2026

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