PHPackages                             zenaton/zenaton-php - 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. zenaton/zenaton-php

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

zenaton/zenaton-php
===================

Zenaton PHP library

0.6.1(6y ago)3243.7k21Apache-2.0PHPPHP &gt;=5.6.0

Since Nov 30Pushed 5y ago2 watchersCompare

[ Source](https://github.com/zenaton/zenaton-php)[ Packagist](https://packagist.org/packages/zenaton/zenaton-php)[ Docs](https://zenaton.com)[ RSS](/packages/zenaton-zenaton-php/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (5)Versions (19)Used By (1)

> ⚠️ This repository is abandoned.

 [ ![](https://user-images.githubusercontent.com/36400935/58254828-e5176880-7d6b-11e9-9094-3f46d91faeee.png) ](https://zenaton.com)
 Easy Asynchronous Jobs Manager for Developers
 [  **Explore the docs »**  ](https://zenaton.com/documentation/php/getting-started/)
 [ Website ](https://zenaton.com) · [ Examples in PHP ](https://github.com/zenaton/examples-php) · [ Tutorial in PHP ](https://app.zenaton.com/tutorial/php)

 [![Packagist](https://camo.githubusercontent.com/d22e8c44443b664ed9a1ae147a04096f6d591e279ed196e2812946434d36ec34/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a656e61746f6e2f7a656e61746f6e2d7068702e737667)](https://packagist.org/packages/zenaton/zenaton-php) [![CircleCI](https://camo.githubusercontent.com/0a4ad887e0381be7bbdbb222f61d6c9782bf35bb9dc83d9a1cc4995e08c35afb/68747470733a2f2f696d672e736869656c64732e696f2f636972636c6563692f70726f6a6563742f6769746875622f7a656e61746f6e2f7a656e61746f6e2d7068702f6d61737465722e737667)](https://circleci.com/gh/zenaton/zenaton-php/tree/master) [![License](https://camo.githubusercontent.com/a549a7a30bacba7bfceebdc207a8e86c3f2c02995a2527640dca30048fd2b64e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d417061636865253230322e302d626c75652e737667)](/LICENSE)

Zenaton library for PHP
=======================

[](#zenaton-library-for-php)

[Zenaton](https://zenaton.com) helps developers to easily run, monitor and orchestrate background jobs on your workers without managing a queuing system. In addition to this, a monitoring dashboard shows you in real-time tasks executions and helps you to handle errors.

The Zenaton library for PHP lets you code and launch tasks using Zenaton platform, as well as write workflows as code. You can sign up for an account on [Zenaton](https://zenaton.com) and go through the [tutorial in PHP](https://app.zenaton.com/tutorial/php).

PHP Documentation
-----------------

[](#php-documentation)

You can find all details on [Zenaton's website](https://zenaton.com/documentation/php/getting-started#introduction).

 **Table of contents**- [Getting started](#getting-started)
    - [Installation](#installation)
        - [Install the Zenaton Agent](#install-the-zenaton-agent)
        - [Install the library](#install-the-library)
        - [Framework integration](#framework-integration)
    - [Quick start](#quick-start)
        - [Client Initialization](#client-initialization)
        - [Executing a background job](#executing-a-background-job)
    - [Orchestrating background jobs](#orchestrating-background-jobs)
        - [Using workflows](#using-workflows)
- [Getting help](#getting-help)

Getting started
---------------

[](#getting-started)

### Installation

[](#installation)

#### Install the Zenaton Agent

[](#install-the-zenaton-agent)

To install the Zenaton agent, run the following command:

```
curl https://install.zenaton.com/ | sh
```

Then, you need your agent to listen to your application. To do this, you need your **Application ID** and **API Token**. You can find both on [your Zenaton account](https://app.zenaton.com/api).

```
zenaton listen --app_id=YourApplicationId --api_token=YourApiToken --app_env=YourApplicationEnv
```

#### Install the library

[](#install-the-library)

To add the latest version of the library to your project, run the following command:

```
composer require zenaton/zenaton-php
```

#### Framework integration

[](#framework-integration)

If you are using **Laravel** or **Symfony**, please refer to our dedicated documentation to get started:

- [Getting started with Laravel](https://zenaton.com/documentation/php/agents#laravel)
- [Getting started with Symfony](https://zenaton.com/documentation/php/agents#symfony)

### Quick start

[](#quick-start)

#### Client Initialization

[](#client-initialization)

To start, you need to initialize the client. To do this, you need your **Application ID** and **API Token**. You can find both on [your Zenaton account](https://app.zenaton.com/api).

Then, initialize your Zenaton client:

```
Zenaton\Client::init('YourApplicationId', 'YourApiToken', 'YourApplicationEnv');
```

#### Executing a background job

[](#executing-a-background-job)

A background job in Zenaton is a class implementing the `Zenaton\Interfaces\TaskInterface` interface.

Let's start by implementing a first task printing something, and returning a value:

```
use Zenaton\Interfaces\TaskInterface;
use Zenaton\Traits\Zenatonable;

class HelloWorldTask implements TaskInterface
{
    public function handle()
    {
        echo "Hello World\n";

        return mt_rand(0, 1);
    }
}
```

Now, when you want to run this task as a background job, you need to do the following:

```
(new HelloWorldTask())->dispatch();
```

That's all you need to get started. With this, you can run many background jobs. However, the real power of Zenaton is to be able to orchestrate these jobs. The next section will introduce you to job orchestration.

### Orchestrating background jobs

[](#orchestrating-background-jobs)

Job orchestration is what allows you to write complex business workflows in a simple way. You can execute jobs sequentially, in parallel, conditionally based on the result of a previous job, and you can even use loops to repeat some tasks.

We wrote about some use-cases of job orchestration, you can take a look at [these articles](https://medium.com/zenaton/tagged/php)to see how people use job orchestration.

#### Using workflows

[](#using-workflows)

A workflow in Zenaton is a class implementing the `Zenaton\Interfaces\WorkflowInterface` interface.

We will implement a very simple workflow:

First, it will execute the `HelloWorld` task. The result of the first task will be used to make a condition using an `if` statement. When the returned value will be greater than `0`, we will execute a second task named `FinalTask`. Otherwise, we won't do anything else.

One important thing to remember is that your workflow implementation **must** be idempotent. You can read more about that in our [documentation](https://zenaton.com/documentation/php/workflow-basics/#implementation).

The implementation looks like this:

```
use Zenaton\Interfaces\WorkflowInterface;
use Zenaton\Traits\Zenatonable;

class MyFirstWorkflow implements WorkflowInterface
{
    use Zenatonable;

    public function handle()
    {
        $n = (new HelloWorldTask())->execute();
        if ($n > 0) {
            (new FinalTask())->execute();
        }
    }
}
```

Now that your workflow is implemented, you can execute it by calling the `dispatch` method:

```
(new MyFirstWorkflow())->dispatch();
```

If you really want to run this example, you will need to implement the `FinalTask` task.

There are many more features usable in workflows in order to get the orchestration done right. You can learn more in our [documentation](https://zenaton.com/documentation/php/workflow-basics/#implementation).

Getting help
------------

[](#getting-help)

**Need help**? Feel free to contact us by chat on [Zenaton](https://zenaton.com/).

**Found a bug?** You can open a [GitHub issue](https://github.com/zenaton/zenaton-php/issues).

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 74% 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 ~41 days

Recently: every ~16 days

Total

18

Last Release

2388d ago

PHP version history (2 changes)0.1.0PHP &gt;=5.4.0

0.2.3PHP &gt;=5.6.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/816759161d5d06741530f9445a548cd1a55a2cd923286e51d0399c5775252f91?d=identicon)[zenaton](/maintainers/zenaton)

---

Top Contributors

[![pylebecq](https://avatars.githubusercontent.com/u/351471?v=4)](https://github.com/pylebecq "pylebecq (151 commits)")[![Ciboulette](https://avatars.githubusercontent.com/u/18526471?v=4)](https://github.com/Ciboulette "Ciboulette (51 commits)")[![LouisGraffeuil](https://avatars.githubusercontent.com/u/36400935?v=4)](https://github.com/LouisGraffeuil "LouisGraffeuil (1 commits)")[![MrYawe](https://avatars.githubusercontent.com/u/8686039?v=4)](https://github.com/MrYawe "MrYawe (1 commits)")

---

Tags

automationbackground-jobslaravelorchestrationphpprocessqueuequeuingsymfonyworkflowworkflow-enginejobsworkflow enginequeuesworkflowsorchestrationbackground-jobsevent-driven architecturequeuing systemsorchestration enginehosted queuesasynchronous tasks

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zenaton-zenaton-php/health.svg)

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

###  Alternatives

[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

254255.2k6](/packages/croustibat-filament-jobs-monitor)[dereuromark/cakephp-queue

The Queue plugin for CakePHP provides deferred task execution.

308850.3k14](/packages/dereuromark-cakephp-queue)[stackkit/laravel-google-cloud-tasks-queue

Google Cloud Tasks queue driver for Laravel

84570.1k](/packages/stackkit-laravel-google-cloud-tasks-queue)[symbiote/silverstripe-queuedjobs

A framework for defining and running background jobs in a queued manner

56854.2k83](/packages/symbiote-silverstripe-queuedjobs)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

3786.5k](/packages/harris21-laravel-fuse)[enqueue/job-queue

Job Queue

34390.8k6](/packages/enqueue-job-queue)

PHPackages © 2026

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