Skip to content

Commit

Permalink
API Use updated Versioned and Staged classes
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Oct 29, 2024
1 parent c1a51aa commit 5a25a7e
Show file tree
Hide file tree
Showing 26 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/Control/Director.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Dev/Command/DbBuild.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Dev/DevelopmentAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/Hierarchy/Hierarchy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Security/InheritedPermissions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Security/MemberAuthenticator/MemberAuthenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Core/ObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Forms/FormFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Forms/FormFactoryTest/ControllerExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Forms/FormFactoryTest/TestController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Forms/FormFactoryTest/TestObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataObject;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;

/**
* @mixin Versioned
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Forms/GridField/GridFieldReadonlyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/php/ORM/HierarchyCachingTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/php/ORM/HierarchyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/php/ORM/HierarchyTest/HideTestObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/php/ORM/HierarchyTest/HideTestSubObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataObject;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;

/**
* @mixin Versioned
Expand Down
2 changes: 1 addition & 1 deletion tests/php/ORM/HierarchyTest/TestObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/php/ORM/MarkedSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Security/InheritedPermissionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Security/VersionedMemberAuthenticatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tests/php/View/SSViewerCacheBlockTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/php/View/SSViewerCacheBlockTest/VersionedModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions tests/php/i18n/i18nTextCollectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 5a25a7e

Please sign in to comment.