PHPackages                             mouf/symfony-middleware - 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. [Framework](/categories/framework)
4. /
5. mouf/symfony-middleware

ActiveLibrary[Framework](/categories/framework)

mouf/symfony-middleware
=======================

This package provides a StackPHP middleware that can be used to use a Symfony application as a middleware (instead of an app)

v0.1.0(10y ago)2335.4k6MITPHPPHP &gt;=5.4.0

Since Jul 10Pushed 10y ago1 watchersCompare

[ Source](https://github.com/thecodingmachine/symfony-middleware)[ Packagist](https://packagist.org/packages/mouf/symfony-middleware)[ Docs](https://github.com/thecodingmachine/symfony-middleware)[ RSS](/packages/mouf-symfony-middleware/feed)WikiDiscussions 1.0 Synced 1mo ago

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

Symfony middleware for StackPHP
===============================

[](#symfony-middleware-for-stackphp)

This package contains a [StackPHP middleware](http://stackphp.com/) that enables you to push a Symfony application (actually a `Kernel`) directly on the middleware stack. The Symfony application will try to handle requests but instead of sending a 404 response if no route is found, the next middleware on the stack will be called.

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

[](#installation)

Through [Composer](https://getcomposer.org/) as [mouf/symfony-middleware](https://packagist.org/packages/mouf/symfony-middleware).

Usage
-----

[](#usage)

Simply use the `SymfonyMiddleWare` class in your middleware stack:

```
use Mouf\StackPhp\SymfonyMiddleware;
use My\Symfony\Application;
use Stack\Builder;

$app = ...

$symfonyApplication = new Application(...);

$stack = (new Stack\Builder())
    ->push(SymfonyMiddleware::class, $symfonyApplication);

$app = $stack->resolve($app);
```

Why?
----

[](#why)

Why would I want to make a Symfony app a middleware? Because if every app becomes a middleware, we can easily chain middlewares together, and therefore, chain many frameworks in the same application... and this is cool :)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~214 days

Total

2

Last Release

3750d ago

Major Versions

v0.1.0 → 1.0.x-dev2016-02-09

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1104771?v=4)[mouf](/maintainers/mouf)[@Mouf](https://github.com/Mouf)

---

Top Contributors

[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (5 commits)")[![ftassi](https://avatars.githubusercontent.com/u/176622?v=4)](https://github.com/ftassi "ftassi (1 commits)")

---

Tags

stacksilexStackPHP

### Embed Badge

![Health badge](/badges/mouf-symfony-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/mouf-symfony-middleware/health.svg)](https://phpackages.com/packages/mouf-symfony-middleware)
```

###  Alternatives

[barryvdh/laravel-stack-middleware

Stack Middleware for Laravel

43415.4k5](/packages/barryvdh-laravel-stack-middleware)[alexbilbie/proton

Micro PHP framework

27417.4k2](/packages/alexbilbie-proton)[linio/tortilla

A highly opinionated microframework built with speed and simplicity in mind.

133.0k2](/packages/linio-tortilla)[ddesrosiers/silex-annotation-provider

A silex service provider that allows the use of annotations in ServiceControllers.

25246.7k3](/packages/ddesrosiers-silex-annotation-provider)[tobiassjosten/responsible-service-provider

A Silex ServiceProvider for automagic response formatting.

3490.8k](/packages/tobiassjosten-responsible-service-provider)[propel/propel-service-provider

Propel integrationfor Silex.

2625.2k3](/packages/propel-propel-service-provider)

PHPackages © 2026

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