From c76b18ba502b9d24adb85b8a638e89bbc60ec139 Mon Sep 17 00:00:00 2001 From: kjkooistra-youwe Date: Wed, 2 Sep 2020 12:16:37 +0200 Subject: [PATCH] Update version match documentation Matching version argument does not work, as it's null. Use requirements instead. --- Resources/doc/versioning.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Resources/doc/versioning.rst b/Resources/doc/versioning.rst index bfaae5f07..b7b4c280d 100644 --- a/Resources/doc/versioning.rst +++ b/Resources/doc/versioning.rst @@ -152,10 +152,11 @@ That's it, it should work now. How to match a specific version in my routing ? ----------------------------------------------- -You can use conditions on your request to check for the version that was determined: +You can use requirements on your request to check for the version that was determined: .. code-block:: yaml my_route: # ... - condition: "request.attributes.get('version') == 'v2'" + requirements: + version: v1