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 #343

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
4 changes: 2 additions & 2 deletions docs/en/01_basic_usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ class MyModel extends DataObject

## Unversioned links

The `Link` model has the [`Versioned`](api:SilverStripe\Versioned\Versioned) extension applied to it by default. If you wish for links to not be versioned, then remove the extension from the `Link` model in the project's `app/_config.php` file.
The `Link` model has the [`Versioned`](api:SilverStripe\Versioned\Mode\Versioned) extension applied to it by default. If you wish for links to not be versioned, then remove the extension from the `Link` model in the project's `app/_config.php` file.

```php
// app/_config.php

use SilverStripe\LinkField\Models\Link;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;

Link::remove_extension(Versioned::class);
```
Expand Down
2 changes: 1 addition & 1 deletion docs/en/09_migrating/02_gorriecoe-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ There are many extension hooks in the [`GorriecoeMigrationTask`](api:SilverStrip

Some scenarios where you may need customisations include:

- You had applied the [`Versioned`](api:SilverStripe\Versioned\Versioned) extension to `Link` and want to retain that versioning history
- You had applied the [`Versioned`](api:SilverStripe\Versioned\Mode\Versioned) extension to `Link` and want to retain that versioning history
- You subclassed the base `Link` model and need to migrate data from your custom subclass
- You were relying on features of `gorriecoe/silverstripe-link` or `gorriecoe/silverstripe-linkfield` which don't have a 1-to-1 equivalent in `silverstripe/linkfield`

Expand Down
2 changes: 1 addition & 1 deletion src/Controllers/LinkFieldController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
use SilverStripe\LinkField\Form\LinkField;
use SilverStripe\LinkField\Form\MultiLinkField;
use SilverStripe\ORM\Queries\SQLUpdate;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;

class LinkFieldController extends LeftAndMain
{
Expand Down
2 changes: 1 addition & 1 deletion src/Models/Link.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DataObjectSchema;
use SilverStripe\ORM\FieldType\DBHTMLText;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;
use SilverStripe\Forms\Tip;
use SilverStripe\LinkField\Form\LinkField;
use SilverStripe\LinkField\Form\MultiLinkField;
Expand Down
6 changes: 3 additions & 3 deletions src/Tasks/MigrationTaskTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
use SilverStripe\ORM\DataObjectSchema;
use SilverStripe\ORM\DB;
use SilverStripe\ORM\Queries\SQLUpdate;
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 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/Tasks/ModuleMigrationTaskTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use SilverStripe\ORM\Queries\SQLDelete;
use SilverStripe\ORM\Queries\SQLSelect;
use SilverStripe\ORM\Queries\SQLUpdate;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;

/**
* @deprecated 5.0.0 Will be removed without equivalent functionality.
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Controllers/LinkFieldControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use SilverStripe\Control\Session;
use SilverStripe\LinkField\Controllers\LinkFieldController;
use SilverStripe\LinkField\Tests\Models\LinkTest\LinkOwner;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;
use SilverStripe\LinkField\Models\Link;
use PHPUnit\Framework\Attributes\DataProvider;

Expand Down
2 changes: 1 addition & 1 deletion tests/php/Models/LinkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use SilverStripe\LinkField\Models\SiteTreeLink;
use SilverStripe\ORM\DataObject;
use SilverStripe\Core\Validation\ValidationException;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;
use SilverStripe\LinkField\Tests\Extensions\ExternalLinkExtension;
use SilverStripe\LinkField\Tests\Models\LinkTest\LinkOwner;
use SilverStripe\LinkField\Services\LinkTypeService;
Expand Down
2 changes: 1 addition & 1 deletion tests/php/Models/LinkTest/LinkOwner.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use SilverStripe\Dev\TestOnly;
use SilverStripe\LinkField\Models\Link;
use SilverStripe\ORM\DataObject;
use SilverStripe\Versioned\Versioned;
use SilverStripe\Versioned\Mode\Versioned;

class LinkOwner extends DataObject implements TestOnly
{
Expand Down
Loading