From dc6625d9a0fd22aa1e9f9b8214e403c83c4e7013 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:36:30 +1200 Subject: [PATCH] API Use new names for renamed classes (#474) --- src/ChangeSet.php | 2 +- src/ChangeSetItem.php | 4 ++-- src/DataDifferencer.php | 8 ++++---- src/GridFieldArchiveAction.php | 8 ++++---- src/GridFieldRestoreAction.php | 4 ++-- src/RecursivePublishable.php | 4 ++-- src/RestoreAction.php | 2 +- src/Versioned.php | 2 +- src/VersionedGridFieldItemRequest.php | 6 +++--- src/Versioned_Version.php | 6 +++--- tests/php/GridFieldRestoreActionTest.php | 2 +- tests/php/VersionedGridFieldItemRequestTest.php | 2 +- tests/php/VersionedTest.php | 2 +- 13 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/ChangeSet.php b/src/ChangeSet.php index d0551346..c3e5f315 100644 --- a/src/ChangeSet.php +++ b/src/ChangeSet.php @@ -16,7 +16,7 @@ use SilverStripe\ORM\FieldType\DBDatetime; use SilverStripe\ORM\HasManyList; use SilverStripe\ORM\UnexpectedDataException; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Security\Member; use SilverStripe\Security\Permission; use SilverStripe\Security\Security; diff --git a/src/ChangeSetItem.php b/src/ChangeSetItem.php index 2a1b0880..3bb83bd0 100644 --- a/src/ChangeSetItem.php +++ b/src/ChangeSetItem.php @@ -7,12 +7,12 @@ use LogicException; use SilverStripe\Assets\Thumbnail; use SilverStripe\Control\Controller; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\CMSPreviewable; use SilverStripe\ORM\DataList; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\ManyManyList; -use SilverStripe\ORM\SS_List; +use SilverStripe\Model\List\SS_List; use SilverStripe\ORM\UnexpectedDataException; use SilverStripe\Security\Member; use SilverStripe\Security\Permission; diff --git a/src/DataDifferencer.php b/src/DataDifferencer.php index 0f589e68..b216cc31 100644 --- a/src/DataDifferencer.php +++ b/src/DataDifferencer.php @@ -6,11 +6,11 @@ use SilverStripe\Core\Convert; use SilverStripe\Dev\Deprecation; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\FieldType\DBField; -use SilverStripe\View\ArrayData; +use SilverStripe\Model\ArrayData; use SilverStripe\View\Parsers\HtmlDiff; -use SilverStripe\View\ViewableData; +use SilverStripe\Model\ModelData; /** * Utility class to render views of the differences between two data objects (or two versions of the @@ -45,7 +45,7 @@ * $diff->ignoreFields('AuthorID', 'Status'); * */ -class DataDifferencer extends ViewableData +class DataDifferencer extends ModelData { protected $fromRecord; protected $toRecord; diff --git a/src/GridFieldArchiveAction.php b/src/GridFieldArchiveAction.php index 4c1a5153..3a120dd0 100644 --- a/src/GridFieldArchiveAction.php +++ b/src/GridFieldArchiveAction.php @@ -10,8 +10,8 @@ use SilverStripe\Forms\GridField\GridField_FormAction; use SilverStripe\Forms\GridField\GridFieldDeleteAction; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\ValidationException; -use SilverStripe\View\ViewableData; +use SilverStripe\Core\Validation\ValidationException; +use SilverStripe\Model\ModelData; /** * This class is a {@link GridField} component that replaces the delete action @@ -191,12 +191,12 @@ public function handleAction(GridField $gridField, $actionName, $arguments, $dat * Returns the GridField_FormAction if archive can be performed * * @param GridField $gridField - * @param ViewableData $record + * @param ModelData $record * @return GridField_FormAction|null */ public function getArchiveAction($gridField, $record) { - /** @var ViewableData|Versioned $record */ + /** @var ModelData|Versioned $record */ if (!$record->has_extension(Versioned::class) || !$record->canDelete()) { return null; } diff --git a/src/GridFieldRestoreAction.php b/src/GridFieldRestoreAction.php index 8564fd66..2ea82cbb 100644 --- a/src/GridFieldRestoreAction.php +++ b/src/GridFieldRestoreAction.php @@ -9,8 +9,8 @@ use SilverStripe\Forms\GridField\GridField_FormAction; use SilverStripe\Forms\GridField\GridFieldFooter; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\ValidationException; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationException; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Versioned\RestoreAction; /** diff --git a/src/RecursivePublishable.php b/src/RecursivePublishable.php index bb52cf02..014ba676 100644 --- a/src/RecursivePublishable.php +++ b/src/RecursivePublishable.php @@ -6,12 +6,12 @@ use InvalidArgumentException; use SilverStripe\Core\ClassInfo; use SilverStripe\Core\Config\Config; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\Core\Extension; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\FieldType\DBDatetime; use SilverStripe\ORM\Queries\SQLUpdate; -use SilverStripe\ORM\SS_List; +use SilverStripe\Model\List\SS_List; /** * Provides owns / owned_by and recursive publishing API for all objects. diff --git a/src/RestoreAction.php b/src/RestoreAction.php index 678cb6ba..604b2d8e 100644 --- a/src/RestoreAction.php +++ b/src/RestoreAction.php @@ -3,7 +3,7 @@ namespace SilverStripe\Versioned; use SilverStripe\ORM\Hierarchy\Hierarchy; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Versioned\Versioned; /** diff --git a/src/Versioned.php b/src/Versioned.php index f95f38ee..4bf17645 100644 --- a/src/Versioned.php +++ b/src/Versioned.php @@ -15,7 +15,7 @@ use SilverStripe\Core\Resettable; use SilverStripe\Dev\Deprecation; use SilverStripe\Forms\FieldList; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataList; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataQuery; diff --git a/src/VersionedGridFieldItemRequest.php b/src/VersionedGridFieldItemRequest.php index ffcf835a..fdcefabf 100644 --- a/src/VersionedGridFieldItemRequest.php +++ b/src/VersionedGridFieldItemRequest.php @@ -12,11 +12,11 @@ use SilverStripe\Forms\LiteralField; use SilverStripe\Forms\Tab; use SilverStripe\Forms\TabSet; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\FieldType\DBField; -use SilverStripe\ORM\ValidationResult; -use SilverStripe\View\ArrayData; +use SilverStripe\Core\Validation\ValidationResult; +use SilverStripe\Model\ArrayData; use SilverStripe\View\SSViewer; /** diff --git a/src/Versioned_Version.php b/src/Versioned_Version.php index 5c2789d6..3c62cde9 100644 --- a/src/Versioned_Version.php +++ b/src/Versioned_Version.php @@ -4,16 +4,16 @@ use SilverStripe\Core\ClassInfo; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\SS_List; +use SilverStripe\Model\List\SS_List; use SilverStripe\Security\Member; -use SilverStripe\View\ViewableData; +use SilverStripe\Model\ModelData; /** * Represents a single version of a record. * * @see Versioned */ -class Versioned_Version extends ViewableData +class Versioned_Version extends ModelData { /** * @var array diff --git a/tests/php/GridFieldRestoreActionTest.php b/tests/php/GridFieldRestoreActionTest.php index 20a0a44c..51a45e9a 100644 --- a/tests/php/GridFieldRestoreActionTest.php +++ b/tests/php/GridFieldRestoreActionTest.php @@ -13,7 +13,7 @@ use SilverStripe\Forms\GridField\GridField; use SilverStripe\Forms\GridField\GridFieldConfig; use SilverStripe\ORM\DataList; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Security\Member; use SilverStripe\Security\Security; use SilverStripe\Security\SecurityToken; diff --git a/tests/php/VersionedGridFieldItemRequestTest.php b/tests/php/VersionedGridFieldItemRequestTest.php index fe6768fb..4450e5cc 100644 --- a/tests/php/VersionedGridFieldItemRequestTest.php +++ b/tests/php/VersionedGridFieldItemRequestTest.php @@ -9,7 +9,7 @@ use SilverStripe\Forms\GridField\GridField; use SilverStripe\Forms\GridField\GridFieldDetailForm; use SilverStripe\Forms\LiteralField; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataObject; use SilverStripe\Versioned\Tests\VersionedGridFieldItemRequestTest\UnversionedObject; use SilverStripe\Versioned\Tests\VersionedGridFieldItemRequestTest\UnversionedOwner; diff --git a/tests/php/VersionedTest.php b/tests/php/VersionedTest.php index 4b667ae1..3539fd78 100644 --- a/tests/php/VersionedTest.php +++ b/tests/php/VersionedTest.php @@ -16,7 +16,7 @@ use SilverStripe\Core\Injector\Injector; use SilverStripe\Dev\SapphireTest; use SilverStripe\Dev\TestSession; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataObjectSchema; use SilverStripe\ORM\DB;