You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@trigger_error(sprintf('Passing an object as the route name is deprecated in symfony-cmf/Routing v2.3 and will not work in Symfony 5.0. Pass the `RouteObjectInterface::OBJECT_BASED_ROUTE_NAME` constant as the route name and the object as "%s" parameter in the parameters array.', RouteObjectInterface::ROUTE_OBJECT), E_USER_DEPRECATED);
222
+
@trigger_error('Passing an object as route name is deprecated since version 2.3 and will not work in Symfony 5.0. Pass the `RouteObjectInterface::OBJECT_BASED_ROUTE_NAME` as route name and the object in the parameters with key `RouteObjectInterface::ROUTE_OBJECT`.', E_USER_DEPRECATED);
@trigger_error('Passing an object as route name is deprecated since version 2.3 and will not work in Symfony 5.0. Pass the `RouteObjectInterface::OBJECT_BASED_ROUTE_NAME` as route name and the object in the parameters with key `RouteObjectInterface::ROUTE_OBJECT`.', E_USER_DEPRECATED);
if ($nameinstanceof RouteReferrersReadInterface) {
175
+
@trigger_error('Passing an object as route name is deprecated since version 2.3 and will not work in Symfony 5.0. Pass the `RouteObjectInterface::OBJECT_BASED_ROUTE_NAME` as route name and the object in the parameters with key `RouteObjectInterface::ROUTE_OBJECT`.', E_USER_DEPRECATED);
@trigger_error(sprintf('Passing an object as the route name is deprecated in symfony-cmf/Routing v2.3 and will not work in Symfony 5.0. Pass the `RouteObjectInterface::OBJECT_BASED_ROUTE_NAME` constant as the route name and the object as "%s" parameter in the parameters array.', RouteObjectInterface::ROUTE_OBJECT), E_USER_DEPRECATED);
178
+
@trigger_error('Passing an object as route name is deprecated since version 2.3 and will not work in Symfony 5.0. Pass the `RouteObjectInterface::OBJECT_BASED_ROUTE_NAME` as route name and the object in the parameters with key `RouteObjectInterface::ROUTE_OBJECT', E_USER_DEPRECATED);
* This generator is able to handle more than string route names as symfony
18
-
* core supports them.
19
-
*
20
-
* @deprecated The "Symfony\Cmf\Component\Routing\VersatileGeneratorInterface" is deprecated in symfony-cmf/Routing v2.3 and will be removed in symfony-cmf/Routing v3.O. Use the "_route_object" parameter instead to handle route objects
17
+
* This generator can provide additional information about the route that we wanted to generate.
Copy file name to clipboardExpand all lines: tests/Unit/Routing/ChainRouterTest.php
+14-8Lines changed: 14 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -617,12 +617,12 @@ public function testGenerateNotFound()
617
617
* Route is an object but no versatile generator around to do the debug message.
618
618
*
619
619
* @group legacy
620
-
* @expectedDeprecation Passing an object as the route name is deprecated in symfony-cmf/Routing v2.3 and will not work in Symfony 5.0. Pass the `RouteObjectInterface::OBJECT_BASED_ROUTE_NAME` constant as the route name and the object as "_route_object" parameter in the parameters array.
620
+
* @expectedDeprecation Passing an object as route name is deprecated since version 2.3 and will not work in Symfony 5.0. Pass the `RouteObjectInterface::OBJECT_BASED_ROUTE_NAME` as route name and the object in the parameters with key `RouteObjectInterface::ROUTE_OBJECT`.
621
621
*/
622
622
publicfunctiontestGenerateObjectNotFound()
623
623
{
624
624
if (!class_exists(ObjectRouteLoader::class)) {
625
-
$this->markTestSkipped('Skip this test on >= sf5. This will throw a \TypeError.');
625
+
$this->markTestSkipped('Symfony 5 would throw a TypeError.');
626
626
}
627
627
628
628
$name = new \stdClass();
@@ -645,12 +645,12 @@ public function testGenerateObjectNotFound()
645
645
* A versatile router will generate the debug message.
646
646
*
647
647
* @group legacy
648
-
* @expectedDeprecation Passing an object as the route name is deprecated in symfony-cmf/Routing v2.3 and will not work in Symfony 5.0. Pass the `RouteObjectInterface::OBJECT_BASED_ROUTE_NAME` constant as the route name and the object as "_route_object" parameter in the parameters array.
648
+
* @expectedDeprecation Passing an object as route name is deprecated since version 2.3 and will not work in Symfony 5.0. Pass the `RouteObjectInterface::OBJECT_BASED_ROUTE_NAME` as route name and the object in the parameters with key `RouteObjectInterface::ROUTE_OBJECT`.
$this->markTestSkipped('Skip this test on >= sf5. This will throw a \TypeError.');
653
+
$this->markTestSkipped('Symfony 5 would throw a TypeError.');
654
654
}
655
655
656
656
$name = new \stdClass();
@@ -681,12 +681,12 @@ public function testGenerateObjectNotFoundVersatile()
681
681
682
682
/**
683
683
* @group legacy
684
-
* @expectedDeprecation Passing an object as the route name is deprecated in symfony-cmf/Routing v2.3 and will not work in Symfony 5.0. Pass the `RouteObjectInterface::OBJECT_BASED_ROUTE_NAME` constant as the route name and the object as "_route_object" parameter in the parameters array.
684
+
* @expectedDeprecation Passing an object as route name is deprecated since version 2.3 and will not work in Symfony 5.0. Pass the `RouteObjectInterface::OBJECT_BASED_ROUTE_NAME` as route name and the object in the parameters with key `RouteObjectInterface::ROUTE_OBJECT`.
685
685
*/
686
686
publicfunctiontestGenerateObjectName()
687
687
{
688
688
if (!class_exists(ObjectRouteLoader::class)) {
689
-
$this->markTestSkipped('Skip this test on >= sf5. This will throw a \TypeError.');
689
+
$this->markTestSkipped('Symfony 5 would throw a TypeError.');
690
690
}
691
691
692
692
$name = new \stdClass();
@@ -718,6 +718,9 @@ public function testGenerateObjectName()
718
718
$this->assertEquals($name, $result);
719
719
}
720
720
721
+
/**
722
+
* This test currently triggers a deprecation notice because of ChainRouter BC.
0 commit comments