DEP PHP Support in CMS5

This commit is contained in:
Sabina Talipova 2022-12-09 16:24:48 +13:00
parent 5d044bd6eb
commit d6b44f2385
4 changed files with 8 additions and 17 deletions

View File

@ -1,3 +0,0 @@
<?php
\SilverStripe\Dev\Deprecation::notification_version('3.0', 'comments');

View File

@ -13,9 +13,9 @@
}
],
"require": {
"php": "^7.4 || ^8.0",
"silverstripe/framework": "^4.10",
"colymba/gridfield-bulk-editing-tools": "^3.0.0-beta4"
"php": "^8.1",
"silverstripe/framework": "^5",
"colymba/gridfield-bulk-editing-tools": "^4"
},
"suggest": {
"ezyang/htmlpurifier": "Standards compliant HTML filter written in PHP",
@ -23,8 +23,8 @@
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.0",
"ezyang/htmlpurifier": "^4.14"
"squizlabs/php_codesniffer": "^3",
"ezyang/htmlpurifier": "^4.16"
},
"extra": {
"expose": [

View File

@ -493,11 +493,7 @@ class CommentingController extends Controller
return $form;
}
/**
* @return HTTPResponse|false
*/
public function redirectBack()
public function redirectBack(): HTTPResponse
{
// Don't cache the redirect back ever
HTTPCacheControlMiddleware::singleton()->setMaxAge(0);
@ -528,7 +524,5 @@ class CommentingController extends Controller
if (Director::is_site_url($url)) {
return $this->redirect($url);
}
return false;
}
}

View File

@ -232,7 +232,7 @@ class CommentsExtensionTest extends FunctionalTest
public function testGetCommentRSSLink()
{
Config::modify()->merge('SilverStripe\\Control\\Director', 'alternate_base_url', 'http://unittesting.local');
Config::modify()->set('SilverStripe\\Control\\Director', 'alternate_base_url', 'http://unittesting.local');
$item = $this->objFromFixture(CommentableItem::class, 'first');
$link = $item->getCommentRSSLink();
@ -241,7 +241,7 @@ class CommentsExtensionTest extends FunctionalTest
public function testGetCommentRSSLinkPage()
{
Config::modify()->merge('SilverStripe\\Control\\Director', 'alternate_base_url', 'http://unittesting.local');
Config::modify()->set('SilverStripe\\Control\\Director', 'alternate_base_url', 'http://unittesting.local');
$item = $this->objFromFixture(CommentableItem::class, 'first');
$page = $item->getCommentRSSLinkPage();