Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 5669d6f

Browse files
committed
Fix deprecations
1 parent 724db6a commit 5669d6f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Adapter/PhpcrOdmAdapter.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function createAutoRoute($uri, $contentDocument, $autoRouteTag)
127127

128128
if (null === $document) {
129129
$document = new Generic();
130-
$document->setParent($parentDocument);
130+
$document->setParentDocument($parentDocument);
131131
$document->setNodeName($segment);
132132
$this->dm->persist($document);
133133
}
@@ -160,7 +160,7 @@ public function createAutoRoute($uri, $contentDocument, $autoRouteTag)
160160
$headRoute = new $this->autoRouteFqcn();
161161
$headRoute->setContent($contentDocument);
162162
$headRoute->setName($headName);
163-
$headRoute->setParent($document);
163+
$headRoute->setParentDocument($document);
164164
$headRoute->setAutoRouteTag($autoRouteTag);
165165
$headRoute->setType(AutoRouteInterface::TYPE_PRIMARY);
166166

Tests/Functional/EventListener/AutoRouteListenerTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ public function testLeaveRedirectChildrenMigrations()
445445
$parentRoute = $this->getDm()->find(null, '/test/auto-route/seo-articles/hai');
446446
$childRoute = new AutoRoute();
447447
$childRoute->setName('foo');
448-
$childRoute->setParent($parentRoute);
448+
$childRoute->setParentDocument($parentRoute);
449449
$this->getDm()->persist($childRoute);
450450
$this->getDm()->flush();
451451

@@ -476,7 +476,7 @@ public function testMaintainRedirectParentPath()
476476

477477
$parentRoute = $this->getDm()->find(null, '/test/auto-route');
478478
$autoRoute = $this->getDm()->find(null, '/test/auto-route/seo-articles/hai');
479-
$autoRoute->setParent($parentRoute);
479+
$autoRoute->setParentDocument($parentRoute);
480480
$this->getDm()->persist($autoRoute);
481481
$this->getDm()->flush();
482482

Tests/Unit/Adapter/PhpcrOdmAdapterTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function testCreateAutoRoute($path, $expectedParentPath, $expectedName, $
121121
$this->assertInstanceOf('Symfony\Cmf\Bundle\RoutingAutoBundle\Model\AutoRoute', $res);
122122
$this->assertEquals($expectedName, $res->getName());
123123

124-
$this->assertSame($this->parentRoute, $res->getParent());
124+
$this->assertSame($this->parentRoute, $res->getParentDocument());
125125
$this->assertSame($this->contentDocument, $res->getContent());
126126
}
127127

0 commit comments

Comments
 (0)