have something like this:
routes.php
$app->get('/', Action::class)->add(Middleware::class);
Middleware.php:
...
public function __construct(Dependency1 $dep1, Dependency2 $dep2) {
...
}
...
In addition to the type hinted dependencies, I would like to pass a third parameter into the middleware.
Anyone?
I've figured out. PHP-DI has an extra method make(), that is not defined in the PSR-11 Standard. Slim supplies a PSR-11 ContainerInterface by default, so the IDE will flag the make method as non-existent, even though it works.
Обсуждают сегодня