PHPackages                             mjelamanov/psr17-httplug - 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. mjelamanov/psr17-httplug

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

mjelamanov/psr17-httplug
========================

A PSR-17 adapter for httplug's message factory

1.1.1(4y ago)0509MITPHPPHP &gt;=7.0

Since Jan 18Pushed 4y ago1 watchersCompare

[ Source](https://github.com/mjelamanov/psr17-httplug)[ Packagist](https://packagist.org/packages/mjelamanov/psr17-httplug)[ RSS](/packages/mjelamanov-psr17-httplug/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (0)

PSR-17 adapter for httplug's message factory
============================================

[](#psr-17-adapter-for-httplugs-message-factory)

[![Build Status](https://camo.githubusercontent.com/6e351075dda255b1dfaf42dab4789edd2c28336fe593ef2bcf94d41a47d82f5f/68747470733a2f2f7472617669732d63692e636f6d2f6d6a656c616d616e6f762f70737231372d687474706c75672e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/mjelamanov/psr17-httplug)[![StyleCI](https://camo.githubusercontent.com/983ad91027090e5d77410f2efa2068c90e5ce596eb478952af78a4e903432eaa/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3136353732393631322f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/165729612)

A PSR-17 adapter for [php-http/message-factory](https://github.com/php-http/message-factory)

This package provides all implementations of the PSR-18 except for `Psr\Http\Message\ServerRequestFactoryInterface`and `Psr\Http\Message\UploadedFileFactoryInterface` because the [php-http/message-factory](https://github.com/php-http/message-factory) package do not have similar factories

Requirements
------------

[](#requirements)

PHP 7.0 or above.

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

[](#installation)

```
$ composer require mjelamanov/psr17-httplug
```

RequestFactory
--------------

[](#requestfactory)

```
use Mjelamanov\Psr17Httplug\RequestFactory;
use Http\Message\MessageFactory\GuzzleMessageFactory; // A php-http's request factory implementation

$requestFactory = new RequestFactory(new GuzzleMessageFactory());

$request = $requestFactory->createRequest('GET', 'http://example.com');
```

StreamFactory
-------------

[](#streamfactory)

```
use Mjelamanov\Psr17Httplug\StreamFactory;
use Http\Message\StreamFactory\GuzzleStreamFactory; // A php-http's stream factory implementation

$streamFactory = new StreamFactory(new GuzzleStreamFactory());

// Create from string
$stream = $streamFactory->createStream(json_encode(['test' => true]));

// Create from resource
$stream = $streamFactory->createStreamFromResource(fopen('path/to/file', 'r'));

// Create from file
$stream = $streamFactory->createStreamFromFile('path/to/file', 'r');
```

UriFactory
----------

[](#urifactory)

```
use Mjelamanov\Psr17Httplug\UriFactory;
use Http\Message\StreamFactory\GuzzleUriFactory; // A php-http's uri factory implementation

$uriFactory = new UriFactory(new GuzzleUriFactory());

$uri = $uriFactory->createUri('http://example.com');
```

ResponseFactory
---------------

[](#responsefactory)

```
use Mjelamanov\Psr17Httplug\ResponseFactory;
use Http\Message\StreamFactory\GuzzleMessageFactory; // A php-http's response factory implementation

$responseFactory = new ResponseFactory(new GuzzleMessageFactory());

$response = $responseFactory->createResponse(200, 'OK');
```

Test
----

[](#test)

```
composer test
```

License
-------

[](#license)

The MIT license. Read [LICENSE file](https://github.com/mjelamanov/psr17-httplug/blob/master/LICENSE).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95% 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 ~511 days

Total

3

Last Release

1646d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7cba48e48dc3912d15d8c461239e4454b33bc3ffd4ac6d183dd2fbc441540beb?d=identicon)[mjelamanov](/maintainers/mjelamanov)

---

Top Contributors

[![mjelamanov](https://avatars.githubusercontent.com/u/15931507?v=4)](https://github.com/mjelamanov "mjelamanov (19 commits)")[![stof](https://avatars.githubusercontent.com/u/439401?v=4)](https://github.com/stof "stof (1 commits)")

---

Tags

httpmessagefactorypsr-17php-http

### Embed Badge

![Health badge](/badges/mjelamanov-psr17-httplug/health.svg)

```
[![Health](https://phpackages.com/badges/mjelamanov-psr17-httplug/health.svg)](https://phpackages.com/packages/mjelamanov-psr17-httplug)
```

###  Alternatives

[psr/http-factory

PSR-17: Common interfaces for PSR-7 HTTP message factories

1.9k692.9M1.9k](/packages/psr-http-factory)[http-interop/http-factory-guzzle

An HTTP Factory using Guzzle PSR7

581167.2M519](/packages/http-interop-http-factory-guzzle)[php-http/httplug-bundle

Symfony integration for HTTPlug

38921.0M54](/packages/php-http-httplug-bundle)[vultr/vultr-php

The Official Vultr API PHP Wrapper.

2243.9k1](/packages/vultr-vultr-php)[chillerlan/php-httpinterface

A PSR-7/17/18 http message/client implementation

1417.1k5](/packages/chillerlan-php-httpinterface)[php-http/laravel-httplug

Laravel package to integrate the Httplug generic HTTP client into Laravel

12110.1k](/packages/php-http-laravel-httplug)

PHPackages © 2026

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