Closed
Description
Symfony version(s) affected: 4.1.0
Description & how to reproduce
Having the following routing defined:
sylius_admin_product_variant_bulk_delete:
path: /bulk-delete
methods: [DELETE]
defaults:
_controller: sylius.controller.product_variant:bulkDeleteAction
_sylius: ["sylius specific config..."]
sylius_admin_product_variant_delete:
path: /{id}
methods: [DELETE]
defaults:
_controller: sylius.controller.product_variant:deleteAction
_sylius: ["sylius specific config..."]
After upgrading from the most recent 4.0.x to 4.1.0, the router started to match the second route for a DELETE /bulk-delete
request, treating bulk-delete
as {id}
. As mentioned in https://symfony.com/doc/current/routing/requirements.html, the earliest route should be matched.