From 18e184413275f528b968f7e0ba3c1630b49f0503 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Tue, 17 Sep 2024 13:44:28 +1200 Subject: [PATCH] API Use new names for renamed classes --- src/Extension/FluentCMSMainExtension.php | 2 +- src/Extension/FluentExtension.php | 4 ++-- src/Extension/FluentGridFieldExtension.php | 2 +- src/Extension/FluentLeftAndMainExtension.php | 2 +- src/Extension/FluentMemberExtension.php | 2 +- src/Extension/Traits/FluentAdminTrait.php | 2 +- src/Extension/Traits/FluentObjectTrait.php | 2 +- src/Forms/CopyLocaleAction.php | 2 +- src/Forms/DeleteAllLocalesAction.php | 2 +- src/Forms/GroupActionMenu.php | 2 +- src/Model/CachableModel.php | 2 +- src/Model/Domain.php | 2 +- src/Model/LocalDateTime.php | 4 ++-- src/Model/Locale.php | 2 +- src/Model/RecordLocale.php | 4 ++-- src/Search/FluentSearchForm.php | 4 ++-- src/Service/CopyToLocaleService.php | 2 +- src/Task/InitialDataObjectLocalisationTask.php | 4 ++-- tests/php/Extension/FluentAdminTraitTest.php | 2 +- tests/php/Extension/FluentExtensionTest.php | 2 +- tests/php/Extension/FluentSiteTreeExtensionTest.php | 4 ++-- tests/php/Extension/FluentVersionedExtensionTest.php | 2 +- tests/php/Model/Delete/DeleteRecordPolicyTest.php | 2 +- tests/php/Task/InitialPageLocalisationTaskTest.php | 2 +- 24 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/Extension/FluentCMSMainExtension.php b/src/Extension/FluentCMSMainExtension.php index 396a7b8e..3a7ef90f 100644 --- a/src/Extension/FluentCMSMainExtension.php +++ b/src/Extension/FluentCMSMainExtension.php @@ -9,7 +9,7 @@ use SilverStripe\Core\Extension; use SilverStripe\Forms\Form; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Versioned\Versioned; use TractorCow\Fluent\Forms\CopyLocaleAction; diff --git a/src/Extension/FluentExtension.php b/src/Extension/FluentExtension.php index a076d9ab..eeffef9c 100644 --- a/src/Extension/FluentExtension.php +++ b/src/Extension/FluentExtension.php @@ -12,7 +12,7 @@ use SilverStripe\Forms\FormField; use SilverStripe\Forms\GridField\GridField_ActionMenuItem; use SilverStripe\Forms\GridField\GridFieldConfig; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataQuery; use SilverStripe\ORM\DB; @@ -23,7 +23,7 @@ use SilverStripe\ORM\FieldType\DBVarchar; use SilverStripe\ORM\Queries\SQLConditionGroup; use SilverStripe\ORM\Queries\SQLSelect; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Security\Permission; use SilverStripe\Versioned\Versioned; use SilverStripe\View\HTML; diff --git a/src/Extension/FluentGridFieldExtension.php b/src/Extension/FluentGridFieldExtension.php index 41fd528a..27a8e9e2 100644 --- a/src/Extension/FluentGridFieldExtension.php +++ b/src/Extension/FluentGridFieldExtension.php @@ -10,7 +10,7 @@ use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest; use SilverStripe\ORM\FieldType\DBField; use SilverStripe\ORM\FieldType\DBHTMLText; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Versioned\VersionedGridFieldItemRequest; use TractorCow\Fluent\Extension\Traits\FluentAdminTrait; use TractorCow\Fluent\Extension\Traits\FluentBadgeTrait; diff --git a/src/Extension/FluentLeftAndMainExtension.php b/src/Extension/FluentLeftAndMainExtension.php index 26fbe681..c0320cee 100644 --- a/src/Extension/FluentLeftAndMainExtension.php +++ b/src/Extension/FluentLeftAndMainExtension.php @@ -7,7 +7,7 @@ use SilverStripe\Control\HTTPResponse_Exception; use SilverStripe\Core\Extension; use SilverStripe\Forms\Form; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\FieldType\DBHTMLText; use SilverStripe\View\Requirements; use TractorCow\Fluent\Extension\Traits\FluentAdminTrait; diff --git a/src/Extension/FluentMemberExtension.php b/src/Extension/FluentMemberExtension.php index 1e7300a7..0cbe5234 100644 --- a/src/Extension/FluentMemberExtension.php +++ b/src/Extension/FluentMemberExtension.php @@ -2,7 +2,7 @@ namespace TractorCow\Fluent\Extension; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\Core\Extension; use SilverStripe\Security\Group; use SilverStripe\Security\Member; diff --git a/src/Extension/Traits/FluentAdminTrait.php b/src/Extension/Traits/FluentAdminTrait.php index 63da66a3..5bad2127 100644 --- a/src/Extension/Traits/FluentAdminTrait.php +++ b/src/Extension/Traits/FluentAdminTrait.php @@ -13,7 +13,7 @@ use SilverStripe\Forms\TabSet; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\FieldType\DBHTMLText; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Security\Permission; use SilverStripe\Versioned\Versioned; use SilverStripe\View\SSViewer; diff --git a/src/Extension/Traits/FluentObjectTrait.php b/src/Extension/Traits/FluentObjectTrait.php index 8521aea5..c674c2cb 100644 --- a/src/Extension/Traits/FluentObjectTrait.php +++ b/src/Extension/Traits/FluentObjectTrait.php @@ -12,7 +12,7 @@ use SilverStripe\Forms\GridField\GridFieldConfig_Base; use SilverStripe\Forms\GridField\GridFieldDataColumns; use SilverStripe\Forms\GridField\GridFieldFilterHeader; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataQuery; use SilverStripe\ORM\FieldType\DBField; diff --git a/src/Forms/CopyLocaleAction.php b/src/Forms/CopyLocaleAction.php index 4a9bd727..039ac1f7 100644 --- a/src/Forms/CopyLocaleAction.php +++ b/src/Forms/CopyLocaleAction.php @@ -7,7 +7,7 @@ use SilverStripe\Forms\GridField\GridField; use SilverStripe\Forms\GridField\GridField_FormAction; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use TractorCow\Fluent\Model\Locale; use TractorCow\Fluent\Model\RecordLocale; use TractorCow\Fluent\Service\CopyToLocaleService; diff --git a/src/Forms/DeleteAllLocalesAction.php b/src/Forms/DeleteAllLocalesAction.php index 2d1327c0..3b71f664 100644 --- a/src/Forms/DeleteAllLocalesAction.php +++ b/src/Forms/DeleteAllLocalesAction.php @@ -8,7 +8,7 @@ use SilverStripe\Forms\GridField\GridField_ColumnProvider; use SilverStripe\Forms\GridField\GridField_FormAction; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Versioned\Versioned; use TractorCow\Fluent\Extension\FluentExtension; use TractorCow\Fluent\Extension\FluentFilteredExtension; diff --git a/src/Forms/GroupActionMenu.php b/src/Forms/GroupActionMenu.php index 3bd62e01..4d2bd267 100644 --- a/src/Forms/GroupActionMenu.php +++ b/src/Forms/GroupActionMenu.php @@ -7,7 +7,7 @@ use SilverStripe\Forms\GridField\GridField_ActionMenuItem; use SilverStripe\Forms\GridField\GridField_ActionMenuLink; use SilverStripe\ORM\FieldType\DBHTMLText; -use SilverStripe\View\ArrayData; +use SilverStripe\Model\ArrayData; use SilverStripe\View\SSViewer; use TractorCow\Fluent\Model\Locale; diff --git a/src/Model/CachableModel.php b/src/Model/CachableModel.php index c97bdb10..16ba95ac 100644 --- a/src/Model/CachableModel.php +++ b/src/Model/CachableModel.php @@ -6,7 +6,7 @@ use SilverStripe\Core\ClassInfo; use SilverStripe\Core\Config\Config; use SilverStripe\Core\Injector\Injector; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\Connect\DatabaseException; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DB; diff --git a/src/Model/Domain.php b/src/Model/Domain.php index 0ec2fcdf..5ddd2976 100644 --- a/src/Model/Domain.php +++ b/src/Model/Domain.php @@ -12,7 +12,7 @@ use SilverStripe\Forms\Tab; use SilverStripe\Forms\TabSet; use SilverStripe\Forms\TextField; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\FieldType\DBField; use SilverStripe\ORM\HasManyList; diff --git a/src/Model/LocalDateTime.php b/src/Model/LocalDateTime.php index af1cf0fa..019a4578 100644 --- a/src/Model/LocalDateTime.php +++ b/src/Model/LocalDateTime.php @@ -8,7 +8,7 @@ use IntlDateFormatter; use InvalidArgumentException; use SilverStripe\ORM\FieldType\DBDatetime; -use SilverStripe\View\ViewableData; +use SilverStripe\Model\ModelData; /** * Stores dates in the same timezone as DBDateTime, but will format them @@ -64,7 +64,7 @@ public function getCustomFormatter( /** * Assign value in server timezone */ - public function setValue(mixed $value, null|array|ViewableData $record = null, bool $markChanged = true): static + public function setValue(mixed $value, null|array|ModelData $record = null, bool $markChanged = true): static { // Disable timezone when setting value (always stored in server timezone) $timezone = $this->getTimezone(); diff --git a/src/Model/Locale.php b/src/Model/Locale.php index 8185db41..e80c956c 100644 --- a/src/Model/Locale.php +++ b/src/Model/Locale.php @@ -19,7 +19,7 @@ use SilverStripe\Forms\TabSet; use SilverStripe\Forms\TextField; use SilverStripe\i18n\i18n; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DB; use SilverStripe\ORM\HasManyList; diff --git a/src/Model/RecordLocale.php b/src/Model/RecordLocale.php index 4374727c..eb0b2cd4 100644 --- a/src/Model/RecordLocale.php +++ b/src/Model/RecordLocale.php @@ -6,7 +6,7 @@ use SilverStripe\i18n\i18n; use SilverStripe\ORM\DataObject; use SilverStripe\Versioned\Versioned; -use SilverStripe\View\ViewableData; +use SilverStripe\Model\ModelData; use TractorCow\Fluent\Extension\FluentExtension; use TractorCow\Fluent\Extension\FluentFilteredExtension; use TractorCow\Fluent\Extension\FluentVersionedExtension; @@ -15,7 +15,7 @@ /** * Object that represents details of a specific dataobject in a specific locale */ -class RecordLocale extends ViewableData +class RecordLocale extends ModelData { /** * @var Locale diff --git a/src/Search/FluentSearchForm.php b/src/Search/FluentSearchForm.php index f23ef773..1d88d8fb 100644 --- a/src/Search/FluentSearchForm.php +++ b/src/Search/FluentSearchForm.php @@ -9,8 +9,8 @@ use SilverStripe\CMS\Model\SiteTree; use SilverStripe\CMS\Search\SearchForm; -use SilverStripe\ORM\ArrayList; -use SilverStripe\ORM\PaginatedList; +use SilverStripe\Model\List\ArrayList; +use SilverStripe\Model\List\PaginatedList; use TractorCow\Fluent\State\FluentState; // Soft dependency on CMS module diff --git a/src/Service/CopyToLocaleService.php b/src/Service/CopyToLocaleService.php index a01377cd..1e57ae6b 100644 --- a/src/Service/CopyToLocaleService.php +++ b/src/Service/CopyToLocaleService.php @@ -4,7 +4,7 @@ use SilverStripe\Core\Injector\Injectable; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Versioned\Versioned; use TractorCow\Fluent\Model\Locale; use TractorCow\Fluent\State\FluentState; diff --git a/src/Task/InitialDataObjectLocalisationTask.php b/src/Task/InitialDataObjectLocalisationTask.php index a8897e73..5566a41b 100644 --- a/src/Task/InitialDataObjectLocalisationTask.php +++ b/src/Task/InitialDataObjectLocalisationTask.php @@ -54,7 +54,7 @@ class InitialDataObjectLocalisationTask extends BuildTask * @param HTTPRequest $request * @return void * @throws \ReflectionException - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function run($request) { @@ -135,7 +135,7 @@ public function run($request) * @param $limit * @param $publish * @return array{localisable: int, localised: int, publishable: int, published: int} - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ protected function doLocaliseClass($className, $globalLocale, $limit, $publish): array { diff --git a/tests/php/Extension/FluentAdminTraitTest.php b/tests/php/Extension/FluentAdminTraitTest.php index f7243293..a1e429a4 100644 --- a/tests/php/Extension/FluentAdminTraitTest.php +++ b/tests/php/Extension/FluentAdminTraitTest.php @@ -5,7 +5,7 @@ use SilverStripe\Dev\SapphireTest; use SilverStripe\Forms\Form; use SilverStripe\ORM\DB; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Versioned\Versioned; use TractorCow\Fluent\Extension\FluentVersionedExtension; use TractorCow\Fluent\Model\Locale; diff --git a/tests/php/Extension/FluentExtensionTest.php b/tests/php/Extension/FluentExtensionTest.php index c131df52..7f90eaf9 100644 --- a/tests/php/Extension/FluentExtensionTest.php +++ b/tests/php/Extension/FluentExtensionTest.php @@ -7,7 +7,7 @@ use SilverStripe\Dev\SapphireTest; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\Queries\SQLSelect; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use TractorCow\Fluent\Extension\FluentSiteTreeExtension; use TractorCow\Fluent\Model\Locale; use TractorCow\Fluent\State\FluentState; diff --git a/tests/php/Extension/FluentSiteTreeExtensionTest.php b/tests/php/Extension/FluentSiteTreeExtensionTest.php index 515edb5a..87f15f12 100644 --- a/tests/php/Extension/FluentSiteTreeExtensionTest.php +++ b/tests/php/Extension/FluentSiteTreeExtensionTest.php @@ -12,9 +12,9 @@ use SilverStripe\Forms\CompositeField; use SilverStripe\Forms\FieldList; use SilverStripe\Forms\LiteralField; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Versioned\Versioned; use TractorCow\Fluent\Extension\FluentDirectorExtension; use TractorCow\Fluent\Extension\FluentExtension; diff --git a/tests/php/Extension/FluentVersionedExtensionTest.php b/tests/php/Extension/FluentVersionedExtensionTest.php index 64a72239..64c5660f 100644 --- a/tests/php/Extension/FluentVersionedExtensionTest.php +++ b/tests/php/Extension/FluentVersionedExtensionTest.php @@ -5,7 +5,7 @@ use Page; use SilverStripe\CMS\Model\SiteTree; use SilverStripe\Dev\SapphireTest; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use TractorCow\Fluent\Extension\FluentSiteTreeExtension; use TractorCow\Fluent\Extension\FluentVersionedExtension; use TractorCow\Fluent\Model\Domain; diff --git a/tests/php/Model/Delete/DeleteRecordPolicyTest.php b/tests/php/Model/Delete/DeleteRecordPolicyTest.php index eaf07c57..2c3f8c77 100644 --- a/tests/php/Model/Delete/DeleteRecordPolicyTest.php +++ b/tests/php/Model/Delete/DeleteRecordPolicyTest.php @@ -5,7 +5,7 @@ use SilverStripe\Core\Injector\Injector; use SilverStripe\Dev\SapphireTest; use SilverStripe\ORM\DB; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use TractorCow\Fluent\Model\Delete\DeletePolicy; use TractorCow\Fluent\Model\Delete\DeleteRecordPolicy; use TractorCow\Fluent\Model\Domain; diff --git a/tests/php/Task/InitialPageLocalisationTaskTest.php b/tests/php/Task/InitialPageLocalisationTaskTest.php index 627ede38..bdb121f4 100644 --- a/tests/php/Task/InitialPageLocalisationTaskTest.php +++ b/tests/php/Task/InitialPageLocalisationTaskTest.php @@ -5,7 +5,7 @@ use SilverStripe\CMS\Model\SiteTree; use SilverStripe\Control\HTTPRequest; use SilverStripe\Dev\SapphireTest; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use TractorCow\Fluent\Extension\FluentSiteTreeExtension; use TractorCow\Fluent\Model\Locale; use TractorCow\Fluent\State\FluentState;