2017 © Pedro PelĂĄez
 

library symfony-middleware

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

image

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)

  • Tuesday, February 9, 2016
  • by mouf
  • Repository
  • 2 Watchers
  • 24 Stars
  • 15,708 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 1 Open issues
  • 2 Versions
  • 24 % Grown

The README.md

Symfony middleware for StackPHP

This package contains a StackPHP middleware 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., (*1)

Installation

Through Composer as mouf/symfony-middleware., (*2)

Usage

Simply use the SymfonyMiddleWare class in your middleware stack:, (*3)

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 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 :), (*4)

The Versions

09/02 2016

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/thecodingmachine/symfony-middleware

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

  Sources   Download

MIT

The Requires

 

stack silex stackphp

10/07 2015

v0.1.0

0.1.0.0 https://github.com/thecodingmachine/symfony-middleware

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

  Sources   Download

MIT

The Requires

 

stack silex stackphp