Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Use updated Versioned and Staged classes #368

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion _config/archive-admin.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
Name: archiveadmin
---
SilverStripe\Versioned\VersionedGridFieldItemRequest:
SilverStripe\Versioned\Versioned\VersionedGridFieldItemRequest:
extensions:
- SilverStripe\VersionedAdmin\Extensions\ArchiveRestoreAction
---
Expand Down
6 changes: 3 additions & 3 deletions src/ArchiveAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
use SilverStripe\Model\List\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\Versioned\GridFieldRestoreAction;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\VersionedGridFieldState\VersionedGridFieldState;
use SilverStripe\Versioned\Versioned\GridFieldRestoreAction;
use SilverStripe\Versioned\Mode\Versioned;
use SilverStripe\Versioned\Mode\VersionedGridFieldState\VersionedGridFieldState;
use SilverStripe\VersionedAdmin\Interfaces\ArchiveViewProvider;
use SilverStripe\Model\ArrayData;

Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/HistoryViewerController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;
use SilverStripe\VersionedAdmin\Forms\DataObjectVersionFormFactory;
use SilverStripe\VersionedAdmin\Forms\DiffTransformation;
use SilverStripe\VersionedAdmin\Forms\HistoryViewerField;
Expand Down
6 changes: 3 additions & 3 deletions src/Extensions/ArchiveRestoreAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
use SilverStripe\Core\Extension;
use SilverStripe\ORM\DataObject;
use SilverStripe\Core\Validation\ValidationResult;
use SilverStripe\Versioned\RestoreAction;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\VersionedGridFieldItemRequest;
use SilverStripe\Versioned\Versioned\RestoreAction;
use SilverStripe\Versioned\Mode\Versioned;
use SilverStripe\Versioned\Versioned\VersionedGridFieldItemRequest;
use SilverStripe\VersionedAdmin\ArchiveAdmin;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/FileArchiveExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use SilverStripe\Forms\GridField\GridFieldDataColumns;
use SilverStripe\Core\Extension;
use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\Versioned\GridFieldRestoreAction;
use SilverStripe\Versioned\Versioned\GridFieldRestoreAction;
use SilverStripe\VersionedAdmin\ArchiveAdmin;
use SilverStripe\VersionedAdmin\Forms\GridField\GridFieldFileRestoreAction;
use SilverStripe\VersionedAdmin\Interfaces\ArchiveViewProvider;
Expand Down
2 changes: 1 addition & 1 deletion src/Extensions/UsedOnTableExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use SilverStripe\Admin\Forms\UsedOnTable;
use SilverStripe\Core\Extension;
use SilverStripe\Versioned\ChangeSetItem;
use SilverStripe\Versioned\Staged\ChangeSetItem;

/**
* @extends Extension<UsedOnTable>
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/DiffField.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* e.g. a TextField with the value "Old data" can be transformed with {@see DiffTransformation}
* and then having setValue called again to load in "New data" - this field will then render
* the value "<ins>New</ins> <del>Old</del> data". Most useful in historic version comparisons
* {@see SilverStripe\Versioned\Versioned}
* {@see SilverStripe\Versioned\Mode\Versioned}
*/
class DiffField extends HTMLReadonlyField
{
Expand Down
2 changes: 1 addition & 1 deletion src/Forms/GridField/GridFieldFileRestoreAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace SilverStripe\VersionedAdmin\Forms\GridField;

use SilverStripe\Assets\File;
use SilverStripe\Versioned\GridFieldRestoreAction;
use SilverStripe\Versioned\Versioned\GridFieldRestoreAction;

/**
* Extension of GridFieldRestoreAction to only show action if there is a valid file
Expand Down
2 changes: 1 addition & 1 deletion src/Navigator/SilverStripeNavigatorItem_ArchiveLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\ORM\FieldType\DBField;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;

class SilverStripeNavigatorItem_ArchiveLink extends SilverStripeNavigatorItem
{
Expand Down
2 changes: 1 addition & 1 deletion src/Navigator/SilverStripeNavigatorItem_LiveLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Convert;
use SilverStripe\ORM\DataObject;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;

class SilverStripeNavigatorItem_LiveLink extends SilverStripeNavigatorItem
{
Expand Down
2 changes: 1 addition & 1 deletion src/Navigator/SilverStripeNavigatorItem_StageLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use SilverStripe\Core\Config\Config;
use SilverStripe\Core\Convert;
use SilverStripe\ORM\DataObject;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;

class SilverStripeNavigatorItem_StageLink extends SilverStripeNavigatorItem
{
Expand Down
2 changes: 1 addition & 1 deletion tests/ArchiveAdminTest/SingleStageObject.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 SingleStageObject extends DataObject implements TestOnly
{
Expand Down
2 changes: 1 addition & 1 deletion tests/ArchiveAdminTest/VersionedObject.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 VersionedObject extends DataObject implements TestOnly
{
Expand Down
2 changes: 1 addition & 1 deletion tests/ArchiveAdminTest/ViewProviderChildObject.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;
use SilverStripe\VersionedAdmin\Tests\ArchiveAdminTest\ViewProviderVersionedObject;

class ViewProviderChildObject extends ViewProviderVersionedObject implements TestOnly
Expand Down
2 changes: 1 addition & 1 deletion tests/ArchiveAdminTest/ViewProviderVersionedObject.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;
use SilverStripe\VersionedAdmin\Interfaces\ArchiveViewProvider;

class ViewProviderVersionedObject extends DataObject implements ArchiveViewProvider, TestOnly
Expand Down
2 changes: 1 addition & 1 deletion tests/Controllers/HistoryViewerControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
use SilverStripe\VersionedAdmin\Tests\Controllers\HistoryViewerControllerTest\TestVersionedObject;
use SilverStripe\Dev\FunctionalTest;
use SilverStripe\Security\SecurityToken;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;
use SilverStripe\VersionedAdmin\Forms\HistoryViewerField;
use PHPUnit\Framework\Attributes\DataProvider;

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;

class TestVersionedObject extends DataObject implements TestOnly
{
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;

class ViewableVersionedObject extends DataObject implements TestOnly
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Extensions/ArchiveRestoreActionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use SilverStripe\Forms\GridField\GridFieldDetailForm;
use SilverStripe\Model\List\ArrayList;
use SilverStripe\Model\ArrayData;
use SilverStripe\Versioned\VersionedGridFieldItemRequest;
use SilverStripe\Versioned\Versioned\VersionedGridFieldItemRequest;
use SilverStripe\VersionedAdmin\ArchiveAdmin;
use SilverStripe\VersionedAdmin\Tests\Controllers\HistoryViewerControllerTest\ViewableVersionedObject;
use ReflectionMethod;
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;
use SilverStripe\VersionedAdmin\Forms\HistoryViewerField;

class ObjectWithFields extends DataObject implements TestOnly
Expand Down
2 changes: 1 addition & 1 deletion tests/Navigator/UnstagedRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\ORM\DataObject;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;

/**
* Versioned but not staged
Expand Down
2 changes: 1 addition & 1 deletion tests/Navigator/VersionedRecord.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\CMSPreviewable;
use SilverStripe\ORM\DataObject;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;

class VersionedRecord extends DataObject implements TestOnly, CMSPreviewable
{
Expand Down
Loading