fix(symfony): pass operation priority to the route collection#8304
fix(symfony): pass operation priority to the route collection#8304soyuka wants to merge 1 commit into
Conversation
ApiLoader dropped Operation::getPriority(), so route ordering ignored the configured priority. Pass it as the third RouteCollection::add() argument. Fixes api-platform#8135
|
Closing this — it is the wrong fix. Operation priority is already honored on 4.3 via Passing The reporter's report was against 4.0, which predates #6206. The path described is already fixed on 4.3. |
Summary
ApiLoader::load()called$routeCollection->add($operationName, $route)without passing the operation priority, soOperation::getPriority()was silently dropped and route ordering ignored any configured priority.Reproduction
An operation declared with a higher
prioritywas registered in theRouteCollectionwith priority 0, so it was not sorted ahead of other routes as expected.Test plan
tests/Symfony/Routingsuite still passes locally (31/31).Fixes #8135