diff --git a/RouteDescriber/RouteMetadataDescriber.php b/RouteDescriber/RouteMetadataDescriber.php index 68fe1e6..ed67dd2 100644 --- a/RouteDescriber/RouteMetadataDescriber.php +++ b/RouteDescriber/RouteMetadataDescriber.php @@ -40,7 +40,7 @@ final class RouteMetadataDescriber implements RouteDescriberInterface } if (isset($requirements[$pathVariable])) { - $parameter->setFormat($requirements[$pathVariable]); + $parameter->setPattern($requirements[$pathVariable]); } } } diff --git a/Tests/Functional/FunctionalTest.php b/Tests/Functional/FunctionalTest.php index 5d0380e..f72b5fe 100644 --- a/Tests/Functional/FunctionalTest.php +++ b/Tests/Functional/FunctionalTest.php @@ -113,7 +113,8 @@ class FunctionalTest extends WebTestCase $parameter = $parameters->get('user', 'path'); $this->assertTrue($parameter->getRequired()); $this->assertEquals('string', $parameter->getType()); - $this->assertEquals('/foo/', $parameter->getFormat()); + $this->assertEquals('/foo/', $parameter->getPattern()); + $this->assertEmpty($parameter->getFormat()); } public function testFOSRestAction()