Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 2.06 KB

File metadata and controls

25 lines (17 loc) · 2.06 KB

Framework to framework migration

This is an example repository intended to show how to migrate from one framework to another using PSR7, PSR15 and PSR17. The approach is to layer each framework on a middleware, using Symfony Runtime component and Laminas Stratigility's Middleware pipeline feature.

Using the PSR17 runtime we are able to run any PSR17 complaint HTTP Server Request Handler just by returning it in the public/index.php main function 👉 The class Laminas\Stratigility\MiddlewarePipe is an implementation of that interface, so we can just instanciate it and register all the middlewares that should be an implementation of the Psr\Http\Server\MiddlewareInterface from the PSR15 standard. You will find all the implementations in the namespace App\Middleware.

How to run

Install the Symfony CLI first. Instructions 👉 here 👈. Then 👇

php composer.phar install
symfony serve -d

Available URLs