You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Uncaught RuntimeException: A middleware must be an object/class name referencing an implementation of MiddlewareInterface or a callable with a matching signature. in /app/vendor/slim/slim/Slim/MiddlewareDispatcher.php:92
Is it too extreme to override the MiddlewareDispatcher here to allow these notations? Otherwise the problem needs to be fixed in Slim's MiddlewareDispatcher to defer all middleware notations to the CallableResolver instead of only string variants.
The text was updated successfully, but these errors were encountered:
Just a stub for now, I'll try to expand this later.
Bit related: slimphp/Slim#2780
I was trying to do this:
assertValidRegistrationRequest
is a public (non-static) method with a valid middleware signature:This however results in a
My current workaround/solution is:
where
$callableResolver
is of typeDI\Bridge\Slim\CallableResolver
. This however feels very verbose.but this is ugly.
Is it too extreme to override the
MiddlewareDispatcher
here to allow these notations? Otherwise the problem needs to be fixed in Slim's MiddlewareDispatcher to defer all middleware notations to the CallableResolver instead of onlystring
variants.The text was updated successfully, but these errors were encountered: