PHPackages                             dcousineau/phorever - 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. dcousineau/phorever

ActiveLibrary

dcousineau/phorever
===================

Role-based process and daemon management for PHP

v0.1.0(13y ago)4382[1 issues](https://github.com/dcousineau/phorever/issues)MITPHPPHP &gt;=5.3.3

Since Apr 10Pushed 13y ago1 watchersCompare

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

READMEChangelogDependencies (4)Versions (2)Used By (0)

Phorever
========

[](#phorever)

Role-based long-running process daemon for PHP projects!

Overview &amp; Goals
--------------------

[](#overview--goals)

Phorever provides an easy way to launch and manage background processes based on configuration defined in a `phorever.json` file in your project's root directory.

Phorever will automatically keep track of all running processes, respawning them based on configured behavior, and fire notifications on aberrant behavior.

Phorever is installable via [Composer](http://getcomposer.org/) and automatically drops a binary to interact with.

Phorever's ultimate goal is to make provisioning servers and monitoring long-running processes more idiot proof. For example, a simple `phorever start scheduler` will ensure all background processes required for a scheduler server are running.

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

[](#installation)

Phorever is provided as a [composer package](http://getcomposer.org/) and requires PHP 5.4 and up. To use Phorever, simply add:

```
{
    "require": {
        "dcousineau/phorever": "dev-master"
    }
}
```

Composer will attempt to symlink the Phorever executable into your own bin folder. It is advisable that you make sure your own `composer.json` file is updated to define where that bin directory is located:

```
{
    "config": {
        "bin-dir": "bin"
    }
}
```

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

[](#configuration)

Phorever by default reads from a configuration file found in your project root named `phorever.json`.

This configuration file defines the individual processes that should be launched and tracked, what roles they belong to, where log files should be dumped, among other things.

An example configuration file would look like:

```
{
    "pidfile": "./phorever_cool.pid",
    "timezone": "America/Chicago",
    "logging": {
        "directory": "./logs/"
    },
    "processes": [
        {
            "name": "Long Lived",
            "roles": ["roleb"],

            "up": "./tests/commands/longlived",

            "log_forwarding": true
        },
        {
            "name": "Short Lived",
            "roles": ["rolea"],

            "up": "./tests/commands/shortlived",

            "resurrect_after": 10,

            "clones": 2,

            "log_forwarding": true
        },
        {
            "name": "Runaway",
            "roles": ["runaway"],

            "up": "./tests/commands/runaway",

            "resurrect_after": 1,

            "log_forwarding": true
        }
    ]
}
```

Running the command `bin/phorever start rolea roleb` will launch both the "Short Lived" and "Long Lived" processes given they both belong to at least one of the roles we've requested to start.

Passing the `--daemon` parameter to Phorever will cause it to fork into the background.

Project Status
--------------

[](#project-status)

The project is currently in an MVP state after some exploratory coding. Currently it launches processes based on requested role and respawns processes after a resurrection wait time.

**Currently *not* supported, but desperately needed before BETA1:**

- Processes that daemonize themselves (cannot check custom PIDs)
- Giving up after certain thresholds
- Notification on aberrant behavior

**Features to come:**

- Configure respawn and notification behavior
- Hooks for your own custom event listener classes for more fine-grained control
- Status monitor and statistical logs

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4779d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/15243dc8c12f7a994eef470750a2d6c2491c7a9ac8636f62de0f0a93364129aa?d=identicon)[dcousineau](/maintainers/dcousineau)

---

Top Contributors

[![dcousineau](https://avatars.githubusercontent.com/u/30331?v=4)](https://github.com/dcousineau "dcousineau (32 commits)")

---

Tags

processdaemon

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dcousineau-phorever/health.svg)

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[silverstripe/framework

The SilverStripe framework

7213.5M2.5k](/packages/silverstripe-framework)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

53541.0k3](/packages/jolicode-castor)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

81733.7k](/packages/flow-php-flow)

PHPackages © 2026

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