diff --git a/src/Controllers/ElementSiteTreeFilterSearch.php b/src/Controllers/ElementSiteTreeFilterSearch.php index b2552b85..3b6e9b04 100644 --- a/src/Controllers/ElementSiteTreeFilterSearch.php +++ b/src/Controllers/ElementSiteTreeFilterSearch.php @@ -8,7 +8,7 @@ use SilverStripe\Core\Config\Configurable; use SilverStripe\Core\Convert; use SilverStripe\Forms\DateField; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataList; class ElementSiteTreeFilterSearch extends CMSSiteTreeFilter_Search diff --git a/src/Controllers/ElementalAreaController.php b/src/Controllers/ElementalAreaController.php index d430558f..3475b15f 100644 --- a/src/Controllers/ElementalAreaController.php +++ b/src/Controllers/ElementalAreaController.php @@ -9,9 +9,9 @@ use SilverStripe\Control\HTTPResponse; use SilverStripe\Core\Injector\Injector; use SilverStripe\Forms\Form; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Security\SecurityToken; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Forms\FormAction; use SilverStripe\Forms\FieldList; use SilverStripe\Control\Controller; diff --git a/src/Extensions/ElementalAreaUsedOnTableExtension.php b/src/Extensions/ElementalAreaUsedOnTableExtension.php index f55e24ee..7163a21c 100644 --- a/src/Extensions/ElementalAreaUsedOnTableExtension.php +++ b/src/Extensions/ElementalAreaUsedOnTableExtension.php @@ -4,7 +4,7 @@ use SilverStripe\CMS\Model\SiteTree; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use DNADesign\Elemental\Models\ElementalArea; use DNADesign\Elemental\Models\BaseElement; use SilverStripe\Admin\Forms\UsedOnTable; diff --git a/src/Extensions/ElementalAreasExtension.php b/src/Extensions/ElementalAreasExtension.php index 5cc3732d..d322e6ab 100644 --- a/src/Extensions/ElementalAreasExtension.php +++ b/src/Extensions/ElementalAreasExtension.php @@ -16,7 +16,7 @@ use SilverStripe\ORM\DataObject; use SilverStripe\ORM\RelatedData\StandardRelatedDataService; use SilverStripe\Versioned\Versioned; -use SilverStripe\View\ViewableData; +use SilverStripe\Model\ModelData; use SilverStripe\Core\Extension; /** diff --git a/src/Extensions/TopPageElementExtension.php b/src/Extensions/TopPageElementExtension.php index 7a8c99d1..2dc3a4b8 100644 --- a/src/Extensions/TopPageElementExtension.php +++ b/src/Extensions/TopPageElementExtension.php @@ -8,8 +8,8 @@ use SilverStripe\Core\ClassInfo; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\Queries\SQLUpdate; -use SilverStripe\ORM\ValidationException; -use SilverStripe\View\ViewableData; +use SilverStripe\Core\Validation\ValidationException; +use SilverStripe\Model\ModelData; use SilverStripe\Forms\FieldList; use SilverStripe\Core\Extension; @@ -320,7 +320,7 @@ protected function getTopPageTable(): string // Find the first ancestor table which has the extension applied // Note that this extension is expected to be subclassed foreach ($classes as $class) { - if (!ViewableData::has_extension($class, static::class)) { + if (!ModelData::has_extension($class, static::class)) { continue; } diff --git a/src/Extensions/TopPageSiteTreeExtension.php b/src/Extensions/TopPageSiteTreeExtension.php index 1b568233..d6ad3b86 100644 --- a/src/Extensions/TopPageSiteTreeExtension.php +++ b/src/Extensions/TopPageSiteTreeExtension.php @@ -5,7 +5,7 @@ use DNADesign\Elemental\Extensions\ElementalPageExtension; use SilverStripe\CMS\Model\SiteTree; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Core\Extension; /** diff --git a/src/Models/BaseElement.php b/src/Models/BaseElement.php index 0822fa6e..b2e59996 100644 --- a/src/Models/BaseElement.php +++ b/src/Models/BaseElement.php @@ -22,17 +22,17 @@ use SilverStripe\ORM\FieldType\DBBoolean; use SilverStripe\ORM\FieldType\DBField; use SilverStripe\ORM\FieldType\DBHTMLText; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Security\Member; use SilverStripe\Security\Permission; use SilverStripe\Versioned\Versioned; use SilverStripe\VersionedAdmin\Forms\HistoryViewerField; -use SilverStripe\View\ArrayData; +use SilverStripe\Model\ArrayData; use SilverStripe\View\Parsers\URLSegmentFilter; use SilverStripe\View\Requirements; use SilverStripe\ORM\CMSPreviewable; use SilverStripe\Core\Config\Config; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Dev\Deprecation; /** @@ -693,7 +693,7 @@ public function getSimpleClassName() * * @return null|DataObject * @throws \Psr\Container\NotFoundExceptionInterface - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function getPage() { @@ -794,7 +794,7 @@ public function getAnchorsInContent(): array * @param string|null $action * @return string|null * @throws \Psr\Container\NotFoundExceptionInterface - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function AbsoluteLink($action = null) { @@ -814,7 +814,7 @@ public function AbsoluteLink($action = null) * @param string|null $action * @return string|null * @throws \Psr\Container\NotFoundExceptionInterface - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function Link($action = null) { @@ -834,7 +834,7 @@ public function Link($action = null) * @param string|null $action * @return string|null * @throws \Psr\Container\NotFoundExceptionInterface - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function PreviewLink($action = null) { @@ -877,7 +877,7 @@ public function isCMSPreview() * @param bool $directLink Indicates that the GridFieldDetailEdit form link should be given even if the block can be * edited in-line. * @return null|string - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function getCMSEditLink($directLink = false): ?string { @@ -954,7 +954,7 @@ private function getElementCMSLink(bool $directLink) * * @return int|string The name of a valid elemental area relation * @throws \Psr\Container\NotFoundExceptionInterface - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function getAreaRelationName() { @@ -1008,7 +1008,7 @@ public function unsanitiseClassName($class, $delimiter = '-') /** * @return null|string * @throws \Psr\Container\NotFoundExceptionInterface - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function getEditLink() { @@ -1018,7 +1018,7 @@ public function getEditLink() /** * @return DBField|null * @throws \Psr\Container\NotFoundExceptionInterface - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function PageCMSEditLink() { @@ -1199,7 +1199,7 @@ public function getStyleVariant() /** * @return mixed|null * @throws \Psr\Container\NotFoundExceptionInterface - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function getPageTitle() { diff --git a/src/Models/ElementalArea.php b/src/Models/ElementalArea.php index 9c450ed0..1549ddf9 100644 --- a/src/Models/ElementalArea.php +++ b/src/Models/ElementalArea.php @@ -8,14 +8,14 @@ use SilverStripe\Core\ClassInfo; use SilverStripe\Core\Injector\Injector; use SilverStripe\Dev\TestOnly; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\FieldType\DBField; use SilverStripe\ORM\FieldType\DBHTMLText; use SilverStripe\ORM\HasManyList; use SilverStripe\ORM\UnsavedRelationList; use SilverStripe\Versioned\Versioned; -use SilverStripe\View\ViewableData; +use SilverStripe\Model\ModelData; /** * Class ElementalArea @@ -82,7 +82,7 @@ public function supportedPageTypes() $elementalClasses = []; foreach (ClassInfo::getValidSubClasses(DataObject::class) as $class) { - if (ViewableData::has_extension($class, ElementalAreasExtension::class)) { + if (ModelData::has_extension($class, ElementalAreasExtension::class)) { $elementalClasses[] = $class; } } @@ -185,7 +185,7 @@ public function ElementControllers() /** * @return null|DataObject * @throws \Psr\Container\NotFoundExceptionInterface - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function getOwnerPage() { @@ -273,7 +273,7 @@ public function getOwnerPage() * @param null $member * @return bool * @throws \Psr\Container\NotFoundExceptionInterface - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function canEdit($member = null) { @@ -293,7 +293,7 @@ public function canEdit($member = null) * @param null $member * @return bool * @throws \Psr\Container\NotFoundExceptionInterface - * @throws \SilverStripe\ORM\ValidationException + * @throws \SilverStripe\Core\Validation\ValidationException */ public function canView($member = null) { diff --git a/src/Reports/ElementTypeReport.php b/src/Reports/ElementTypeReport.php index cb9d1aa1..e86c7380 100644 --- a/src/Reports/ElementTypeReport.php +++ b/src/Reports/ElementTypeReport.php @@ -6,9 +6,9 @@ use SilverStripe\Core\ClassInfo; use SilverStripe\Core\Injector\Injector; use SilverStripe\Forms\GridField\GridField; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\Reports\Report; -use SilverStripe\View\ArrayData; +use SilverStripe\Model\ArrayData; use SilverStripe\View\Requirements; class ElementTypeReport extends Report diff --git a/src/Reports/ElementsInUseReport.php b/src/Reports/ElementsInUseReport.php index 67f2a4d8..c6cbc5ca 100644 --- a/src/Reports/ElementsInUseReport.php +++ b/src/Reports/ElementsInUseReport.php @@ -9,7 +9,7 @@ use SilverStripe\Forms\GridField\GridField; use SilverStripe\ORM\DataList; use SilverStripe\Reports\Report; -use SilverStripe\View\ArrayData; +use SilverStripe\Model\ArrayData; use SilverStripe\View\Requirements; class ElementsInUseReport extends Report diff --git a/tests/Blocks/TestElementContent.php b/tests/Blocks/TestElementContent.php index 014e2304..643f3f2c 100644 --- a/tests/Blocks/TestElementContent.php +++ b/tests/Blocks/TestElementContent.php @@ -5,7 +5,7 @@ use SilverStripe\Dev\TestOnly; use DNADesign\Elemental\Models\ElementContent; use SilverStripe\Forms\CompositeValidator; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Forms\Validator; class TestElementContent extends ElementContent implements TestOnly diff --git a/tests/ElementalAreaTest.php b/tests/ElementalAreaTest.php index da3b9dde..746dfd03 100644 --- a/tests/ElementalAreaTest.php +++ b/tests/ElementalAreaTest.php @@ -9,7 +9,7 @@ use DNADesign\Elemental\Tests\Src\TestPage; use Page; use SilverStripe\Dev\SapphireTest; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\Versioned\Versioned; class ElementalAreaTest extends SapphireTest diff --git a/tests/Src/ValidationFailedExtension.php b/tests/Src/ValidationFailedExtension.php index ce3e548f..4e3e78d9 100644 --- a/tests/Src/ValidationFailedExtension.php +++ b/tests/Src/ValidationFailedExtension.php @@ -5,7 +5,7 @@ use SilverStripe\Core\ClassInfo; use SilverStripe\Core\Extension; use SilverStripe\Dev\TestOnly; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationResult; class ValidationFailedExtension extends Extension implements TestOnly {