README.md

September 18, 2025 · View on GitHub

Tests Adapterman GitHub release GitHub

Faster, More Scalable Apps with Serverless Capabilities

Run nearly any PHP application seamlessly using the async, event-driven Workerman without modifying a single line of code in your framework or app.

If your application or framework follows a Front Controller pattern, there’s a 99% chance it will work out of the box.

Minimum requirements:

  • PHP 8.0 (or higher)
  • Adapterman 0.7 (requires PHP 8.1)

Currently Compatible With:

  • Symfony
  • Laravel
  • CakePHP
  • Yii2
  • Slim
  • KumbiaPHP
  • ThinkPHP
  • Leaf
  • FlightPHP
  • Wolff
  • Phpixie
  • ... (Your app could be next!)

More frameworks and applications are being tested continuously, all without requiring code changes.

Experience enhanced performance and scalability effortlessly.

NEW !!! Workerman shared nothing mode

We started to test it. Experimental still.

Each request is independent and load the .php file, like with PHP-FPM. Using the same .php files.

image

FrameworkJSON1-queryMultiple queriesFortunesUpdatesPlaintext
php php-fpm187,74797,65812,78479,3092,010195,283
php workerman822,930134,47515,648124,9234,6831,161,016

Performance bench Worker mode

Results from Techempower benchmark. Without touch a line of code.

Follow https://twitter.com/adaptermanphp for more updates.

Symfony 6

With full ORM image Latency image

FwPlaintextJsonSingle queryMultiple queryUpdatesFortunes
Symfony38,23137,55712,57810,7413,42010,741
Symfony Workerman210,796197,059107,05013,4014,06271,092

Laravel 8

With full ORM.

FwPlaintextJsonSingle queryMultiple queryUpdatesFortunes
Laravel14,79914,7709,2633,2471,4528,354
Laravel Roadrunner482478474375359472
Laravel Swoole38,82437,43921,6873,9581,58816,035
Laravel Laravel s54,61749,37223,6772,9171,25516,696
Laravel Workerman103,00499,89146,0015,8281,66627,158

image Latency image

Slim with Workerman

Without ORM image

FrameworkPlaintextJSON1-query20-queryUpdatesFortunes
Slim 435,25138,30534,27212,5792,09732,634
Slim 4 Workerman134,531129,39381,88915,8032,45673,212
Slim 4 Workerman pgsql *102,92619,63714,87592,752
  • Without ORM and db class optimized for Workerman

Symfony demo with Workerman

Symfony initialization 0ms and half the time per request.

https://user-images.githubusercontent.com/249085/197399760-5da8311e-5cf1-426a-a89d-ec2a2de43af0.mp4

Installation

composer require joanhey/adapterman

Automatically install Workerman too.

Tree

Where to create the files (server.php and start.php)

.
├── app(dir)
├── public(dir)
├── vendor(dir)
├── composer.json
├── server.php
└── start.php

Server

server.php

<?php

require_once __DIR__ . '/vendor/autoload.php';

use Adapterman\Adapterman;
use Workerman\Worker;

Adapterman::init();

$http_worker                = new Worker('http://0.0.0.0:8080');
$http_worker->count         = 8;
$http_worker->name          = 'AdapterMan';

$http_worker->onWorkerStart = static function () {
    //init();
    require __DIR__.'/start.php';
};

$http_worker->onMessage = static function ($connection, $request) {

    $connection->send(run());
};

Worker::runAll();

Front Controller

It's different for any fw and app.

We are creating recipes for popular apps and frameworks.

Recommended start.php and leave index.php in public.

We can run the app with Workerman and with php-fpm at the same time.

Available commands in workerman

To run your app.

php server.php start
php server.php start -d
php server.php status
php server.php status -d
php server.php connections
php server.php stop
php server.php stop -g
php server.php restart
php server.php reload
php server.php reload -g

Workerman documentation: https://manual.workerman.net/doc/en/

You can also select a diferent cli php.ini directly:

php -c cli-php.ini server.php start

Help with session issues

I have been using this library internally for over two years to run legacy applications with Workerman. Initially, we developed it primarily for APIs and microservices, so session handling wasn't a key focus during testing. As a result, the session functionality may not be as thoroughly tested or optimized as other features.

If you encounter any issues related to sessions, please let us know so we can investigate and improve compatibility.

Login progress

It's working with Symfony and Laravel

Laravel Orchid admin panel. image

Drupal showing public pages. image