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
Make the $prefix parameter optional and try to call getPathPrefix if it exists as a method, but sadly there is no way (other than reflection) to ensure that the method accepts no parameters and returns a string.
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Preflight Checklist
Problem Description
#86 introduced custom server path prefixes as defined by the v7 specification.
It also introduced a new method called
getPathPrefix
, replacing thePATH_PREFIX
constant as a better alternative for registering servers in a router.With the introduction of this method, the signature of
\Twirp\Server::registerServer
becomes somewhat redundant:(Now that I think of it: it was somewhat redundant before too because of the
PATH_PREFIX
constant)Proposed Solution
Simplify the definition of
registerServer
:This is probably not enough thought as the
RequestHandlerInterface
itself doesn't implementgetPathPrefix
, so we need a custom interface (see #88):Alternatives Considered
Make the
$prefix
parameter optional and try to callgetPathPrefix
if it exists as a method, but sadly there is no way (other than reflection) to ensure that the method accepts no parameters and returns a string.Additional Information
No response
The text was updated successfully, but these errors were encountered: