From 8dcd99c385e98cfa4b20f2b7fbe04cddb71eb130 Mon Sep 17 00:00:00 2001 From: Sabina Talipova Date: Fri, 9 Dec 2022 16:24:48 +1300 Subject: [PATCH] DEP PHP Support in CMS5 --- _config.php | 3 --- composer.json | 10 +++++----- src/Controllers/CommentingController.php | 8 +------- tests/CommentsExtensionTest.php | 4 ++-- 4 files changed, 8 insertions(+), 17 deletions(-) delete mode 100644 _config.php diff --git a/_config.php b/_config.php deleted file mode 100644 index 2fcbaa6f..00000000 --- a/_config.php +++ /dev/null @@ -1,3 +0,0 @@ -setMaxAge(0); @@ -528,7 +524,5 @@ public function redirectBack() if (Director::is_site_url($url)) { return $this->redirect($url); } - - return false; } } diff --git a/tests/CommentsExtensionTest.php b/tests/CommentsExtensionTest.php index 142f0f1e..36c6888b 100644 --- a/tests/CommentsExtensionTest.php +++ b/tests/CommentsExtensionTest.php @@ -232,7 +232,7 @@ public function testCanModerateComments() public function testGetCommentRSSLink() { - Config::modify()->merge('SilverStripe\\Control\\Director', 'alternate_base_url', 'http://unittesting.local'); + Config::modify()->merge('SilverStripe\\Control\\Director', 'alternate_base_url', ['http://unittesting.local']); $item = $this->objFromFixture(CommentableItem::class, 'first'); $link = $item->getCommentRSSLink(); @@ -241,7 +241,7 @@ public function testGetCommentRSSLink() public function testGetCommentRSSLinkPage() { - Config::modify()->merge('SilverStripe\\Control\\Director', 'alternate_base_url', 'http://unittesting.local'); + Config::modify()->merge('SilverStripe\\Control\\Director', 'alternate_base_url', ['http://unittesting.local']); $item = $this->objFromFixture(CommentableItem::class, 'first'); $page = $item->getCommentRSSLinkPage();