Repository navigation
Conversation
Feedback on the known limitationsany() routes don't match QUERYI don't see many use cases for routes being open to all request methods, so this should not be an issue. CORS: mezzio-cors 1.16.0 only accepts a fixed list of methodsDoes this mean that if we try to configure PHP built-in server: php -S (PHP 8.5.12) answers QUERY with 501 Not ImplementedAs long as Apache/Nginx are able to handle these requests, I don't see an issue with this. |
|
@Howriq should we extend mezzio-cors maybe ? |
we can't easily extend the library, because its classes are locked against overriding (final).
|
|
I don;'t get the meaning of this comment |
It works. That bullet was not a real issue, so I'm removing it.
|
|
related to php-fig/http-message-util#22 |
Added a
query()method toRouteCollectorandRouteGroupCollectorfor registering routes that match the HTTPQUERYmethod (RFC 10008).Backward compatibility
Adding
query()toRouteCollectorInterfaceandRouteGroupCollectorInterfaceis a breaking change for third-party classes that implement these interfaces. Code that only calls the collectors is not affected.Known limitations (outside this package)
any()routes don't matchQUERY. mezzio-fastroute expandsany()routes to its fixedHTTP_METHODS_STANDARDlist, which doesn't includeQUERY. Routes that should answerQUERYmust be registered withquery()orroute(..., ['QUERY']).CorsMetadata::ALLOWED_REQUEST_METHODS), so cross-originQUERYrequests and their preflights fail with a 500. This needs a fix in mezzio-cors.php -S(PHP 8.5.12) answersQUERYwith501 Not Implemented, so these routes can't be tested withcomposer serve. Apache handlesQUERYcorrectly (tested); nginx reportedly does too.