Closed DaGhostman closed 8 years ago
wouldn't it be better if the signature is defined within the base interface rather than in each extending interface?
How?
@DaGhostman this has been discussed at length on the ML. The bottom line is that server middleware needs to use ServerRequest
which would make it incompatible with a base process()
method.
I was looking through the interfaces and noticed that
MiddlewareInterface
does not define any methods, butClientMiddlewareInterface
andServerMiddlewareInterface
define the same method, wouldn't it be better if the signature is defined within the base interface rather than in each extending interface?Seems like it will make more sense for
MiddlewareInterface
to provide the method signatures while every other, that extends it could define additional methods if any. Also, if no additional methods are provided they can be used by implementations as meta interfaces to enforce the contracts as to which middleware is supposed to work on what stack (client/server).