PHPackages                             ichhabrecht/psr7-middleware-yaml-parser - 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. ichhabrecht/psr7-middleware-yaml-parser

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

ichhabrecht/psr7-middleware-yaml-parser
=======================================

PSR-7 middleware that parses Yaml files to ServerRequest attribute

1.1.0(10y ago)02061MITPHP

Since May 5Pushed 10y ago1 watchersCompare

[ Source](https://github.com/IchHabRecht/psr7-middleware-yaml-parser)[ Packagist](https://packagist.org/packages/ichhabrecht/psr7-middleware-yaml-parser)[ Docs](https://github.com/IchHabRecht/psr7-middleware-yaml-parser)[ RSS](/packages/ichhabrecht-psr7-middleware-yaml-parser/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (4)Versions (2)Used By (1)

Yaml parser middleware
======================

[](#yaml-parser-middleware)

PSR-7 middleware that parses Yaml files to ServerRequest attribute.

[![Latest Stable Version](https://camo.githubusercontent.com/fded93c122f5c4717f2558584aa886dac0728b5056b8a3b423607217ba057600/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69636868616272656368742f707372372d6d6964646c65776172652d79616d6c2d7061727365722e737667)](https://packagist.org/packages/ichhabrecht/psr7-middleware-yaml-parser)[![Build Status](https://camo.githubusercontent.com/aaaf1cd15ecc1931e232f38c6cf2555b0474382fec8c4ab93ba64f6fae56351a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f49636848616252656368742f707372372d6d6964646c65776172652d79616d6c2d7061727365722f6d61737465722e737667)](https://travis-ci.org/IchHabRecht/psr7-middleware-yaml-parser)

This middleware parses Yaml files or strings. The result is stored in an own ServerRequest attribute for further usage.

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

[](#installation)

It's recommended that you use [Composer](https://getcomposer.org/) to install the Yaml parser.

```
$ composer require ichhabrecht/psr7-middleware-yaml-parser
```

Usage
-----

[](#usage)

In Slim 3:

```
$app->add(new \IchHabRecht\Psr7MiddlewareYamlParser\YamlParser(__DIR__ . '/settings.yml'));

$app->get('/', function ($request, $response, $args) {
    $settings = $request->getAttribute('yaml');

    return $response;
});
```

**Change attribute name**

It is possible to adjust the ServerRequest attribute name to your own needs.

```
$app->add(new \IchHabRecht\Psr7MiddlewareYamlParser\YamlParser(__DIR__ . '/settings.yml', 'settings'));

$app->get('/', function ($request, $response, $args) {
    $settings = $request->getAttribute('settings');

    return $response;
});
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

Established project with proven stability

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

Total

2

Last Release

3708d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1453345?v=4)[Nicole Hummel](/maintainers/IchHabRecht)[@IchHabRecht](https://github.com/IchHabRecht)

---

Top Contributors

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

---

Tags

psr-7middlewareyaml

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ichhabrecht-psr7-middleware-yaml-parser/health.svg)

```
[![Health](https://phpackages.com/badges/ichhabrecht-psr7-middleware-yaml-parser/health.svg)](https://phpackages.com/packages/ichhabrecht-psr7-middleware-yaml-parser)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B3.8k](/packages/guzzlehttp-psr7)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[mezzio/mezzio

PSR-15 Middleware Microframework

3923.8M120](/packages/mezzio-mezzio)[laminas/laminas-stratigility

PSR-7 middleware foundation for building and dispatching middleware pipelines

587.2M96](/packages/laminas-laminas-stratigility)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28545.4k3](/packages/mezzio-mezzio-authentication-oauth2)[mezzio/mezzio-authentication

Authentication middleware for Mezzio and PSR-7 applications

131.7M39](/packages/mezzio-mezzio-authentication)

PHPackages © 2026

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