PHPackages                             philharmony/http-psr-extension - 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. philharmony/http-psr-extension

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

philharmony/http-psr-extension
==============================

Optional extensions for PSR-7 and PSR-17 HTTP interfaces

v1.0.0(1mo ago)057↑2847.4%MITPHPPHP ^8.1

Since Mar 29Pushed 1mo agoCompare

[ Source](https://github.com/philharmonytech/http-psr-extension)[ Packagist](https://packagist.org/packages/philharmony/http-psr-extension)[ Docs](https://github.com/philharmonytech/http-psr-extension)[ RSS](/packages/philharmony-http-psr-extension/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

http-psr-extension
==================

[](#http-psr-extension)

[![PHP Version](https://camo.githubusercontent.com/cc9cdea9aa96b40a822425e981b0a030e3371202973c7d57b74e8e99834f81dc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e312d626c7565)](https://camo.githubusercontent.com/cc9cdea9aa96b40a822425e981b0a030e3371202973c7d57b74e8e99834f81dc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e312d626c7565)[![PSR](https://camo.githubusercontent.com/64c72b1f4499de47e598c06ea4ad9311aad069722da3edeef11562d42c5d9509/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5053522d3725323025374325323031372d6f72616e6765)](https://camo.githubusercontent.com/64c72b1f4499de47e598c06ea4ad9311aad069722da3edeef11562d42c5d9509/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5053522d3725323025374325323031372d6f72616e6765)[![Latest Stable Version](https://camo.githubusercontent.com/44eb839794200d0b54e5091ec74ef84c6ce855d59d4ab1e6ce1fddd777742a2b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f7068696c6861726d6f6e79746563682f687474702d7073722d657874656e73696f6e3f6c6162656c3d737461626c65)](https://github.com/philharmonytech/http-psr-extension/releases)[![Total Downloads](https://camo.githubusercontent.com/af0159e8a200e721e12028546e38e63cfe4fb68bf6516dfb98028cc942f0b6c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068696c6861726d6f6e792f687474702d7073722d657874656e73696f6e)](https://packagist.org/packages/philharmony/http-psr-extension)[![License](https://camo.githubusercontent.com/7dd94bab73dcb3ef616822a04d68441cc4c6d5d44fc92b0b3b3c8a0415a9599e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7068696c6861726d6f6e792f687474702d7073722d657874656e73696f6e)](https://github.com/philharmonytech/http-psr-extension/blob/main/LICENSE)

Optional extensions for PSR-7 and PSR-17 HTTP interfaces

📦 Installation
--------------

[](#-installation)

```
composer require philharmony/http-psr-extension
```

🧠 Overview
----------

[](#-overview)

This package provides **optional extension interfaces** for PSR-7 and PSR-17.

It does **not replace PSR standards**, but adds additional capabilities that can be detected at runtime.

⚙️ Philosophy
-------------

[](#️-philosophy)

- PSR interfaces remain the baseline
- Extensions are optional
- Use `instanceof` for capability detection
- Always provide a fallback to standard PSR behavior

🚀 Usage
-------

[](#-usage)

### Detect extended UploadedFileFactory

[](#detect-extended-uploadedfilefactory)

```
use Philharmony\Http\PsrExtension\UploadedFileFactoryFromFileInterface;

if ($factory instanceof UploadedFileFactoryFromFileInterface) {
$file = $factory->createUploadedFileFromFile(
    file: '/tmp/file.txt',
    size: 1024,
    errorStatus: UPLOAD_ERR_OK,
    clientFilename: 'avatar.png',
    clientMediaType: 'image/png',
    fullPath: 'users/avatars/avatar.png' // PHP 8.1+ support
);
} else {
// fallback to PSR-17
}
```

### Detect full path support

[](#detect-full-path-support)

```
use Philharmony\Http\PsrExtension\UploadedFileFullPathInterface;

if ($uploadedFile instanceof UploadedFileFullPathInterface) {
    $fullPath = $uploadedFile->getFullPath();
} else {
// fallback to PSR-17
}
```

🔌 Compatibility
---------------

[](#-compatibility)

- Works with any PSR-7 implementation
- Works with any PSR-17 factory
- No runtime dependencies

📄 License
---------

[](#-license)

This package is open-source and licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

🤝 Contributing
--------------

[](#-contributing)

Contributions, issues, and feature requests are welcome.

If you find a bug or have an idea for improvement, please open an issue or submit a pull request.

⭐ Support
---------

[](#-support)

If you find this package useful, please consider giving it a star on GitHub. It helps the project grow and reach more developers.

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance90

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f4cd2e09bafc7c15e943d0844b81b7cbfe022c3b13a5cfe59b158e01e11a0658?d=identicon)[it-philharmony](/maintainers/it-philharmony)

---

Top Contributors

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

---

Tags

httppsr-7interfacespsr-17extension

### Embed Badge

![Health badge](/badges/philharmony-http-psr-extension/health.svg)

```
[![Health](https://phpackages.com/badges/philharmony-http-psr-extension/health.svg)](https://phpackages.com/packages/philharmony-http-psr-extension)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.0B3.2k](/packages/guzzlehttp-psr7)[laminas/laminas-diactoros

PSR HTTP Message implementations

546105.8M965](/packages/laminas-laminas-diactoros)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[laminas/laminas-stratigility

PSR-7 middleware foundation for building and dispatching middleware pipelines

586.6M81](/packages/laminas-laminas-stratigility)[middlewares/utils

Common utils for PSR-15 middleware packages

503.4M92](/packages/middlewares-utils)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

86874.0k94](/packages/httpsoft-http-message)

PHPackages © 2026

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