From ecc01612396adca5f7cd90da7a1e596ecdc94da4 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 29 Oct 2024 18:55:40 +1300 Subject: [PATCH] API Use updated Versioned and Staged classes --- src/Control/Director.php | 2 +- src/Dev/Command/DbBuild.php | 2 +- src/Dev/DevelopmentAdmin.php | 2 +- src/ORM/Hierarchy/Hierarchy.php | 2 +- src/Security/InheritedPermissions.php | 2 +- src/Security/MemberAuthenticator/MemberAuthenticator.php | 2 +- tests/php/Core/ObjectTest.php | 2 +- tests/php/Forms/FormFactoryTest.php | 2 +- tests/php/Forms/FormFactoryTest/ControllerExtension.php | 2 +- tests/php/Forms/FormFactoryTest/TestController.php | 2 +- tests/php/Forms/FormFactoryTest/TestObject.php | 2 +- tests/php/Forms/GridField/GridFieldReadonlyTest.php | 2 +- tests/php/Forms/GridField/GridFieldTest.php | 2 +- tests/php/ORM/HierarchyCachingTest.php | 2 +- tests/php/ORM/HierarchyTest.php | 2 +- tests/php/ORM/HierarchyTest/HideTestObject.php | 2 +- tests/php/ORM/HierarchyTest/HideTestSubObject.php | 2 +- .../php/ORM/HierarchyTest/HierarchyOnSubclassTestObject.php | 2 +- tests/php/ORM/HierarchyTest/TestObject.php | 2 +- tests/php/ORM/MarkedSetTest.php | 2 +- tests/php/Security/InheritedPermissionsTest.php | 2 +- .../InheritedPermissionsTest/TestPermissionNode.php | 2 +- .../php/Security/InheritedPermissionsTest/UnstagedNode.php | 2 +- tests/php/Security/VersionedMemberAuthenticatorTest.php | 2 +- tests/php/View/SSViewerCacheBlockTest.php | 2 +- tests/php/View/SSViewerCacheBlockTest/VersionedModel.php | 2 +- tests/php/i18n/i18nTextCollectorTest.php | 6 +++--- 27 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/Control/Director.php b/src/Control/Director.php index f1f4b7fe5f3..dfb5540e18f 100644 --- a/src/Control/Director.php +++ b/src/Control/Director.php @@ -13,7 +13,7 @@ use SilverStripe\Core\Kernel; use SilverStripe\Core\Path; use SilverStripe\PolyExecution\PolyCommand; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use SilverStripe\View\Requirements; use SilverStripe\View\Requirements_Backend; use SilverStripe\View\TemplateGlobalProvider; diff --git a/src/Dev/Command/DbBuild.php b/src/Dev/Command/DbBuild.php index 10e452a97a5..ac418ba82d2 100644 --- a/src/Dev/Command/DbBuild.php +++ b/src/Dev/Command/DbBuild.php @@ -18,7 +18,7 @@ use SilverStripe\ORM\FieldType\DBClassName; use SilverStripe\Security\PermissionProvider; use SilverStripe\Security\Security; -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/src/Dev/DevelopmentAdmin.php b/src/Dev/DevelopmentAdmin.php index 3a10eabce97..4b36d864ff9 100644 --- a/src/Dev/DevelopmentAdmin.php +++ b/src/Dev/DevelopmentAdmin.php @@ -18,7 +18,7 @@ use SilverStripe\Security\Permission; use SilverStripe\Security\PermissionProvider; use SilverStripe\Security\Security; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use SilverStripe\Model\ModelData; /** diff --git a/src/ORM/Hierarchy/Hierarchy.php b/src/ORM/Hierarchy/Hierarchy.php index 929476fc778..2b2b10f211f 100644 --- a/src/ORM/Hierarchy/Hierarchy.php +++ b/src/ORM/Hierarchy/Hierarchy.php @@ -12,7 +12,7 @@ use SilverStripe\ORM\DataObject; use SilverStripe\Core\Extension; use SilverStripe\ORM\DB; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use SilverStripe\Core\Config\Config; use SilverStripe\Core\Convert; use Exception; diff --git a/src/Security/InheritedPermissions.php b/src/Security/InheritedPermissions.php index 65b66044819..c8325b1a414 100644 --- a/src/Security/InheritedPermissions.php +++ b/src/Security/InheritedPermissions.php @@ -7,7 +7,7 @@ use SilverStripe\ORM\DataList; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\Hierarchy\Hierarchy; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use Psr\SimpleCache\CacheInterface; use SilverStripe\Core\Cache\MemberCacheFlusher; use SilverStripe\Dev\Deprecation; diff --git a/src/Security/MemberAuthenticator/MemberAuthenticator.php b/src/Security/MemberAuthenticator/MemberAuthenticator.php index b8aeee7c468..68d8df280c0 100644 --- a/src/Security/MemberAuthenticator/MemberAuthenticator.php +++ b/src/Security/MemberAuthenticator/MemberAuthenticator.php @@ -12,7 +12,7 @@ use SilverStripe\Security\Member; use SilverStripe\Security\PasswordEncryptor; use SilverStripe\Security\Security; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; /** * Authenticator for the default "member" method diff --git a/tests/php/Core/ObjectTest.php b/tests/php/Core/ObjectTest.php index 184cd65ed95..085cc704fa6 100644 --- a/tests/php/Core/ObjectTest.php +++ b/tests/php/Core/ObjectTest.php @@ -20,7 +20,7 @@ use SilverStripe\Core\Tests\ObjectTest\MySubObject; use SilverStripe\Core\Tests\ObjectTest\TestExtension; use SilverStripe\Dev\SapphireTest; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; class ObjectTest extends SapphireTest { diff --git a/tests/php/Forms/FormFactoryTest.php b/tests/php/Forms/FormFactoryTest.php index 6ab9d99427c..ffc2bb35770 100644 --- a/tests/php/Forms/FormFactoryTest.php +++ b/tests/php/Forms/FormFactoryTest.php @@ -9,7 +9,7 @@ use SilverStripe\Forms\HiddenField; use SilverStripe\Forms\LiteralField; use SilverStripe\Forms\TextField; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; class FormFactoryTest extends SapphireTest { diff --git a/tests/php/Forms/FormFactoryTest/ControllerExtension.php b/tests/php/Forms/FormFactoryTest/ControllerExtension.php index d8b3b4131e1..d8c1ad67cd6 100644 --- a/tests/php/Forms/FormFactoryTest/ControllerExtension.php +++ b/tests/php/Forms/FormFactoryTest/ControllerExtension.php @@ -12,7 +12,7 @@ use SilverStripe\Forms\FormAction; use SilverStripe\Forms\LiteralField; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; /** * Provides versionable extensions to a controller / scaffolder diff --git a/tests/php/Forms/FormFactoryTest/TestController.php b/tests/php/Forms/FormFactoryTest/TestController.php index 603ec56d32b..4e6d7c08916 100644 --- a/tests/php/Forms/FormFactoryTest/TestController.php +++ b/tests/php/Forms/FormFactoryTest/TestController.php @@ -5,7 +5,7 @@ use SilverStripe\Control\Controller; use SilverStripe\Forms\Form; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; /** * Edit controller for this form diff --git a/tests/php/Forms/FormFactoryTest/TestObject.php b/tests/php/Forms/FormFactoryTest/TestObject.php index 92db59ba318..aef0eebfaac 100644 --- a/tests/php/Forms/FormFactoryTest/TestObject.php +++ b/tests/php/Forms/FormFactoryTest/TestObject.php @@ -4,7 +4,7 @@ use SilverStripe\Dev\TestOnly; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; /** * @mixin Versioned diff --git a/tests/php/Forms/GridField/GridFieldReadonlyTest.php b/tests/php/Forms/GridField/GridFieldReadonlyTest.php index b377d337c5c..3763e0a9559 100644 --- a/tests/php/Forms/GridField/GridFieldReadonlyTest.php +++ b/tests/php/Forms/GridField/GridFieldReadonlyTest.php @@ -22,7 +22,7 @@ use SilverStripe\Forms\GridField\GridField; use SilverStripe\Forms\GridField\GridFieldViewButton; use SilverStripe\Forms\Tests\GridField\GridFieldReadonlyTest\GridFieldViewButtonReplacement; -use SilverStripe\Versioned\VersionedGridFieldState\VersionedGridFieldState; +use SilverStripe\Versioned\Mode\VersionedGridFieldState\VersionedGridFieldState; use PHPUnit\Framework\Attributes\DataProvider; class GridFieldReadonlyTest extends SapphireTest diff --git a/tests/php/Forms/GridField/GridFieldTest.php b/tests/php/Forms/GridField/GridFieldTest.php index 1eba6d4edf5..77cb222b7a5 100644 --- a/tests/php/Forms/GridField/GridFieldTest.php +++ b/tests/php/Forms/GridField/GridFieldTest.php @@ -37,7 +37,7 @@ use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Security\Group; use SilverStripe\Security\Member; -use SilverStripe\Versioned\VersionedGridFieldStateExtension; +use SilverStripe\Versioned\Versioned\VersionedGridFieldStateExtension; class GridFieldTest extends SapphireTest { diff --git a/tests/php/ORM/HierarchyCachingTest.php b/tests/php/ORM/HierarchyCachingTest.php index 6aa16c21d74..4e7806ed54a 100644 --- a/tests/php/ORM/HierarchyCachingTest.php +++ b/tests/php/ORM/HierarchyCachingTest.php @@ -5,7 +5,7 @@ use SilverStripe\Dev\SapphireTest; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\Hierarchy\Hierarchy; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use SilverStripe\ORM\Tests\HierarchyTest\TestObject; use SilverStripe\ORM\Tests\HierarchyTest\HideTestObject; use SilverStripe\ORM\Tests\HierarchyTest\HideTestSubObject; diff --git a/tests/php/ORM/HierarchyTest.php b/tests/php/ORM/HierarchyTest.php index 989cedf4bbe..636b224a923 100644 --- a/tests/php/ORM/HierarchyTest.php +++ b/tests/php/ORM/HierarchyTest.php @@ -3,7 +3,7 @@ namespace SilverStripe\ORM\Tests; use SilverStripe\Core\Validation\ValidationException; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use SilverStripe\Dev\SapphireTest; class HierarchyTest extends SapphireTest diff --git a/tests/php/ORM/HierarchyTest/HideTestObject.php b/tests/php/ORM/HierarchyTest/HideTestObject.php index 541b1e110fd..3887feb253b 100644 --- a/tests/php/ORM/HierarchyTest/HideTestObject.php +++ b/tests/php/ORM/HierarchyTest/HideTestObject.php @@ -5,7 +5,7 @@ use SilverStripe\Dev\TestOnly; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\Hierarchy\Hierarchy; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; /** * @mixin Versioned diff --git a/tests/php/ORM/HierarchyTest/HideTestSubObject.php b/tests/php/ORM/HierarchyTest/HideTestSubObject.php index f31d9330352..a5dbe8c8fe7 100644 --- a/tests/php/ORM/HierarchyTest/HideTestSubObject.php +++ b/tests/php/ORM/HierarchyTest/HideTestSubObject.php @@ -3,7 +3,7 @@ namespace SilverStripe\ORM\Tests\HierarchyTest; use SilverStripe\ORM\Hierarchy\Hierarchy; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; /** * @mixin Versioned diff --git a/tests/php/ORM/HierarchyTest/HierarchyOnSubclassTestObject.php b/tests/php/ORM/HierarchyTest/HierarchyOnSubclassTestObject.php index 48dfdd9a11a..9b06bfdf08d 100644 --- a/tests/php/ORM/HierarchyTest/HierarchyOnSubclassTestObject.php +++ b/tests/php/ORM/HierarchyTest/HierarchyOnSubclassTestObject.php @@ -4,7 +4,7 @@ use SilverStripe\Dev\TestOnly; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; /** * @mixin Versioned diff --git a/tests/php/ORM/HierarchyTest/TestObject.php b/tests/php/ORM/HierarchyTest/TestObject.php index bf9545cd38e..32bd009b500 100644 --- a/tests/php/ORM/HierarchyTest/TestObject.php +++ b/tests/php/ORM/HierarchyTest/TestObject.php @@ -5,7 +5,7 @@ use SilverStripe\Dev\TestOnly; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\Hierarchy\Hierarchy; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; /** * @mixin Versioned diff --git a/tests/php/ORM/MarkedSetTest.php b/tests/php/ORM/MarkedSetTest.php index e609a3aca38..256d15b5fbd 100644 --- a/tests/php/ORM/MarkedSetTest.php +++ b/tests/php/ORM/MarkedSetTest.php @@ -7,7 +7,7 @@ use SilverStripe\Dev\SapphireTest; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\Hierarchy\MarkedSet; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; /** * Test set of marked Hierarchy-extended DataObjects diff --git a/tests/php/Security/InheritedPermissionsTest.php b/tests/php/Security/InheritedPermissionsTest.php index 4eefa598642..fbf77659612 100644 --- a/tests/php/Security/InheritedPermissionsTest.php +++ b/tests/php/Security/InheritedPermissionsTest.php @@ -11,7 +11,7 @@ use SilverStripe\Security\Tests\InheritedPermissionsTest\TestPermissionNode; use SilverStripe\Security\Tests\InheritedPermissionsTest\TestDefaultPermissionChecker; use SilverStripe\Security\Tests\InheritedPermissionsTest\UnstagedNode; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use Psr\SimpleCache\CacheInterface; use ReflectionClass; diff --git a/tests/php/Security/InheritedPermissionsTest/TestPermissionNode.php b/tests/php/Security/InheritedPermissionsTest/TestPermissionNode.php index 1621f40ed85..275067a21d1 100644 --- a/tests/php/Security/InheritedPermissionsTest/TestPermissionNode.php +++ b/tests/php/Security/InheritedPermissionsTest/TestPermissionNode.php @@ -9,7 +9,7 @@ use SilverStripe\Security\InheritedPermissionsExtension; use SilverStripe\Security\PermissionChecker; use SilverStripe\Security\Security; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; /** * @method TestPermissionNode Parent() diff --git a/tests/php/Security/InheritedPermissionsTest/UnstagedNode.php b/tests/php/Security/InheritedPermissionsTest/UnstagedNode.php index ab816bbd17c..d4b6507ef21 100644 --- a/tests/php/Security/InheritedPermissionsTest/UnstagedNode.php +++ b/tests/php/Security/InheritedPermissionsTest/UnstagedNode.php @@ -9,7 +9,7 @@ use SilverStripe\Security\InheritedPermissionsExtension; use SilverStripe\Security\PermissionChecker; use SilverStripe\Security\Security; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; /** * @method UnstagedNode Parent() diff --git a/tests/php/Security/VersionedMemberAuthenticatorTest.php b/tests/php/Security/VersionedMemberAuthenticatorTest.php index 5cc38cd6f5c..ebc2df214aa 100644 --- a/tests/php/Security/VersionedMemberAuthenticatorTest.php +++ b/tests/php/Security/VersionedMemberAuthenticatorTest.php @@ -8,7 +8,7 @@ use SilverStripe\Core\Validation\ValidationResult; use SilverStripe\Security\Member; use SilverStripe\Security\MemberAuthenticator\MemberAuthenticator; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; class VersionedMemberAuthenticatorTest extends SapphireTest { diff --git a/tests/php/View/SSViewerCacheBlockTest.php b/tests/php/View/SSViewerCacheBlockTest.php index 5281b6a2578..5aa4efd0ce2 100644 --- a/tests/php/View/SSViewerCacheBlockTest.php +++ b/tests/php/View/SSViewerCacheBlockTest.php @@ -5,7 +5,7 @@ use SilverStripe\Core\Injector\Injector; use SilverStripe\Core\Kernel; use SilverStripe\Core\TempFolder; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; use Psr\SimpleCache\CacheInterface; use SilverStripe\Dev\SapphireTest; use SilverStripe\Control\Director; diff --git a/tests/php/View/SSViewerCacheBlockTest/VersionedModel.php b/tests/php/View/SSViewerCacheBlockTest/VersionedModel.php index a9f9e2e114f..32049c86153 100644 --- a/tests/php/View/SSViewerCacheBlockTest/VersionedModel.php +++ b/tests/php/View/SSViewerCacheBlockTest/VersionedModel.php @@ -4,7 +4,7 @@ use SilverStripe\Dev\TestOnly; use SilverStripe\ORM\DataObject; -use SilverStripe\Versioned\Versioned; +use SilverStripe\Versioned\Mode\Versioned; class VersionedModel extends DataObject implements TestOnly { diff --git a/tests/php/i18n/i18nTextCollectorTest.php b/tests/php/i18n/i18nTextCollectorTest.php index 6fe81c6e44e..ce9881838ed 100644 --- a/tests/php/i18n/i18nTextCollectorTest.php +++ b/tests/php/i18n/i18nTextCollectorTest.php @@ -313,7 +313,7 @@ class MyClass extends Base implements SomeService { public function getNewLines(\$class) { if ( !is_subclass_of(\$class, DataObject::class) - || !Object::has_extension(\$class, \SilverStripe\Versioned\Versioned::class) + || !Object::has_extension(\$class, \SilverStripe\Versioned\Mode\Versioned::class) ) { return null; } @@ -364,7 +364,7 @@ public function testCollectFromClassSyntax() namespace SilverStripe\Framework\Core; use SilverStripe\ORM\DataObject; - use SilverStripe\Versioned\Versioned; + use SilverStripe\Versioned\Mode\Versioned; use Some\Space\MyClass as AliasClass; use NoNamespaceClass; @@ -428,7 +428,7 @@ class MyTrait extends Base implements SomeService { public function getNewLines(\$class) { if ( !is_subclass_of(\$class, DataObject::class) - || !Object::has_extension(\$class, \SilverStripe\Versioned\Versioned::class) + || !Object::has_extension(\$class, \SilverStripe\Versioned\Mode\Versioned::class) ) { return null; }