From cd4c310e1f10d9fe225dceca99484603f3c6c106 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Tue, 30 Aug 2022 13:18:41 +1200 Subject: [PATCH] ENH Stop using deprecated Versioned methods (#121) --- code/TestPage.php | 4 ++-- code/TestRegistryPage.php | 2 +- code/tasks/FTPageMakerTask.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/TestPage.php b/code/TestPage.php index d8f0931..40d2ae7 100644 --- a/code/TestPage.php +++ b/code/TestPage.php @@ -50,7 +50,7 @@ class TestPage extends Page implements \TestPageInterface $parent = static::getOrCreateParentPage(); $page->ParentID = $parent->ID; $page->write(); - $page->publish('Stage', 'Live'); + $page->copyVersionToStage('Stage', 'Live'); }); } } @@ -72,7 +72,7 @@ class TestPage extends Page implements \TestPageInterface ) ); $parent->write(); - $parent->doPublish(); + $parent->publishRecursive(); } }); diff --git a/code/TestRegistryPage.php b/code/TestRegistryPage.php index 390f1a6..8cdc44a 100644 --- a/code/TestRegistryPage.php +++ b/code/TestRegistryPage.php @@ -21,7 +21,7 @@ class TestRegistryPage extends RegistryPage $page->ParentID = $parent->ID; $page->DataClass = TestRegistryDataObject::class; $page->write(); - $page->publish('Stage', 'Live'); + $page->copyVersionToStage('Stage', 'Live'); }); } } diff --git a/code/tasks/FTPageMakerTask.php b/code/tasks/FTPageMakerTask.php index fa2eb2a..8ac0d71 100644 --- a/code/tasks/FTPageMakerTask.php +++ b/code/tasks/FTPageMakerTask.php @@ -82,7 +82,7 @@ class FTPageMakerTask extends BuildTask $page->ParentID = $parentID; $page->Title = "Test page {$fullPrefix}"; $page->write(); - $page->publish('Stage', 'Live'); + $page->copyVersionToStage('Stage', 'Live'); echo "Created '$page->Title' ($page->ClassName)\n";