PHPackages                             guennichi/performist - 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. guennichi/performist

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

guennichi/performist
====================

Lightweight PHP library to perform a group of actions elegantly

v2.1.0(5y ago)2811MITPHP &gt;=7.4

Since Feb 7Compare

[ Source](https://github.com/mradhi/performist)[ Packagist](https://packagist.org/packages/guennichi/performist)[ Docs](https://guennichi.com)[ RSS](/packages/guennichi-performist/feed)WikiDiscussions Synced today

READMEChangelog (8)Dependencies (2)Versions (9)Used By (1)

Performist
==========

[](#performist)

[![Build Status](https://camo.githubusercontent.com/089766990801919f45e19085d05d7dbc7675fc7d95c115642bcf8ae5d7757992/68747470733a2f2f7777772e7472617669732d63692e636f6d2f6d72616468692f706572666f726d6973742e7376673f6272616e63683d6d61696e)](https://www.travis-ci.com/mradhi/performist)[![Coverage Status](https://camo.githubusercontent.com/388774e73eb7dd9d1d568be995c6cd55b21cf7d9f54df1efad17bd4d25251c4f/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d72616468692f706572666f726d6973742f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/mradhi/performist?branch=main)

Lightweight synchronous action performer library without dependencies.

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

[](#installation)

```
composer require guennichi/performist
```

Usage
-----

[](#usage)

### Action Performer

[](#action-performer)

```
class RegisterUser
{
    protected string $username;
    protected string $password;

    public function __construct(string $username, string $password)
    {
        $this->username = $username;
        $this->password = $password;
    }

   public  function getUsername(): string
   {
        return $this->username;
   }

   public  function getPassword(): string
   {
        return $this->password;
   }
}

class RegisterUserHandler implements \Guennichi\Performist\HandlerInterface
{
    // Inject DB and other services here...

    public function __invoke(RegisterUser $action)
    {
        $user = new User($action->getUsername(), $action->getPassword());

        // Encode password

        $this->repository->add($user);

        // Send email notification etc...

        return $user;
    }
}

// Register actions/handlers
$registry = new \Guennichi\Performist\Registry();
$registry->add(RegisterUser::class, new RegisterUserHandler());
$registry->add(OtherAction::class, new OtherActionHandler());

// Instantiate the performer.
$performer = new \Guennichi\Performist\Performer($registry, new \Guennichi\Performist\HandlerPeeler());

// Do the job
$user = $performer->perform(new RegisterUser('foo@bar.com', 'password'), [
    new DoctrineTransactionMiddleware(),
    new LoggerMiddleware(),
    // ...
]);

// Generic job
$result = $performer->perform(new OtherAction(/** some data */), [
    new BetweenMiddleware(),
    new BeforeMiddleware(),
    new AfterMiddleware()
]);
```

### Middlewares

[](#middlewares)

To be able to use the middleware feature for this library, you need to create a class that implements `\Performist\MiddlewareInterface`:

```
class MyMiddleware implements \Guennichi\Performist\MiddlewareInterface
{
    public function handle($action, Closure $next)
    {
        // Do something here before performing the action...
        // ...

        $result = $next($action);

        // Do something here after performing the action...
        // ...

        return $result;
    }
}

$result = $performer->perform(new MyAction(/** some data */), [
    new MyMiddleware()
]);
```

Supporting PHP &gt;= 7.4
------------------------

[](#supporting-php--74)

This client library only supports the latest version PHP &gt;= 7.4 , Check [Supported Versions](https://www.php.net/supported-versions.php)for more information.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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 ~4 days

Total

8

Last Release

1943d ago

Major Versions

v1.2.3 → v2.0.02021-03-06

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/287419?v=4)[Radhi](/maintainers/Radhi)[@radhi](https://github.com/radhi)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/guennichi-performist/health.svg)

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

###  Alternatives

[ph-7/qrcode-generator-php-class

Light QRCode PHP class (library). QR Code Generator using vCard 4.0 and the Google Chart AP

10415.9k2](/packages/ph-7-qrcode-generator-php-class)

PHPackages © 2026

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