From d4296a989aa7f6fef30a18e79c2f77ca23a1da6d Mon Sep 17 00:00:00 2001 From: Guy Sartorelli <36352093+GuySartorelli@users.noreply.github.com> Date: Mon, 23 Sep 2024 14:34:22 +1200 Subject: [PATCH] API Use new names for renamed classes (#640) --- src/File.php | 4 ++-- src/Flysystem/AssetAdapter.php | 4 ++-- src/Folder.php | 2 +- src/Shortcodes/FileShortcodeProvider.php | 2 +- src/Storage/DBFile.php | 8 ++++---- tests/php/FileTest.php | 2 +- tests/php/Storage/DBFileTest.php | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/File.php b/src/File.php index a7403883..03fca21b 100644 --- a/src/File.php +++ b/src/File.php @@ -21,12 +21,12 @@ use SilverStripe\Forms\FormField; use SilverStripe\Forms\HTMLReadonlyField; use SilverStripe\Forms\TextField; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\CMSPreviewable; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\HasManyList; use SilverStripe\ORM\Hierarchy\Hierarchy; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Security\InheritedPermissions; use SilverStripe\Security\InheritedPermissionsExtension; use SilverStripe\Security\Member; diff --git a/src/Flysystem/AssetAdapter.php b/src/Flysystem/AssetAdapter.php index a843c4f5..a6f54228 100644 --- a/src/Flysystem/AssetAdapter.php +++ b/src/Flysystem/AssetAdapter.php @@ -9,8 +9,8 @@ use SilverStripe\Assets\Filesystem; use SilverStripe\Core\Config\Config; use SilverStripe\Core\Config\Configurable; -use SilverStripe\ORM\ArrayList; -use SilverStripe\View\ArrayData; +use SilverStripe\Model\List\ArrayList; +use SilverStripe\Model\ArrayData; use SilverStripe\View\SSViewer; /** diff --git a/src/Folder.php b/src/Folder.php index 8136b198..1ccf8364 100644 --- a/src/Folder.php +++ b/src/Folder.php @@ -10,7 +10,7 @@ use SilverStripe\Forms\TreeMultiselectField; use SilverStripe\ORM\DataList; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Versioned\Versioned; /** diff --git a/src/Shortcodes/FileShortcodeProvider.php b/src/Shortcodes/FileShortcodeProvider.php index 311abf42..bc7d165c 100644 --- a/src/Shortcodes/FileShortcodeProvider.php +++ b/src/Shortcodes/FileShortcodeProvider.php @@ -14,7 +14,7 @@ use SilverStripe\Core\Injector\Injector; use SilverStripe\ErrorPage\ErrorPage; use SilverStripe\ORM\DataObject; -use SilverStripe\View\ArrayData; +use SilverStripe\Model\ArrayData; use SilverStripe\View\HTML; use SilverStripe\View\Parsers\ShortcodeHandler; use SilverStripe\View\Parsers\ShortcodeParser; diff --git a/src/Storage/DBFile.php b/src/Storage/DBFile.php index 46e02b03..26d758a4 100644 --- a/src/Storage/DBFile.php +++ b/src/Storage/DBFile.php @@ -9,10 +9,10 @@ use SilverStripe\Core\Injector\Injector; use SilverStripe\Forms\FormField; use SilverStripe\ORM\FieldType\DBComposite; -use SilverStripe\ORM\ValidationException; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationException; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Security\Permission; -use SilverStripe\View\ViewableData; +use SilverStripe\Model\ModelData; /** * Represents a file reference stored in a database @@ -385,7 +385,7 @@ public function getAbsoluteSize(): int */ public function setOriginal(AssetContainer $original): static { - if ($original instanceof ViewableData) { + if ($original instanceof ModelData) { $this->setFailover($original); } return $this; diff --git a/tests/php/FileTest.php b/tests/php/FileTest.php index 6845a14d..b2e2b1c8 100644 --- a/tests/php/FileTest.php +++ b/tests/php/FileTest.php @@ -20,7 +20,7 @@ use SilverStripe\Dev\SapphireTest; use SilverStripe\ErrorPage\ErrorPage; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Security\Member; use SilverStripe\Security\PermissionChecker; use SilverStripe\Versioned\Versioned; diff --git a/tests/php/Storage/DBFileTest.php b/tests/php/Storage/DBFileTest.php index 7ce83a84..a4d7e857 100644 --- a/tests/php/Storage/DBFileTest.php +++ b/tests/php/Storage/DBFileTest.php @@ -6,7 +6,7 @@ use SilverStripe\Assets\Storage\AssetStore; use SilverStripe\Control\Director; use SilverStripe\Dev\SapphireTest; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; class DBFileTest extends SapphireTest {