PHPackages                             hakone/psr7-serializer - 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. hakone/psr7-serializer

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

hakone/psr7-serializer
======================

PSR-7 HTTP Message serializer

0.0.2(2y ago)08Apache-2.0PHPPHP &gt;=7.3

Since Jun 10Pushed 2y ago1 watchersCompare

[ Source](https://github.com/hakonephp/psr7-serializer)[ Packagist](https://packagist.org/packages/hakone/psr7-serializer)[ RSS](/packages/hakone-psr7-serializer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (13)Versions (3)Used By (0)

PSR-7 Serializer 🏃‍♀️
=====================

[](#psr-7-serializer-‍️)

[![Package version](https://camo.githubusercontent.com/6bde8be31a1c1d7500b1ebc3f6159ac69eaa79310f7ba8ac51ac74a17ad7bd9f/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68616b6f6e652f707372372d73657269616c697a65722e7376673f7374796c653d666c6174)](https://packagist.org/packages/hakone/psr7-serializer)[![Build Status](https://github.com/hakonephp/psr7-serializer/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/hakonephp/psr7-serializer/actions)[![Downloads this Month](https://camo.githubusercontent.com/eddea45879471f0a0c8d5bc473e487c3e6a70e7140739c10cbd4a6e3aa8e15f2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f68616b6f6e652f707372372d73657269616c697a65722e737667)](https://packagist.org/packages/hakone/psr7-serializer)

This package provides functionality to persist [PSR-7](https://www.php-fig.org/psr/psr-7/) HTTP Responses based on and [PSR-17](https://www.php-fig.org/psr/psr-17/).

This package is designed to serialize within the PSR-7 standard. The data does not have the pre-serialized class name, so the restored class depends only on the PSR-17 Factory object passed to `unserializePsr7()`.

Install
-------

[](#install)

```
# minimum requirements when your project already has any HTTP library installed
composer require hakone/psr7-serializer

# for auto-detecting HTTP libraries installed in your project
composer require hakone/psr7-serializer php-http/discovery

```

[HTTPlug Discovery (`php-http/discovery`)](https://github.com/php-http/discovery) is a package useful for auto-discovering classes provided by installed HTTP libraries.

If you do not already have HTTP factory implementations installed: consider adding one of [`nyholm/psr7`](https://github.com/Nyholm/psr7), [`guzzlehttp/psr7`](https://github.com/guzzle/psr7), or [`laminas/laminas-diactoros`](https://docs.laminas.dev/laminas-diactoros/) to your project.

Usage
-----

[](#usage)

```
