PHPackages                             joanhey/adapterman - 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. joanhey/adapterman

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

joanhey/adapterman
==================

Use any framework and application with Workerman.

0.7.1(1y ago)85255.9k↑19%57[29 issues](https://github.com/joanhey/AdapterMan/issues)[1 PRs](https://github.com/joanhey/AdapterMan/pulls)1MITPHPPHP ^8.1CI failing

Since Aug 29Pushed 8mo ago16 watchersCompare

[ Source](https://github.com/joanhey/AdapterMan)[ Packagist](https://packagist.org/packages/joanhey/adapterman)[ GitHub Sponsors](https://github.com/joanhey)[ RSS](/packages/joanhey-adapterman/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (18)Used By (1)

 [![](https://user-images.githubusercontent.com/249085/200214022-c2c45753-368c-4e28-8415-2b3cadca9907.png)](https://user-images.githubusercontent.com/249085/200214022-c2c45753-368c-4e28-8415-2b3cadca9907.png)

[![Tests Adapterman](https://github.com/joanhey/AdapterMan/actions/workflows/test.yml/badge.svg)](https://github.com/joanhey/AdapterMan/actions/workflows/test.yml)[![GitHub release](https://camo.githubusercontent.com/7e67d819e94aeac20a932c8b3c7f5ed88535d8d0910d82c928db8f377dadd2ca/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6a6f616e6865792f616461707465726d616e2e737667)](https://github.com/joanhey/adapterman/releases/latest)[![GitHub](https://camo.githubusercontent.com/167540451144ff3ea0421bffa5998c9ef33361cce03d8494bd9f4b6a2b0baa0f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a6f616e6865792f616461707465726d616e)](https://github.com/joanhey/AdapterMan/blob/master/LICENSE.txt)

**Faster, More Scalable Apps with Serverless Capabilities**

Run nearly any PHP application seamlessly using the async, event-driven [Workerman](https://github.com/walkor/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

[](#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](https://user-images.githubusercontent.com/249085/209589643-5b464656-4d44-4879-9bbc-deb49582a57b.png)](https://user-images.githubusercontent.com/249085/209589643-5b464656-4d44-4879-9bbc-deb49582a57b.png)

FrameworkJSON1-queryMultiple queriesFortunesUpdatesPlaintextphp php-fpm187,74797,65812,78479,3092,010195,283php workerman822,930134,47515,648124,9234,6831,161,016Performance bench Worker mode
-----------------------------

[](#performance-bench-worker-mode)

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

Follow  for more updates.

### Symfony 6

[](#symfony-6)

With full ORM [![image](https://user-images.githubusercontent.com/249085/209320777-13d1cc25-f350-43a4-ba2f-4db0a92c7b7a.png)](https://user-images.githubusercontent.com/249085/209320777-13d1cc25-f350-43a4-ba2f-4db0a92c7b7a.png)Latency [![image](https://user-images.githubusercontent.com/249085/209321052-6dab2d0e-c630-48d8-a25c-5f1906f08b8f.png)](https://user-images.githubusercontent.com/249085/209321052-6dab2d0e-c630-48d8-a25c-5f1906f08b8f.png)

FwPlaintextJsonSingle queryMultiple queryUpdatesFortunesSymfony38,23137,55712,57810,7413,42010,741**Symfony Workerman****210,796****197,059****107,050****13,401****4,062****71,092**### Laravel 8

[](#laravel-8)

With full ORM.

FwPlaintextJsonSingle queryMultiple queryUpdatesFortunesLaravel14,79914,7709,2633,2471,4528,354Laravel Roadrunner482478474375359472Laravel Swoole38,82437,43921,6873,9581,58816,035Laravel Laravel s54,61749,37223,6772,9171,25516,696**Laravel Workerman****103,004****99,891****46,001****5,828****1,666****27,158**[![image](https://user-images.githubusercontent.com/249085/200189417-06fa658b-92c3-4c6d-a6e4-1efb3446a513.png)](https://user-images.githubusercontent.com/249085/200189417-06fa658b-92c3-4c6d-a6e4-1efb3446a513.png)Latency [![image](https://user-images.githubusercontent.com/249085/200189427-99977bb7-5910-4d17-a47c-7242e8f95f8f.png)](https://user-images.githubusercontent.com/249085/200189427-99977bb7-5910-4d17-a47c-7242e8f95f8f.png)

### Slim with Workerman

[](#slim-with-workerman)

Without ORM [![image](https://user-images.githubusercontent.com/249085/201919385-ad25e41b-9887-42b7-92c0-d524a5e6aeae.png)](https://user-images.githubusercontent.com/249085/201919385-ad25e41b-9887-42b7-92c0-d524a5e6aeae.png)

FrameworkPlaintextJSON1-query20-queryUpdatesFortunesSlim 435,25138,30534,27212,5792,09732,634**Slim 4 Workerman****134,531****129,393****81,889****15,803****2,456****73,212**Slim 4 Workerman pgsql \*102,92619,63714,87592,752- Without ORM and db class optimized for Workerman

### Symfony demo with Workerman

[](#symfony-demo-with-workerman)

Symfony initialization 0ms and half the time per request.

    Grabacion\_microsoft-edge-dev\_20221023170450.mp4    Installation
------------

[](#installation)

```
composer require joanhey/adapterman

```

Automatically install Workerman too.

Tree
----

[](#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)

server.php

```
