Skip to content

1.4.0

Compare
Choose a tag to compare
@mnapoli mnapoli released this 04 Feb 12:21
· 9 commits to master since this release

In other words, this brings the resolution logic of enhanced controllers as services to all callbacks in Silex.

Example of a middleware resolved by PHP-DI:

class AuthMiddleware
{
    public function beforeRoute(Request $request, Application $app)
    {
        // ...
    }
}

$app->before([AuthMiddleware::class, 'beforeRoute']);

You can view the documentation here.