From c00a34c81e115c8efc8112acdd3ae71a761989cb Mon Sep 17 00:00:00 2001 From: Josh Crawford Date: Thu, 10 Mar 2022 08:26:12 +1100 Subject: [PATCH] 2.0.0-beta.1 --- CHANGELOG.md | 6 ++++++ composer.json | 2 +- src/fields/IconPickerField.php | 4 ++-- src/services/Cache.php | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2e2580..4f27ce0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 2.0.0-beta.1 - 2022-03-10 + +### Changed +- Now requires PHP `^8.0.2`. +- Now requires Craft `^4.0.0-beta.1`. + ## 1.1.12 - 2021-11-01 ### Fixed diff --git a/composer.json b/composer.json index 84994c4..2f9024c 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ ], "require": { "php": "^8.0.2", - "craftcms/cms": "^4.0.0-alpha", + "craftcms/cms": "^4.0.0-beta.1", "verbb/base": "^2.0.0-beta", "cakephp/core": "^3.5", "cakephp/utility": "^3.3.12", diff --git a/src/fields/IconPickerField.php b/src/fields/IconPickerField.php index 9bd64b9..9ad16ec 100644 --- a/src/fields/IconPickerField.php +++ b/src/fields/IconPickerField.php @@ -87,7 +87,7 @@ public function getInputHtml(mixed $value, ?ElementInterface $element = null): s public function getSettingsHtml(): ?string { - $settings = IconPicker::getInstance()->getSettings(); + $settings = IconPicker::$plugin->getSettings(); $iconSetsPath = $settings->getIconSetsPath(); $errors = []; @@ -173,7 +173,7 @@ public function serializeValue(mixed $value, ?ElementInterface $element = null): public function afterSave(bool $isNew): void { - $settings = IconPicker::getInstance()->getSettings(); + $settings = IconPicker::$plugin->getSettings(); $iconSets = IconPicker::$plugin->getService()->getEnabledIconSets($this); // When saving the field, fire off queue jobs to prime the icon cache diff --git a/src/services/Cache.php b/src/services/Cache.php index 7d2e182..fc1582d 100644 --- a/src/services/Cache.php +++ b/src/services/Cache.php @@ -15,7 +15,7 @@ class Cache extends Component public function clearAndRegenerate(): void { - $settings = IconPicker::getInstance()->getSettings(); + $settings = IconPicker::$plugin->getSettings(); // Clear and regenerate caches $iconSets = IconPicker::$plugin->getService()->getIconSets();