{"id":18834262,"url":"https://github.com/chubbyphp/chubbyphp-workerman-request-handler","last_synced_at":"2026-03-03T11:39:18.266Z","repository":{"id":41558007,"uuid":"285589369","full_name":"chubbyphp/chubbyphp-workerman-request-handler","owner":"chubbyphp","description":"A request handler adapter for workerman, using PSR-7, PSR-15 and PSR-17.","archived":false,"fork":false,"pushed_at":"2025-03-12T14:09:12.000Z","size":69,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-17T02:05:41.985Z","etag":null,"topics":["chubbyphp","psr-15","psr-17","psr-7","request-handler","workerman"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chubbyphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-08-06T14:15:21.000Z","updated_at":"2025-07-15T16:57:45.000Z","dependencies_parsed_at":"2023-12-03T21:22:33.532Z","dependency_job_id":"3030ae7c-aff9-4f25-b93c-612a15018ded","html_url":"https://github.com/chubbyphp/chubbyphp-workerman-request-handler","commit_stats":{"total_commits":25,"total_committers":4,"mean_commits":6.25,"dds":0.52,"last_synced_commit":"c759c34fff262d223a58bbed44b50ef2ac05cf3e"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/chubbyphp/chubbyphp-workerman-request-handler","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp%2Fchubbyphp-workerman-request-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp%2Fchubbyphp-workerman-request-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp%2Fchubbyphp-workerman-request-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp%2Fchubbyphp-workerman-request-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chubbyphp","download_url":"https://codeload.github.com/chubbyphp/chubbyphp-workerman-request-handler/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chubbyphp%2Fchubbyphp-workerman-request-handler/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266774783,"owners_count":23982247,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chubbyphp","psr-15","psr-17","psr-7","request-handler","workerman"],"created_at":"2024-11-08T02:11:15.927Z","updated_at":"2026-03-03T11:39:18.257Z","avatar_url":"https://github.com/chubbyphp.png","language":"PHP","readme":"# chubbyphp-workerman-request-handler\n\n[![CI](https://github.com/chubbyphp/chubbyphp-workerman-request-handler/actions/workflows/ci.yml/badge.svg)](https://github.com/chubbyphp/chubbyphp-workerman-request-handler/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/chubbyphp/chubbyphp-workerman-request-handler/badge.svg?branch=master)](https://coveralls.io/github/chubbyphp/chubbyphp-workerman-request-handler?branch=master)\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fchubbyphp%2Fchubbyphp-workerman-request-handler%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/chubbyphp/chubbyphp-workerman-request-handler/master)\n[![Latest Stable Version](https://poser.pugx.org/chubbyphp/chubbyphp-workerman-request-handler/v)](https://packagist.org/packages/chubbyphp/chubbyphp-workerman-request-handler)\n[![Total Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-workerman-request-handler/downloads)](https://packagist.org/packages/chubbyphp/chubbyphp-workerman-request-handler)\n[![Monthly Downloads](https://poser.pugx.org/chubbyphp/chubbyphp-workerman-request-handler/d/monthly)](https://packagist.org/packages/chubbyphp/chubbyphp-workerman-request-handler)\n\n[![bugs](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-workerman-request-handler\u0026metric=bugs)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-workerman-request-handler)\n[![code_smells](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-workerman-request-handler\u0026metric=code_smells)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-workerman-request-handler)\n[![coverage](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-workerman-request-handler\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-workerman-request-handler)\n[![duplicated_lines_density](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-workerman-request-handler\u0026metric=duplicated_lines_density)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-workerman-request-handler)\n[![ncloc](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-workerman-request-handler\u0026metric=ncloc)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-workerman-request-handler)\n[![sqale_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-workerman-request-handler\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-workerman-request-handler)\n[![alert_status](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-workerman-request-handler\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-workerman-request-handler)\n[![reliability_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-workerman-request-handler\u0026metric=reliability_rating)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-workerman-request-handler)\n[![security_rating](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-workerman-request-handler\u0026metric=security_rating)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-workerman-request-handler)\n[![sqale_index](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-workerman-request-handler\u0026metric=sqale_index)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-workerman-request-handler)\n[![vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=chubbyphp_chubbyphp-workerman-request-handler\u0026metric=vulnerabilities)](https://sonarcloud.io/dashboard?id=chubbyphp_chubbyphp-workerman-request-handler)\n\n## Description\n\nA request handler adapter for workerman, using PSR-7, PSR-15 and PSR-17.\n\n## Requirements\n\n * php: ^8.3\n * [psr/http-factory][2]: ^1.1\n * [psr/http-message][3]: ^1.1|^2.0\n * [psr/http-server-handler][4]: ^1.0.2\n * [psr/log][5]: ^2.0|^3.0.2\n * [workerman/workerman][6]: ^5.1.8\n\n## Installation\n\nThrough [Composer](http://getcomposer.org) as [chubbyphp/chubbyphp-workerman-request-handler][1].\n\n```sh\ncomposer require chubbyphp/chubbyphp-workerman-request-handler \"^2.3\"\n```\n\n## Usage\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App;\n\nuse Chubbyphp\\WorkermanRequestHandler\\OnMessage;\nuse Chubbyphp\\WorkermanRequestHandler\\PsrRequestFactory;\nuse Chubbyphp\\WorkermanRequestHandler\\WorkermanResponseEmitter;\nuse Psr\\Http\\Server\\RequestHandlerInterface;\nuse Some\\Psr17\\Factory\\ServerRequestFactory;\nuse Some\\Psr17\\Factory\\StreamFactory;\nuse Some\\Psr17\\Factory\\UploadedFileFactory;\nuse Workerman\\Worker;\n\n$loader = require __DIR__.'/vendor/autoload.php';\n\n/** @var RequestHandlerInterface $app*/\n$app = ...;\n\n$http = new Worker('http://0.0.0.0:8080');\n\n$http-\u003ecount = 4;\n\n$http-\u003eonWorkerStart = function () {\n    echo 'Workerman http server is started at http://0.0.0.0:8080'.PHP_EOL;\n};\n\n$http-\u003eonMessage = new OnMessage(\n    new PsrRequestFactory(\n        new ServerRequestFactory(),\n        new StreamFactory(),\n        new UploadedFileFactory()\n    ),\n    new WorkermanResponseEmitter(),\n    $app\n);\n\nWorker::runAll();\n```\n\n### with blackfire\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App;\n\nuse Blackfire\\Client;\nuse Chubbyphp\\WorkermanRequestHandler\\Adapter\\BlackfireOnMessageAdapter;\nuse Chubbyphp\\WorkermanRequestHandler\\OnMessage;\n\n/** @var OnMessage $onMessage */\n$onMessage = ...;\n\nif (extension_loaded('blackfire') {\n    $onMessage = new BlackfireOnMessageAdapter($onMessage, new Client());\n}\n\n$http-\u003eonMessage = $onMessage;\n```\n\n### with newrelic\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App;\n\nuse Chubbyphp\\WorkermanRequestHandler\\Adapter\\NewRelicOnMessageAdapter;\nuse Chubbyphp\\WorkermanRequestHandler\\OnMessage;\n\n/** @var OnMessage $onMessage */\n$onMessage = ...;\n\nif (extension_loaded('newrelic') \u0026\u0026 false !== $name = ini_get('newrelic.appname')) {\n    $onMessage = new NewRelicOnMessageAdapter($onMessage, $name);\n}\n\n$http-\u003eonMessage = $onMessage;\n```\n\n## Copyright\n\n2026 Dominik Zogg\n\n[1]: https://packagist.org/packages/chubbyphp/chubbyphp-workerman-request-handler\n[2]: https://packagist.org/packages/psr/http-factory\n[3]: https://packagist.org/packages/psr/http-message\n[4]: https://packagist.org/packages/psr/http-server-handler\n[5]: https://packagist.org/packages/psr/log\n[6]: https://packagist.org/packages/workerman/workerman\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchubbyphp%2Fchubbyphp-workerman-request-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchubbyphp%2Fchubbyphp-workerman-request-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchubbyphp%2Fchubbyphp-workerman-request-handler/lists"}