From 4ea2ee82181e0035d66d04dfed3759fcd1f8bcc4 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 29 Oct 2024 14:23:04 +1300 Subject: [PATCH] API Use updated Versioned and Staged classes --- src/AddToCampaignHandler.php | 6 +++--- src/CampaignAdmin.php | 4 ++-- src/CampaignAdminList.php | 2 +- tests/behat/src/FixtureContext.php | 2 +- tests/php/AddToCampaignValidatorTest.php | 2 +- tests/php/AddToCampaignValidatorTest.yml | 2 +- tests/php/AddToCampaignValidatorTest/TestObject.php | 2 +- tests/php/CampaignAdminTest.php | 4 ++-- tests/php/CampaignAdminTest.yml | 2 +- tests/php/CampaignAdminTest/InvalidChangeSet.php | 2 +- tests/php/SiteTreeExtensionTest.php | 2 +- 11 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/AddToCampaignHandler.php b/src/AddToCampaignHandler.php index 8b3a7272..0c4a21c2 100644 --- a/src/AddToCampaignHandler.php +++ b/src/AddToCampaignHandler.php @@ -19,9 +19,9 @@ use SilverStripe\ORM\DataObject; use SilverStripe\Core\Validation\ValidationException; use SilverStripe\Core\Validation\ValidationResult; -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 SilverStripe\Core\Convert; /** diff --git a/src/CampaignAdmin.php b/src/CampaignAdmin.php index 5402113a..6654ae63 100644 --- a/src/CampaignAdmin.php +++ b/src/CampaignAdmin.php @@ -24,8 +24,8 @@ use SilverStripe\Security\PermissionProvider; use SilverStripe\Security\Security; use SilverStripe\Security\SecurityToken; -use SilverStripe\Versioned\ChangeSet; -use SilverStripe\Versioned\ChangeSetItem; +use SilverStripe\Versioned\Staged\ChangeSet; +use SilverStripe\Versioned\Staged\ChangeSetItem; use SilverStripe\View\Requirements; /** diff --git a/src/CampaignAdminList.php b/src/CampaignAdminList.php index 3bc780ab..9ae67a6d 100644 --- a/src/CampaignAdminList.php +++ b/src/CampaignAdminList.php @@ -4,7 +4,7 @@ namespace SilverStripe\CampaignAdmin; use SilverStripe\Forms\FormField; -use SilverStripe\Versioned\ChangeSet; +use SilverStripe\Versioned\Staged\ChangeSet; /** * Warning: Volatile API as placeholder for standard "GridField" diff --git a/tests/behat/src/FixtureContext.php b/tests/behat/src/FixtureContext.php index 848ca891..8da80cf9 100644 --- a/tests/behat/src/FixtureContext.php +++ b/tests/behat/src/FixtureContext.php @@ -8,7 +8,7 @@ use SilverStripe\BehatExtension\Context\FixtureContext as BaseFixtureContext; use SilverStripe\BehatExtension\Utility\StepHelper; use SilverStripe\MinkFacebookWebDriver\FacebookWebDriver; -use SilverStripe\Versioned\ChangeSet; +use SilverStripe\Versioned\Staged\ChangeSet; /** * Context used to create fixtures in the SilverStripe ORM. diff --git a/tests/php/AddToCampaignValidatorTest.php b/tests/php/AddToCampaignValidatorTest.php index 6d0f29f9..0f43ad38 100644 --- a/tests/php/AddToCampaignValidatorTest.php +++ b/tests/php/AddToCampaignValidatorTest.php @@ -5,7 +5,7 @@ use SilverStripe\CampaignAdmin\AddToCampaignHandler; use SilverStripe\CampaignAdmin\AddToCampaignValidator; use SilverStripe\Dev\SapphireTest; -use SilverStripe\Versioned\ChangeSet; +use SilverStripe\Versioned\Staged\ChangeSet; class AddToCampaignValidatorTest extends SapphireTest { diff --git a/tests/php/AddToCampaignValidatorTest.yml b/tests/php/AddToCampaignValidatorTest.yml index f2796d35..0f54fd9d 100644 --- a/tests/php/AddToCampaignValidatorTest.yml +++ b/tests/php/AddToCampaignValidatorTest.yml @@ -1,7 +1,7 @@ SilverStripe\CampaignAdmin\Tests\AddToCampaignValidatorTest\TestObject: object1: Title: 'Test Object' -SilverStripe\Versioned\ChangeSet: +SilverStripe\Versioned\Staged\ChangeSet: changeset1: Name: 'ChangeSet 1' changeset2: diff --git a/tests/php/AddToCampaignValidatorTest/TestObject.php b/tests/php/AddToCampaignValidatorTest/TestObject.php index 206da22b..8e1ba0c2 100644 --- a/tests/php/AddToCampaignValidatorTest/TestObject.php +++ b/tests/php/AddToCampaignValidatorTest/TestObject.php @@ -4,7 +4,7 @@ use SilverStripe\Dev\TestOnly; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; class TestObject extends DataObject implements TestOnly { diff --git a/tests/php/CampaignAdminTest.php b/tests/php/CampaignAdminTest.php index 57b6bd93..4cee6297 100644 --- a/tests/php/CampaignAdminTest.php +++ b/tests/php/CampaignAdminTest.php @@ -13,8 +13,8 @@ use SilverStripe\Security\Group; use SilverStripe\Security\Member; use SilverStripe\Security\Permission; -use SilverStripe\Versioned\ChangeSet; -use SilverStripe\Versioned\ChangeSetItem; +use SilverStripe\Versioned\Staged\ChangeSet; +use SilverStripe\Versioned\Staged\ChangeSetItem; use PHPUnit\Framework\Attributes\DataProvider; class CampaignAdminTest extends FunctionalTest diff --git a/tests/php/CampaignAdminTest.yml b/tests/php/CampaignAdminTest.yml index 38a2eed6..84ad0582 100644 --- a/tests/php/CampaignAdminTest.yml +++ b/tests/php/CampaignAdminTest.yml @@ -1,4 +1,4 @@ -SilverStripe\Versioned\ChangeSet: +SilverStripe\Versioned\Staged\ChangeSet: change1: Name: 'changeset 1' State: open diff --git a/tests/php/CampaignAdminTest/InvalidChangeSet.php b/tests/php/CampaignAdminTest/InvalidChangeSet.php index 8f47b1cf..845cc13a 100644 --- a/tests/php/CampaignAdminTest/InvalidChangeSet.php +++ b/tests/php/CampaignAdminTest/InvalidChangeSet.php @@ -3,7 +3,7 @@ namespace SilverStripe\CampaignAdmin\Tests\CampaignAdminTest; use SilverStripe\ORM\UnexpectedDataException; -use SilverStripe\Versioned\ChangeSet; +use SilverStripe\Versioned\Staged\ChangeSet; use SilverStripe\Dev\TestOnly; class InvalidChangeSet extends ChangeSet implements TestOnly diff --git a/tests/php/SiteTreeExtensionTest.php b/tests/php/SiteTreeExtensionTest.php index 3ce60952..515f5d1b 100644 --- a/tests/php/SiteTreeExtensionTest.php +++ b/tests/php/SiteTreeExtensionTest.php @@ -5,7 +5,7 @@ use SilverStripe\CampaignAdmin\SiteTreeExtension; use SilverStripe\CMS\Model\SiteTree; use SilverStripe\Dev\SapphireTest; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; class SiteTreeExtensionTest extends SapphireTest {