diff --git a/src/Controllers/LinkFieldController.php b/src/Controllers/LinkFieldController.php index 6e1c1f73..a7c83ad6 100644 --- a/src/Controllers/LinkFieldController.php +++ b/src/Controllers/LinkFieldController.php @@ -11,8 +11,8 @@ use SilverStripe\Forms\FieldList; use SilverStripe\Forms\FormAction; use SilverStripe\LinkField\Models\FileLink; -use SilverStripe\ORM\ValidationException; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationException; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Control\Controller; use SilverStripe\Control\HTTPRequest; use SilverStripe\Core\Injector\Injector; diff --git a/src/Form/MultiLinkField.php b/src/Form/MultiLinkField.php index d44fb9cd..7729a8be 100644 --- a/src/Form/MultiLinkField.php +++ b/src/Form/MultiLinkField.php @@ -3,10 +3,10 @@ namespace SilverStripe\LinkField\Form; use LogicException; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\Relation; -use SilverStripe\ORM\SS_List; +use SilverStripe\Model\List\SS_List; /** * A react-based formfield which allows CMS users to edit multiple Link records. diff --git a/tests/php/Controllers/LinkFieldControllerTest/TestPhoneLink.php b/tests/php/Controllers/LinkFieldControllerTest/TestPhoneLink.php index c740e1e1..8328f96a 100644 --- a/tests/php/Controllers/LinkFieldControllerTest/TestPhoneLink.php +++ b/tests/php/Controllers/LinkFieldControllerTest/TestPhoneLink.php @@ -3,7 +3,7 @@ namespace SilverStripe\LinkField\Tests\Controllers\LinkFieldControllerTest; use SilverStripe\Dev\TestOnly; -use SilverStripe\ORM\ValidationResult; +use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Forms\CompositeValidator; use SilverStripe\Forms\Validator; use SilverStripe\LinkField\Models\Link; diff --git a/tests/php/Form/MultiLinkFieldTest.php b/tests/php/Form/MultiLinkFieldTest.php index 95aa7b68..60925c3d 100644 --- a/tests/php/Form/MultiLinkFieldTest.php +++ b/tests/php/Form/MultiLinkFieldTest.php @@ -6,7 +6,7 @@ use ReflectionMethod; use SilverStripe\Dev\SapphireTest; use SilverStripe\LinkField\Form\MultiLinkField; -use SilverStripe\ORM\ArrayList; +use SilverStripe\Model\List\ArrayList; use PHPUnit\Framework\Attributes\DataProvider; class MultiLinkFieldTest extends SapphireTest diff --git a/tests/php/Models/LinkTest.php b/tests/php/Models/LinkTest.php index 345977d5..7da48660 100644 --- a/tests/php/Models/LinkTest.php +++ b/tests/php/Models/LinkTest.php @@ -17,7 +17,7 @@ use SilverStripe\LinkField\Models\PhoneLink; use SilverStripe\LinkField\Models\SiteTreeLink; use SilverStripe\ORM\DataObject; -use SilverStripe\ORM\ValidationException; +use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Versioned\Versioned; use SilverStripe\LinkField\Tests\Extensions\ExternalLinkExtension; use SilverStripe\LinkField\Tests\Models\LinkTest\LinkOwner; @@ -513,11 +513,11 @@ private function createLinks(): array $link->OwnerID = $linkOwner->ID; $link->OwnerClass = $linkOwner->ClassName; $link->OwnerRelation = 'LinkList'; - + if ($class === SiteTreeLink::class) { $link->Page = $page->ID; } - + $link->write(); array_push($linkIds, $link->ID); }