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 Replace Extension subclasses #468

Merged
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
6 changes: 3 additions & 3 deletions src/RecursivePublishable.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
use SilverStripe\Core\ClassInfo;
use SilverStripe\Core\Config\Config;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataExtension;
use SilverStripe\Core\Extension;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\FieldType\DBDatetime;
use SilverStripe\ORM\Queries\SQLUpdate;
Expand All @@ -17,9 +17,9 @@
* Provides owns / owned_by and recursive publishing API for all objects.
* This extension is added to DataObject by default
*
* @extends DataExtension<DataObject&static>
* @extends Extension<DataObject&static>
*/
class RecursivePublishable extends DataExtension
class RecursivePublishable extends Extension
{
/**
* List of relationships on this object that are "owned" by this object.
Expand Down
5 changes: 2 additions & 3 deletions src/Versioned.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use SilverStripe\Dev\Deprecation;
use SilverStripe\Forms\FieldList;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataExtension;
use SilverStripe\ORM\DataList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DataQuery;
Expand All @@ -38,9 +37,9 @@
* @property int $Version
* @mixin RecursivePublishable
*
* @extends DataExtension<DataObject&RecursivePublishable&static>
* @extends Extension<DataObject&RecursivePublishable&static>
*/
class Versioned extends DataExtension implements TemplateGlobalProvider, Resettable
class Versioned extends Extension implements TemplateGlobalProvider, Resettable
{
/**
* Versioning mode for this object.
Expand Down
4 changes: 2 additions & 2 deletions tests/php/VersionableExtensionsTest/TestExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
namespace SilverStripe\Versioned\Tests\VersionableExtensionsTest;

use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataExtension;
use SilverStripe\Core\Extension;
use SilverStripe\Versioned\VersionableExtension;

class TestExtension extends DataExtension implements VersionableExtension, TestOnly
class TestExtension extends Extension implements VersionableExtension, TestOnly
{
public function isVersionedTable($table)
{
Expand Down
4 changes: 2 additions & 2 deletions tests/php/VersionedTest/PublicExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
namespace SilverStripe\Versioned\Tests\VersionedTest;

use SilverStripe\Dev\TestOnly;
use SilverStripe\ORM\DataExtension;
use SilverStripe\Core\Extension;

/**
* Alters stage mode of extended object to be public
*/
class PublicExtension extends DataExtension implements TestOnly
class PublicExtension extends Extension implements TestOnly
{
protected function canViewNonLive($member = null)
{
Expand Down
Loading