Lansoweb / basepath

PHP middleware to remove a path prefix from a request uri
MIT License
14 stars 4 forks source link

Support zend-expressive v3 #6

Closed halfpastfouram closed 6 years ago

halfpastfouram commented 6 years ago

The docs/README.md should include instructions on how to use this library with zend-expressive V3. The example given in README.md does no longer work and will trigger an error.

This can be resolved by using the doublePassMiddleware function:

use LosMiddleware\BasePath\BasePath;
use Zend\Diactoros\Response;

/** @var \Zend\Expressive\Application $app */

$app->pipe(\Zend\Stratigility\doublePassMiddleware(new BasePath(), new Response()));
Lansoweb commented 6 years ago

Hi! Yes, i'm updating most of my libraries, mainly to include psr-15, psr7, expressive 3 and improving code. But thanks to point it out.

halfpastfouram commented 6 years ago

Great, I'll keep an eye out for it!

Lansoweb commented 6 years ago

Released 2.0.0 and it's working with expressive 3. Thanks!