Compare commits

..

4 Commits

Author SHA1 Message Date
Guy Sartorelli
840a0db70c
ENH Use symfony/validation logic 2024-09-25 10:31:09 +12:00
Guy Sartorelli
4b8f7586d2
API Use new names for renamed classes (#258) 2024-09-23 14:40:25 +12:00
github-actions
4488096f6e Merge branch '5' into 6 2024-09-21 23:58:16 +00:00
Guy Sartorelli
f7ee5d7fe8
ENH Don't use deprecated method (#259) 2024-09-19 14:05:01 +12:00
11 changed files with 14 additions and 34 deletions

View File

@ -11,7 +11,7 @@ use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Forms\Form;
use SilverStripe\ORM\ValidationResult;
use SilverStripe\Core\Validation\ValidationResult;
use SilverStripe\Security\Security;
use SilverStripe\Core\Extension;

View File

@ -23,14 +23,14 @@ use SilverStripe\Forms\ListboxField;
use SilverStripe\Forms\LiteralField;
use SilverStripe\Forms\OptionsetField;
use SilverStripe\Forms\ReadonlyField;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\HasManyList;
use SilverStripe\ORM\ManyManyList;
use SilverStripe\ORM\FieldType\DBDate;
use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\ORM\SS_List;
use SilverStripe\Model\List\SS_List;
use SilverStripe\Security\Group;
use SilverStripe\Security\Member;
use SilverStripe\Security\Permission;

View File

@ -14,7 +14,7 @@ use SilverStripe\Forms\FormAction;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\TextareaField;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\ValidationException;
use SilverStripe\Core\Validation\ValidationException;
use SilverStripe\Security\Security;
class ReviewContentHandler

View File

@ -13,7 +13,7 @@ use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\DateField;
use SilverStripe\Forms\FieldList;
use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\ORM\SS_List;
use SilverStripe\Model\List\SS_List;
use SilverStripe\Reports\Report;
use SilverStripe\Security\Security;
use SilverStripe\SiteConfig\SiteConfig;

View File

@ -9,9 +9,9 @@ use SilverStripe\ContentReview\Compatibility\ContentReviewCompatability;
use SilverStripe\Core\ClassInfo;
use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\FieldList;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\SS_List;
use SilverStripe\Model\List\SS_List;
use SilverStripe\Reports\Report;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Versioned\Versioned;

View File

@ -8,13 +8,13 @@ use SilverStripe\ContentReview\Compatibility\ContentReviewCompatability;
use SilverStripe\Control\Email\Email;
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Dev\BuildTask;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\ORM\SS_List;
use SilverStripe\Model\List\SS_List;
use SilverStripe\Security\Member;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\View\ArrayData;
use SilverStripe\Model\ArrayData;
use SilverStripe\View\SSViewer;
/**

View File

@ -16,7 +16,7 @@ class ContentReviewOwnerMigrationTask extends BuildTask
public function __construct()
{
parent::__construct();
Deprecation::withNoReplacement(function () {
Deprecation::withSuppressedNotice(function () {
Deprecation::notice(
'5.4.0',
'Will be removed without equivalent functionality to replace it',

View File

@ -133,26 +133,6 @@ class ContentReviewNotificationTest extends SapphireTest
DBDatetime::clear_mock_now();
}
/**
* Test that provided email is valid
*/
public function testIsValidEmail()
{
$class = new ReflectionClass(ContentReviewEmails::class);
$method = $class->getMethod('isValidEmail');
$method->setAccessible(true);
$member = $this->objFromFixture(Member::class, 'author');
$task = new ContentReviewEmails();
$this->assertTrue($method->invokeArgs($task, [$member->Email]));
$this->assertTrue($method->invokeArgs($task, ['correct.email@example.com']));
$this->assertFalse($method->invokeArgs($task, [null]));
$this->assertFalse($method->invokeArgs($task, ['broken.email']));
$this->assertFalse($method->invokeArgs($task, ['broken@email']));
}
/**
* Deletes all pages except those passes in to the $ids parameter
*

View File

@ -14,7 +14,7 @@ use SilverStripe\Forms\Form;
use SilverStripe\Forms\HiddenField;
use SilverStripe\Forms\TextareaField;
use SilverStripe\Security\Member;
use SilverStripe\ORM\ValidationException;
use SilverStripe\Core\Validation\ValidationException;
class ReviewContentHandlerTest extends SapphireTest
{

View File

@ -17,7 +17,7 @@ use SilverStripe\Security\Group;
use SilverStripe\Security\Member;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Versioned\Versioned;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\Dev\FunctionalTest;
use SilverStripe\ContentReview\Tests\SiteTreeContentReviewTestPage;

View File

@ -4,7 +4,7 @@ namespace SilverStripe\ContentReview\Tests;
use Page;
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\ArrayList;
use SilverStripe\Model\List\ArrayList;
/**
* Mock Page class with canReviewContent method to return false on first call