From 6df3b6c27d70e68e6df5a5b95d5fef6ec50861db Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Tue, 25 Oct 2022 17:21:04 +0200 Subject: [PATCH] Remove interface ActionContract --- RELEASE_NOTES.md | 1 + .../FindsContentLengthForImageObject.php | 2 +- .../Actions/GeneratesSidebarTableOfContents.php | 2 +- .../src/Actions/PublishesHomepageView.php | 2 +- .../framework/src/Actions/PublishesHydeViews.php | 2 +- .../framework/src/Contracts/ActionContract.php | 14 -------------- .../Feature/Actions/PublishesHomepageViewTest.php | 5 ----- 7 files changed, 5 insertions(+), 23 deletions(-) delete mode 100644 packages/framework/src/Contracts/ActionContract.php diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index bdc9f0cab45..10c3d853f57 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -41,6 +41,7 @@ If you however have written custom code that explicitly references the old names ### Removed - Removed MetadataItemContract.php (use new abstract class BaseMetadataElement) +- Removed interface ActionContract.php ### Fixed - for any bug fixes. diff --git a/packages/framework/src/Actions/Constructors/FindsContentLengthForImageObject.php b/packages/framework/src/Actions/Constructors/FindsContentLengthForImageObject.php index c0298a93cfa..797c0c72abc 100644 --- a/packages/framework/src/Actions/Constructors/FindsContentLengthForImageObject.php +++ b/packages/framework/src/Actions/Constructors/FindsContentLengthForImageObject.php @@ -12,7 +12,7 @@ /** * @see \Hyde\Framework\Testing\Feature\FindsContentLengthForImageObjectTest */ -class FindsContentLengthForImageObject implements ActionContract +class FindsContentLengthForImageObject { protected Image $image; diff --git a/packages/framework/src/Actions/GeneratesSidebarTableOfContents.php b/packages/framework/src/Actions/GeneratesSidebarTableOfContents.php index a2d55256f41..588b862f108 100644 --- a/packages/framework/src/Actions/GeneratesSidebarTableOfContents.php +++ b/packages/framework/src/Actions/GeneratesSidebarTableOfContents.php @@ -14,7 +14,7 @@ * * @see \Hyde\Framework\Testing\Feature\Actions\GeneratesSidebarTableOfContentsTest */ -class GeneratesSidebarTableOfContents implements ActionContract +class GeneratesSidebarTableOfContents { protected string $markdown; diff --git a/packages/framework/src/Actions/PublishesHomepageView.php b/packages/framework/src/Actions/PublishesHomepageView.php index d5419c561b4..fea702c74d3 100644 --- a/packages/framework/src/Actions/PublishesHomepageView.php +++ b/packages/framework/src/Actions/PublishesHomepageView.php @@ -10,7 +10,7 @@ * * @see \Hyde\Framework\Testing\Feature\Actions\PublishesHomepageViewTest */ -class PublishesHomepageView implements ActionContract +class PublishesHomepageView { public static array $homePages = [ 'welcome' => [ diff --git a/packages/framework/src/Actions/PublishesHydeViews.php b/packages/framework/src/Actions/PublishesHydeViews.php index 490fb82d74e..9a4e88fc305 100644 --- a/packages/framework/src/Actions/PublishesHydeViews.php +++ b/packages/framework/src/Actions/PublishesHydeViews.php @@ -11,7 +11,7 @@ * * @see \Hyde\Framework\Testing\Feature\Actions\PublishesHomepageViewTest */ -class PublishesHydeViews implements ActionContract +class PublishesHydeViews { public static array $options = [ 'layouts' => [ diff --git a/packages/framework/src/Contracts/ActionContract.php b/packages/framework/src/Contracts/ActionContract.php deleted file mode 100644 index 64e97fcc0d0..00000000000 --- a/packages/framework/src/Contracts/ActionContract.php +++ /dev/null @@ -1,14 +0,0 @@ -assertInstanceOf(ActionContract::class, new PublishesHomepageView('foo')); - } - public function test_home_pages_array_contains_all_available_home_pages() { $array = PublishesHomepageView::$homePages;