PHPackages                             xel/psr7bridge - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. xel/psr7bridge

ActiveLibrary[HTTP &amp; Networking](/categories/http)

xel/psr7bridge
==============

0.1.5(2y ago)1711PHPPHP &gt;=8.2

Since Jan 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/xel-comunnity/Xel-Psr7-Bridge)[ Packagist](https://packagist.org/packages/xel/psr7bridge)[ RSS](/packages/xel-psr7bridge/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (5)Dependencies (6)Versions (9)Used By (1)

### Swoole Psr7 Bridge

[](#swoole-psr7-bridge)

 This library still not for production. The Idea of this library is to process copy Swoole Http response to psr 7 standart when needed and leverage this copy using Psr 17 factory. in response, it will have dynamic switching when the response content have the larger byte value, it will split and make it chunk to make it more light to send.

 [**Explore the docs »**](https://github.com/Bxel07/Xel-Psr7-Bridge)

 [View Demo](https://github.com/Bxel07/Xel-Psr7-Bridge) . [Report Bug](https://github.com/Bxel07/Xel-Psr7-Bridge/issues) . [Request Feature](https://github.com/Bxel07/Xel-Psr7-Bridge/issues)

[![Downloads](https://camo.githubusercontent.com/bdc5b473815d67fa507b2c40933d28ac031ba0bfb79e19fe1177ca2ced0fcf42/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f4278656c30372f58656c2d507372372d4272696467652f746f74616c)](https://camo.githubusercontent.com/bdc5b473815d67fa507b2c40933d28ac031ba0bfb79e19fe1177ca2ced0fcf42/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f646f776e6c6f6164732f4278656c30372f58656c2d507372372d4272696467652f746f74616c) [![Contributors](https://camo.githubusercontent.com/c40ae9858d20ffef34ffc983af2856e4bec09111f6825e43561fc80dd2c03097/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f4278656c30372f58656c2d507372372d4272696467653f636f6c6f723d6461726b2d677265656e)](https://camo.githubusercontent.com/c40ae9858d20ffef34ffc983af2856e4bec09111f6825e43561fc80dd2c03097/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636f6e7472696275746f72732f4278656c30372f58656c2d507372372d4272696467653f636f6c6f723d6461726b2d677265656e) [![Forks](https://camo.githubusercontent.com/da66725bd292de4bf197ae25bd67bf5ddbd0712bc8d2941794dff9c4f8e2dd22/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f4278656c30372f58656c2d507372372d4272696467653f7374796c653d736f6369616c)](https://camo.githubusercontent.com/da66725bd292de4bf197ae25bd67bf5ddbd0712bc8d2941794dff9c4f8e2dd22/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f4278656c30372f58656c2d507372372d4272696467653f7374796c653d736f6369616c) [![Stargazers](https://camo.githubusercontent.com/87810c0f330dd869ad071f02725bfaf238ebf25aec9fb76d4ea0ae92fc35e554/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f4278656c30372f58656c2d507372372d4272696467653f7374796c653d736f6369616c)](https://camo.githubusercontent.com/87810c0f330dd869ad071f02725bfaf238ebf25aec9fb76d4ea0ae92fc35e554/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f4278656c30372f58656c2d507372372d4272696467653f7374796c653d736f6369616c) [![Issues](https://camo.githubusercontent.com/dafe6a733f2852771dc93da301f309a6fc86c9f525100bca3b2d04ad1da1944b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4278656c30372f58656c2d507372372d427269646765)](https://camo.githubusercontent.com/dafe6a733f2852771dc93da301f309a6fc86c9f525100bca3b2d04ad1da1944b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4278656c30372f58656c2d507372372d427269646765) [![License](https://camo.githubusercontent.com/97c93445c3bca2d0cc950e31857cff36e0e56bb47687fb90102cf7223b2cde1a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4278656c30372f58656c2d507372372d427269646765)](https://camo.githubusercontent.com/97c93445c3bca2d0cc950e31857cff36e0e56bb47687fb90102cf7223b2cde1a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4278656c30372f58656c2d507372372d427269646765)

Getting Started
---------------

[](#getting-started)

To get start with this library you need several prerequest

### Prerequisites

[](#prerequisites)

- ext-swoole =&gt; V 5.0.0
- php =&gt; V 8.2

### Installation

[](#installation)

1. Install with this command :

```
     composer require xel/psr7bridge
```

Usage
-----

[](#usage)

1. In you server.php or in file which containt swoole server :

```
     set([
    "worker_num" => 35,
    "dispatch_mode" => 1
]);

/***
 * In this sample using Psr7 and Psr17 Provided by HttpSoft.
 * u can u other library to utilize this
 */
$psr7RequestFactory =  new PsrFactory
(
    new ServerRequestFactory(),
    new StreamFactory(),
    new UploadedFileFactory(),

);

$psr7Response = new ResponseFactory();
$psr7Stream =  new StreamFactory();

$server->on("request" , function (SwooleRequest $request, SwooleResponse $response) use ($psr7RequestFactory,$psr7Response, $psr7Stream){

    // ? Connect Swoole http request with Psr 17 factory
    $psr7RequestFactory->connectRequest($request);

    // ? Sample data in stream
    $data = $psr7Stream->createStream("Hello Swoole");

    // ? create response and
    $manage = $psr7Response->createResponse();
    $manage =  $manage->withBody($data);
    $manage = $manage->withStatus(200);

    // ?  bridge it to psr7
    $psr7RequestFactory->connectResponse($manage, $response);
});

$server->start();
```

*For more examples, please refer to the [Documentation](https://example.com)*

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

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

Recently: every ~14 days

Total

8

Last Release

832d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/90438343?v=4)[Yogi](/maintainers/bxel07)[@bxel07](https://github.com/bxel07)

---

Top Contributors

[![bxel07](https://avatars.githubusercontent.com/u/90438343?v=4)](https://github.com/bxel07 "bxel07 (14 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/xel-psr7bridge/health.svg)

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

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[mollie/mollie-api-php

Mollie API client library for PHP. Mollie is a European Payment Service provider and offers international payment methods such as Mastercard, VISA, American Express and PayPal, and local payment methods such as iDEAL, Bancontact, SOFORT Banking, SEPA direct debit, Belfius Direct Net, KBC Payment Button and various gift cards such as Podiumcadeaukaart and fashioncheque.

60216.0M85](/packages/mollie-mollie-api-php)[moonshine/moonshine

Laravel administration panel

1.3k253.1k81](/packages/moonshine-moonshine)

PHPackages © 2026

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