From e58ca2a4cca30b3188f09aa2a7db65d5805cee81 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 29 Oct 2024 18:56:43 +1300 Subject: [PATCH] API Use updated Versioned and Staged classes --- _config/cms.yml | 2 +- src/Extension/FluentCMSMainExtension.php | 2 +- src/Extension/FluentExtension.php | 2 +- src/Extension/FluentFilteredExtension.php | 2 +- src/Extension/FluentGridFieldExtension.php | 2 +- src/Extension/FluentVersionedExtension.php | 2 +- src/Extension/Traits/FluentAdminTrait.php | 2 +- src/Forms/DeleteAllLocalesAction.php | 2 +- src/Forms/PublishAction.php | 2 +- src/Forms/UnpublishAction.php | 2 +- src/Model/Delete/ArchiveRecordPolicy.php | 2 +- src/Model/RecordLocale.php | 2 +- src/Service/CopyToLocaleService.php | 2 +- src/Task/InitialDataObjectLocalisationTask.php | 2 +- tests/php/Extension/FluentAdminTraitTest.php | 2 +- .../php/Extension/FluentAdminTraitTest/GridObjectVersioned.php | 2 +- tests/php/Extension/FluentFilteredExtensionTest.php | 2 +- tests/php/Extension/FluentSiteTreeExtensionTest.php | 2 +- tests/php/Extension/LocalisedVersionsTest.php | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/_config/cms.yml b/_config/cms.yml index 26d07506..c9ca4fa3 100644 --- a/_config/cms.yml +++ b/_config/cms.yml @@ -13,7 +13,7 @@ SilverStripe\Versioned\ChangeSetItem: extensions: FluentChangesExtension: TractorCow\Fluent\Extension\FluentChangesExtension -SilverStripe\Versioned\VersionedGridFieldItemRequest: +SilverStripe\Versioned\Versioned\VersionedGridFieldItemRequest: extensions: FluentGridFieldExtension: TractorCow\Fluent\Extension\FluentGridFieldExtension diff --git a/src/Extension/FluentCMSMainExtension.php b/src/Extension/FluentCMSMainExtension.php index 3a7ef90f..b6dfc510 100644 --- a/src/Extension/FluentCMSMainExtension.php +++ b/src/Extension/FluentCMSMainExtension.php @@ -10,7 +10,7 @@ use SilverStripe\Forms\Form; use SilverStripe\ORM\DataObject; use SilverStripe\Core\Validation\ValidationException; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use TractorCow\Fluent\Forms\CopyLocaleAction; /** diff --git a/src/Extension/FluentExtension.php b/src/Extension/FluentExtension.php index eeffef9c..51dbfa35 100644 --- a/src/Extension/FluentExtension.php +++ b/src/Extension/FluentExtension.php @@ -25,7 +25,7 @@ use SilverStripe\ORM\Queries\SQLSelect; use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Security\Permission; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use SilverStripe\View\HTML; use TractorCow\Fluent\Extension\Traits\FluentObjectTrait; use TractorCow\Fluent\Forms\CopyLocaleAction; diff --git a/src/Extension/FluentFilteredExtension.php b/src/Extension/FluentFilteredExtension.php index 944391f1..7456eb41 100644 --- a/src/Extension/FluentFilteredExtension.php +++ b/src/Extension/FluentFilteredExtension.php @@ -9,7 +9,7 @@ use SilverStripe\ORM\DataQuery; use SilverStripe\ORM\ManyManyList; use SilverStripe\ORM\Queries\SQLSelect; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use TractorCow\Fluent\Extension\Traits\FluentObjectTrait; use TractorCow\Fluent\Forms\LocaleToggleColumn; use TractorCow\Fluent\Model\Delete\UsesDeletePolicy; diff --git a/src/Extension/FluentGridFieldExtension.php b/src/Extension/FluentGridFieldExtension.php index 27a8e9e2..f75d2c61 100644 --- a/src/Extension/FluentGridFieldExtension.php +++ b/src/Extension/FluentGridFieldExtension.php @@ -11,7 +11,7 @@ use SilverStripe\ORM\FieldType\DBField; use SilverStripe\ORM\FieldType\DBHTMLText; use SilverStripe\Core\Validation\ValidationResult; -use SilverStripe\Versioned\VersionedGridFieldItemRequest; +use SilverStripe\Versioned\Versioned\VersionedGridFieldItemRequest; use TractorCow\Fluent\Extension\Traits\FluentAdminTrait; use TractorCow\Fluent\Extension\Traits\FluentBadgeTrait; diff --git a/src/Extension/FluentVersionedExtension.php b/src/Extension/FluentVersionedExtension.php index 141556b4..6345676c 100644 --- a/src/Extension/FluentVersionedExtension.php +++ b/src/Extension/FluentVersionedExtension.php @@ -12,7 +12,7 @@ use SilverStripe\ORM\DataQuery; use SilverStripe\ORM\DB; use SilverStripe\ORM\Queries\SQLSelect; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use TractorCow\Fluent\Forms\PublishAction; use TractorCow\Fluent\Forms\UnpublishAction; use TractorCow\Fluent\Model\Locale; diff --git a/src/Extension/Traits/FluentAdminTrait.php b/src/Extension/Traits/FluentAdminTrait.php index 5bad2127..fc9b0daf 100644 --- a/src/Extension/Traits/FluentAdminTrait.php +++ b/src/Extension/Traits/FluentAdminTrait.php @@ -15,7 +15,7 @@ use SilverStripe\ORM\FieldType\DBHTMLText; use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Security\Permission; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use SilverStripe\View\SSViewer; use TractorCow\Fluent\Extension\FluentExtension; use TractorCow\Fluent\Extension\FluentFilteredExtension; diff --git a/src/Forms/DeleteAllLocalesAction.php b/src/Forms/DeleteAllLocalesAction.php index 3b71f664..193aff32 100644 --- a/src/Forms/DeleteAllLocalesAction.php +++ b/src/Forms/DeleteAllLocalesAction.php @@ -9,7 +9,7 @@ use SilverStripe\Forms\GridField\GridField_FormAction; use SilverStripe\ORM\DataObject; use SilverStripe\Core\Validation\ValidationException; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use TractorCow\Fluent\Extension\FluentExtension; use TractorCow\Fluent\Extension\FluentFilteredExtension; use TractorCow\Fluent\Model\Delete\DeleteFilterPolicy; diff --git a/src/Forms/PublishAction.php b/src/Forms/PublishAction.php index d3d4269c..36f6bc1e 100644 --- a/src/Forms/PublishAction.php +++ b/src/Forms/PublishAction.php @@ -6,7 +6,7 @@ use SilverStripe\Forms\GridField\GridField; use SilverStripe\Forms\GridField\GridField_FormAction; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\RecursivePublishable; +use SilverStripe\Versioned\Staged\RecursivePublishable; use TractorCow\Fluent\Extension\FluentFilteredExtension; use TractorCow\Fluent\Extension\FluentVersionedExtension; use TractorCow\Fluent\Model\Locale; diff --git a/src/Forms/UnpublishAction.php b/src/Forms/UnpublishAction.php index 59af38c2..7e4d2651 100644 --- a/src/Forms/UnpublishAction.php +++ b/src/Forms/UnpublishAction.php @@ -5,7 +5,7 @@ use SilverStripe\Forms\GridField\GridField; use SilverStripe\Forms\GridField\GridField_FormAction; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use TractorCow\Fluent\Extension\FluentVersionedExtension; use TractorCow\Fluent\Model\Locale; use TractorCow\Fluent\State\FluentState; diff --git a/src/Model/Delete/ArchiveRecordPolicy.php b/src/Model/Delete/ArchiveRecordPolicy.php index e5d89b3f..de5bf3d1 100644 --- a/src/Model/Delete/ArchiveRecordPolicy.php +++ b/src/Model/Delete/ArchiveRecordPolicy.php @@ -5,7 +5,7 @@ use InvalidArgumentException; use SilverStripe\Core\Injector\Injectable; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use TractorCow\Fluent\State\FluentState; /** diff --git a/src/Model/RecordLocale.php b/src/Model/RecordLocale.php index eb0b2cd4..2fee5ef2 100644 --- a/src/Model/RecordLocale.php +++ b/src/Model/RecordLocale.php @@ -5,7 +5,7 @@ use SilverStripe\Control\Director; use SilverStripe\i18n\i18n; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use SilverStripe\Model\ModelData; use TractorCow\Fluent\Extension\FluentExtension; use TractorCow\Fluent\Extension\FluentFilteredExtension; diff --git a/src/Service/CopyToLocaleService.php b/src/Service/CopyToLocaleService.php index 1e57ae6b..4a7afff0 100644 --- a/src/Service/CopyToLocaleService.php +++ b/src/Service/CopyToLocaleService.php @@ -5,7 +5,7 @@ use SilverStripe\Core\Injector\Injectable; use SilverStripe\ORM\DataObject; use SilverStripe\Core\Validation\ValidationException; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use TractorCow\Fluent\Model\Locale; use TractorCow\Fluent\State\FluentState; diff --git a/src/Task/InitialDataObjectLocalisationTask.php b/src/Task/InitialDataObjectLocalisationTask.php index fa45731d..0989b3ea 100644 --- a/src/Task/InitialDataObjectLocalisationTask.php +++ b/src/Task/InitialDataObjectLocalisationTask.php @@ -8,7 +8,7 @@ use SilverStripe\Dev\BuildTask; use SilverStripe\PolyExecution\PolyOutput; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\Versioned; +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/tests/php/Extension/FluentAdminTraitTest.php b/tests/php/Extension/FluentAdminTraitTest.php index a1e429a4..16622c0c 100644 --- a/tests/php/Extension/FluentAdminTraitTest.php +++ b/tests/php/Extension/FluentAdminTraitTest.php @@ -6,7 +6,7 @@ use SilverStripe\Forms\Form; use SilverStripe\ORM\DB; use SilverStripe\Core\Validation\ValidationException; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use TractorCow\Fluent\Extension\FluentVersionedExtension; use TractorCow\Fluent\Model\Locale; use TractorCow\Fluent\State\FluentState; diff --git a/tests/php/Extension/FluentAdminTraitTest/GridObjectVersioned.php b/tests/php/Extension/FluentAdminTraitTest/GridObjectVersioned.php index a595095a..4a1c1d45 100644 --- a/tests/php/Extension/FluentAdminTraitTest/GridObjectVersioned.php +++ b/tests/php/Extension/FluentAdminTraitTest/GridObjectVersioned.php @@ -4,7 +4,7 @@ use SilverStripe\Dev\TestOnly; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use TractorCow\Fluent\Extension\FluentVersionedExtension; /** diff --git a/tests/php/Extension/FluentFilteredExtensionTest.php b/tests/php/Extension/FluentFilteredExtensionTest.php index 0d0a9d49..6f18869e 100644 --- a/tests/php/Extension/FluentFilteredExtensionTest.php +++ b/tests/php/Extension/FluentFilteredExtensionTest.php @@ -9,7 +9,7 @@ use SilverStripe\Forms\GridField\GridField; use SilverStripe\Forms\GridField\GridFieldFilterHeader; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use TractorCow\Fluent\Extension\FluentFilteredExtension; use TractorCow\Fluent\Extension\FluentSiteTreeExtension; use TractorCow\Fluent\Forms\LocaleToggleColumn; diff --git a/tests/php/Extension/FluentSiteTreeExtensionTest.php b/tests/php/Extension/FluentSiteTreeExtensionTest.php index 87f15f12..6517449f 100644 --- a/tests/php/Extension/FluentSiteTreeExtensionTest.php +++ b/tests/php/Extension/FluentSiteTreeExtensionTest.php @@ -15,7 +15,7 @@ use SilverStripe\Model\List\ArrayList; use SilverStripe\ORM\DataObject; use SilverStripe\Core\Validation\ValidationException; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use TractorCow\Fluent\Extension\FluentDirectorExtension; use TractorCow\Fluent\Extension\FluentExtension; use TractorCow\Fluent\Extension\FluentSiteTreeExtension; diff --git a/tests/php/Extension/LocalisedVersionsTest.php b/tests/php/Extension/LocalisedVersionsTest.php index 2eb24d9e..9bf38b97 100644 --- a/tests/php/Extension/LocalisedVersionsTest.php +++ b/tests/php/Extension/LocalisedVersionsTest.php @@ -3,7 +3,7 @@ namespace TractorCow\Fluent\Tests\Extension; use SilverStripe\Dev\SapphireTest; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use TractorCow\Fluent\Extension\FluentVersionedExtension; use TractorCow\Fluent\State\FluentState; use TractorCow\Fluent\Tests\Extension\Stub\FluentDataObject;