Skip to content

Commit

Permalink
API Use new names for renamed classes (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Sep 23, 2024
1 parent 401381e commit 2ac0db1
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/Controllers/LinkFieldController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/Form/MultiLinkField.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Form/MultiLinkFieldTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/php/Models/LinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 2ac0db1

Please sign in to comment.