2022-08-05 113次浏览

Version 2.1.0 of Yii Middleware Dispatcher package was tagged. There a few enhancements.

  • Added array definition syntax support for middleware. For example: $dispatcher = $dispatcher->withMiddlewares([
      [
        'class' => MyMiddleware::class,
        '__construct()' => [
            'someVar' => 42,
        ],
      ],
    

    ]);

  • Implemented friendly exception with solution for InvalidMiddlewareDefinitionException .