From 81d98eec5665c94660cd0732b47fd69aa5c6140a Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Tue, 17 Oct 2023 23:06:09 +0000 Subject: [PATCH] Refactored package file structure Signed-off-by: Tom Wright --- CHANGELOG.md | 2 ++ composer.json | 14 +++++++------- src/{Dictum => }/Context.php | 5 +++++ src/{Dictum => }/Plugins/Number.php | 0 src/{Dictum => }/Plugins/Time.php | 0 src/{Dictum => }/Text.php | 0 src/global.php | 20 -------------------- 7 files changed, 14 insertions(+), 27 deletions(-) rename src/{Dictum => }/Context.php (99%) rename src/{Dictum => }/Plugins/Number.php (100%) rename src/{Dictum => }/Plugins/Time.php (100%) rename src/{Dictum => }/Text.php (100%) delete mode 100644 src/global.php diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ff3b6d..f5f1f2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Refactored package file structure + ## v0.5.1 (2023-09-26) * Converted phpstan doc comments to generic diff --git a/composer.json b/composer.json index 7294bc3..dfc2062 100644 --- a/composer.json +++ b/composer.json @@ -2,12 +2,12 @@ "name": "decodelabs/dictum", "description": "Text formatting tools", "type": "library", - "keywords": ["text", "format"], + "keywords": [ "text", "format" ], "license": "MIT", - "authors": [{ - "name": "Tom Wright", - "email": "tom@inflatablecookie.com" - }], + "authors": [ { + "name": "Tom Wright", + "email": "tom@inflatablecookie.com" + } ], "require": { "php": "^8.0", "symfony/polyfill-mbstring": "^1.7", @@ -25,10 +25,10 @@ }, "autoload": { "psr-4": { - "DecodeLabs\\Dictum\\": "src/Dictum" + "DecodeLabs\\Dictum\\": "src/" }, "files": [ - "src/global.php" + "src/Context.php" ] }, "extra": { diff --git a/src/Dictum/Context.php b/src/Context.php similarity index 99% rename from src/Dictum/Context.php rename to src/Context.php index cc137a9..c7c1226 100644 --- a/src/Dictum/Context.php +++ b/src/Context.php @@ -9,16 +9,21 @@ namespace DecodeLabs\Dictum; +use DecodeLabs\Dictum; use DecodeLabs\Dictum\Plugins\Number as NumberPlugin; use DecodeLabs\Dictum\Plugins\Time as TimePlugin; use DecodeLabs\Exceptional; +use DecodeLabs\Veneer; use DecodeLabs\Veneer\LazyLoad; use DecodeLabs\Veneer\Plugin; use Stringable; +// Register the Veneer facade +Veneer::register(Context::class, Dictum::class); + class Context { #[Plugin] diff --git a/src/Dictum/Plugins/Number.php b/src/Plugins/Number.php similarity index 100% rename from src/Dictum/Plugins/Number.php rename to src/Plugins/Number.php diff --git a/src/Dictum/Plugins/Time.php b/src/Plugins/Time.php similarity index 100% rename from src/Dictum/Plugins/Time.php rename to src/Plugins/Time.php diff --git a/src/Dictum/Text.php b/src/Text.php similarity index 100% rename from src/Dictum/Text.php rename to src/Text.php diff --git a/src/global.php b/src/global.php deleted file mode 100644 index 03d6805..0000000 --- a/src/global.php +++ /dev/null @@ -1,20 +0,0 @@ -