so I wonder why we aren't using __invoke in that interface too
That's a very good idea, it might be a good middle ground:



interface Next

{

    public function __invoke(ServerRequestInterface $request) : 
ResponseInterface;

}


I believe the argument MWOP made in the past is that many existing middleware 
systems already use __invoke(), so PSR-15 using __invoke() as well would make 
bridge code harder.  A separate method makes having an object that just calls 
the method from an existing __invoke() (or vice versa) trivial.
Right but that applies to middlewares.

$next on the other hand is a throwable object/callable that wraps the next 
middleware because the next middleware expect another $next passed as parameter 
(at least from the implementations I've seen or implemented myself), so there 
shouldn't be any conflicts right?

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/etPan.57b0b3ee.48ec90.16394%40mnapoli.fr.
For more options, visit https://groups.google.com/d/optout.

Reply via email to