diff --git a/docs/en/01_basic_usage.md b/docs/en/01_basic_usage.md index 1a37e5ed..703e9b89 100644 --- a/docs/en/01_basic_usage.md +++ b/docs/en/01_basic_usage.md @@ -151,13 +151,13 @@ class MyModel extends DataObject ## Unversioned links -The `Link` model has the [`Versioned`](api:SilverStripe\Versioned\Versioned) extension applied to it by default. If you wish for links to not be versioned, then remove the extension from the `Link` model in the project's `app/_config.php` file. +The `Link` model has the [`Versioned`](api:SilverStripe\Versioned\Mode\Versioned) extension applied to it by default. If you wish for links to not be versioned, then remove the extension from the `Link` model in the project's `app/_config.php` file. ```php // app/_config.php use SilverStripe\LinkField\Models\Link; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; Link::remove_extension(Versioned::class); ``` diff --git a/docs/en/09_migrating/02_gorriecoe-migration.md b/docs/en/09_migrating/02_gorriecoe-migration.md index f165dc9f..2bc1af63 100644 --- a/docs/en/09_migrating/02_gorriecoe-migration.md +++ b/docs/en/09_migrating/02_gorriecoe-migration.md @@ -231,7 +231,7 @@ There are many extension hooks in the [`GorriecoeMigrationTask`](api:SilverStrip Some scenarios where you may need customisations include: -- You had applied the [`Versioned`](api:SilverStripe\Versioned\Versioned) extension to `Link` and want to retain that versioning history +- You had applied the [`Versioned`](api:SilverStripe\Versioned\Mode\Versioned) extension to `Link` and want to retain that versioning history - You subclassed the base `Link` model and need to migrate data from your custom subclass - You were relying on features of `gorriecoe/silverstripe-link` or `gorriecoe/silverstripe-linkfield` which don't have a 1-to-1 equivalent in `silverstripe/linkfield` diff --git a/src/Controllers/LinkFieldController.php b/src/Controllers/LinkFieldController.php index 0df9ad7b..f9aaebca 100644 --- a/src/Controllers/LinkFieldController.php +++ b/src/Controllers/LinkFieldController.php @@ -23,7 +23,7 @@ use SilverStripe\LinkField\Form\LinkField; use SilverStripe\LinkField\Form\MultiLinkField; use SilverStripe\ORM\Queries\SQLUpdate; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; class LinkFieldController extends LeftAndMain { diff --git a/src/Models/Link.php b/src/Models/Link.php index e20a90d3..a6356d5a 100644 --- a/src/Models/Link.php +++ b/src/Models/Link.php @@ -9,7 +9,7 @@ use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataObjectSchema; use SilverStripe\ORM\FieldType\DBHTMLText; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use SilverStripe\Forms\Tip; use SilverStripe\LinkField\Form\LinkField; use SilverStripe\LinkField\Form\MultiLinkField; diff --git a/src/Tasks/MigrationTaskTrait.php b/src/Tasks/MigrationTaskTrait.php index aa54bb9f..89c77b55 100644 --- a/src/Tasks/MigrationTaskTrait.php +++ b/src/Tasks/MigrationTaskTrait.php @@ -19,9 +19,9 @@ use SilverStripe\ORM\DataObjectSchema; use SilverStripe\ORM\DB; use SilverStripe\ORM\Queries\SQLUpdate; -use SilverStripe\Versioned\ChangeSet; -use SilverStripe\Versioned\ChangeSetItem; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Staged\ChangeSet; +use SilverStripe\Versioned\Staged\ChangeSetItem; +use SilverStripe\Versioned\Mode\Versioned; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; diff --git a/src/Tasks/ModuleMigrationTaskTrait.php b/src/Tasks/ModuleMigrationTaskTrait.php index 2f223b14..d6c7d5cf 100644 --- a/src/Tasks/ModuleMigrationTaskTrait.php +++ b/src/Tasks/ModuleMigrationTaskTrait.php @@ -11,7 +11,7 @@ use SilverStripe\ORM\Queries\SQLDelete; use SilverStripe\ORM\Queries\SQLSelect; use SilverStripe\ORM\Queries\SQLUpdate; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; /** * @deprecated 5.0.0 Will be removed without equivalent functionality. diff --git a/tests/php/Controllers/LinkFieldControllerTest.php b/tests/php/Controllers/LinkFieldControllerTest.php index 63cdf66d..23897826 100644 --- a/tests/php/Controllers/LinkFieldControllerTest.php +++ b/tests/php/Controllers/LinkFieldControllerTest.php @@ -10,7 +10,7 @@ use SilverStripe\Control\Session; use SilverStripe\LinkField\Controllers\LinkFieldController; use SilverStripe\LinkField\Tests\Models\LinkTest\LinkOwner; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use SilverStripe\LinkField\Models\Link; use PHPUnit\Framework\Attributes\DataProvider; diff --git a/tests/php/Models/LinkTest.php b/tests/php/Models/LinkTest.php index 7da48660..1327413c 100644 --- a/tests/php/Models/LinkTest.php +++ b/tests/php/Models/LinkTest.php @@ -18,7 +18,7 @@ use SilverStripe\LinkField\Models\SiteTreeLink; use SilverStripe\ORM\DataObject; use SilverStripe\Core\Validation\ValidationException; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use SilverStripe\LinkField\Tests\Extensions\ExternalLinkExtension; use SilverStripe\LinkField\Tests\Models\LinkTest\LinkOwner; use SilverStripe\LinkField\Services\LinkTypeService; diff --git a/tests/php/Models/LinkTest/LinkOwner.php b/tests/php/Models/LinkTest/LinkOwner.php index f5aa6cb2..a63d4e44 100644 --- a/tests/php/Models/LinkTest/LinkOwner.php +++ b/tests/php/Models/LinkTest/LinkOwner.php @@ -5,7 +5,7 @@ use SilverStripe\Dev\TestOnly; use SilverStripe\LinkField\Models\Link; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; class LinkOwner extends DataObject implements TestOnly {