From b47dc2fd9a00e0091c72614bb20bb9bafd3ab871 Mon Sep 17 00:00:00 2001 From: Andy Carter Date: Mon, 27 Jul 2020 19:04:41 +0100 Subject: [PATCH 1/2] Update Cake requirement to 4 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 919888e..433e2e1 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,7 @@ } ], "require": { - "cakephp/cakephp": "~3.0", + "cakephp/cakephp": "~4.0", "drmonkeyninja/social-share-url": "^1.0" }, "autoload": { From 83d399e05ba055464bcd3e3cde24a98a8f38f532 Mon Sep 17 00:00:00 2001 From: Andy Carter Date: Mon, 27 Jul 2020 21:11:02 +0100 Subject: [PATCH 2/2] Update for CakePHP 4 --- README.md | 8 ++++---- src/Plugin.php | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 src/Plugin.php diff --git a/README.md b/README.md index 3565f24..fa1a13b 100644 --- a/README.md +++ b/README.md @@ -7,16 +7,16 @@ The aim of the plugin is to keep things simple. It doesn't come packaged with an Social Share currently supports Delicious, Digg, Evernote, Facebook, Friend Feed, Google Bookmarks, Google+, LinkedIn, Newsvine, Pinterest, Pocket, Reddit Slashdot, simple email, StumbleUpon, Technorati, Tumblr, Twitter and WhatsApp. -**Note**: This branch is for CakePHP 3.x. +**Note**: This branch is for CakePHP 4.x. ## Installation -Install using composer: `composer require drmonkeyninja/cakephp-social-share:3.0.*` +Install using composer: `composer require drmonkeyninja/cakephp-social-share:4.*` -Then add the following line to your bootstrap.php to load the plugin. +Then add the following line to your Application.php file to load the plugin. ```php -Plugin::load('SocialShare'); +$this->addPlugin(\SocialShare\Plugin::class); ``` Also don't forget to add the helper in your `AppView`:- diff --git a/src/Plugin.php b/src/Plugin.php new file mode 100644 index 0000000..a48b911 --- /dev/null +++ b/src/Plugin.php @@ -0,0 +1,16 @@ +