Skip to content

Commit

Permalink
API Replace Extension subclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Aug 28, 2024
1 parent c2d37cc commit 5027862
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
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

0 comments on commit 5027862

Please sign in to comment.