PHPackages                             kampernet/action-chain - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. kampernet/action-chain

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kampernet/action-chain
======================

Action chain helper classes for implementing commands

1.0.2(5y ago)01.1k1PHP

Since Jun 11Pushed 3y ago1 watchersCompare

[ Source](https://github.com/kampernet/action-chain)[ Packagist](https://packagist.org/packages/kampernet/action-chain)[ RSS](/packages/kampernet-action-chain/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

Kampernet Actions
-----------------

[](#kampernet-actions)

This is a simple, dependency free implementation of the Command Pattern in PHP. Useful for creating an orchestration layer

#### Usage

[](#usage)

This will create a group of Commands with a certain name.

```
    class RegisterAction extends ActionChain {

        public function __construct() {
            $this->add(new RegisterUserAction());
            $this->add(new SendWelcomeEmailAction());
        }

    }

```

These are the individual command examples

```
    class RegisterUserAction extends Command {

        private $request;
        private $response;

        public function execute($request, $response = null) {

            $this->request = $request;
            $this->response = $response;

            // eg: code to take the request data and persist the user
            // probably more likely to call a service or domain model method here.
        }

        public function undo() {

            // eg: code to "undo" anything this command would have done
        }
    }

```

Once your commands are built, you can just call them from the routes: ( example using Symfony's Request )

```
    Route::get('/register', function() {

        $response = new Response();
        $reg = new RegisterAction();
        if (!$reg->execute(Request::createFromGlobals(), $response)) {
            $reg->undo();
        }

        return $response;
    });

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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

Every ~1218 days

Total

3

Last Release

1922d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/af48ac5eb75fe2889c4c62d521e9a6b0eac1946414af8a2f692d1fdcfbf1888b?d=identicon)[kampernet](/maintainers/kampernet)

---

Top Contributors

[![kampernet](https://avatars.githubusercontent.com/u/2286714?v=4)](https://github.com/kampernet "kampernet (3 commits)")

### Embed Badge

![Health badge](/badges/kampernet-action-chain/health.svg)

```
[![Health](https://phpackages.com/badges/kampernet-action-chain/health.svg)](https://phpackages.com/packages/kampernet-action-chain)
```

###  Alternatives

[thanks-to-it/wp-dich

121.1k](/packages/thanks-to-it-wp-dich)

PHPackages © 2026

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