From d43406cfcdb96410b867aeba4966d045ac4e550e Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Tue, 20 Aug 2024 16:26:28 +1200 Subject: [PATCH] API Replace Extension subclasses --- src/RecursivePublishable.php | 6 +++--- src/Versioned.php | 6 +++--- tests/php/VersionableExtensionsTest/TestExtension.php | 4 ++-- tests/php/VersionedTest/PublicExtension.php | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/RecursivePublishable.php b/src/RecursivePublishable.php index abba346a..bb52cf02 100644 --- a/src/RecursivePublishable.php +++ b/src/RecursivePublishable.php @@ -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; @@ -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 + * @extends Extension */ -class RecursivePublishable extends DataExtension +class RecursivePublishable extends Extension { /** * List of relationships on this object that are "owned" by this object. diff --git a/src/Versioned.php b/src/Versioned.php index 11d04ac7..79db4d83 100644 --- a/src/Versioned.php +++ b/src/Versioned.php @@ -16,7 +16,7 @@ use SilverStripe\Dev\Deprecation; use SilverStripe\Forms\FieldList; use SilverStripe\ORM\ArrayList; -use SilverStripe\ORM\DataExtension; +use SilverStripe\Core\Extension; use SilverStripe\ORM\DataList; use SilverStripe\ORM\DataObject; use SilverStripe\ORM\DataQuery; @@ -38,9 +38,9 @@ * @property int $Version * @mixin RecursivePublishable * - * @extends DataExtension + * @extends Extension */ -class Versioned extends DataExtension implements TemplateGlobalProvider, Resettable +class Versioned extends Extension implements TemplateGlobalProvider, Resettable { /** * Versioning mode for this object. diff --git a/tests/php/VersionableExtensionsTest/TestExtension.php b/tests/php/VersionableExtensionsTest/TestExtension.php index 60a41581..4eea94c9 100644 --- a/tests/php/VersionableExtensionsTest/TestExtension.php +++ b/tests/php/VersionableExtensionsTest/TestExtension.php @@ -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) { diff --git a/tests/php/VersionedTest/PublicExtension.php b/tests/php/VersionedTest/PublicExtension.php index 75fae2b7..3db11be5 100644 --- a/tests/php/VersionedTest/PublicExtension.php +++ b/tests/php/VersionedTest/PublicExtension.php @@ -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 { public function canViewNonLive($member = null) {