diff --git a/CHANGELOG.md b/CHANGELOG.md index a37d822..55aa049 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Typogrify Changelog +## 5.0.1 - 2024.06.18 +### Added +* Added `ServicesTrait` for the plugin service component registration + ## 5.0.0 - 2024.04.16 ### Added * Stable release for Craft CMS 5 diff --git a/composer.json b/composer.json index 150bcb5..ba23a4e 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "nystudio107/craft-typogrify", "description": "Typogrify prettifies your web typography by preventing ugly quotes and 'widows' and more", "type": "craft-plugin", - "version": "5.0.0", + "version": "5.0.1", "keywords": [ "craft", "cms", diff --git a/src/Typogrify.php b/src/Typogrify.php index 406e1b7..ad545ed 100644 --- a/src/Typogrify.php +++ b/src/Typogrify.php @@ -1,11 +1,11 @@ TypogrifyService::class, - ]; - - parent::__construct($id, $parent, $config); - } - /** * @inheritdoc */ diff --git a/src/config.php b/src/config.php index 7780fd6..2a4418c 100755 --- a/src/config.php +++ b/src/config.php @@ -1,11 +1,11 @@ [ + 'typogrify' => TypogrifyService::class, + ], + ]; + } + + // Public Methods + // ========================================================================= + + /** + * Returns the typogrify service + * + * @return TypogrifyService The typogrify service + * @throws InvalidConfigException + */ + public function getTypogrify(): TypogrifyService + { + return $this->get('typogrify'); + } +} diff --git a/src/services/TypogrifyService.php b/src/services/TypogrifyService.php index 4cf15c6..559cbd7 100644 --- a/src/services/TypogrifyService.php +++ b/src/services/TypogrifyService.php @@ -1,12 +1,12 @@