From 7d16e27a8b30479dd9709e55b9af9fd4f5a6c281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Arbousset?= Date: Thu, 19 Feb 2026 14:49:55 +0100 Subject: [PATCH] fix: The PathSegmentNameGeneratorInterface::getSegmentName method needs a collection argument --- .../Factory/UriTemplateResourceMetadataCollectionFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resource/Factory/UriTemplateResourceMetadataCollectionFactory.php b/Resource/Factory/UriTemplateResourceMetadataCollectionFactory.php index feace7c..f1321f5 100644 --- a/Resource/Factory/UriTemplateResourceMetadataCollectionFactory.php +++ b/Resource/Factory/UriTemplateResourceMetadataCollectionFactory.php @@ -95,7 +95,7 @@ public function create(string $resourceClass): ResourceMetadataCollection private function generateUriTemplate(HttpOperation $operation): string { - $uriTemplate = $operation->getUriTemplate() ?? \sprintf('/%s', $this->pathSegmentNameGenerator->getSegmentName($operation->getShortName())); + $uriTemplate = $operation->getUriTemplate() ?? \sprintf('/%s', $this->pathSegmentNameGenerator->getSegmentName($operation->getShortName(), $operation instanceof CollectionOperationInterface))); $uriVariables = $operation->getUriVariables() ?? []; if (str_ends_with($uriTemplate, '{._format}')) {