From 9a30e487227cc1241cae4fcbac7e0e7637cdc58e Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Wed, 18 Oct 2023 09:02:35 +0000 Subject: [PATCH 1/5] Refactored package file structure Signed-off-by: Tom Wright --- CHANGELOG.md | 2 ++ composer.json | 4 ++-- src/{Integra => }/Context.php | 5 +++++ src/{Integra => }/Manifest.php | 0 src/{Integra => }/Structure/Author.php | 0 src/{Integra => }/Structure/Funding.php | 0 src/{Integra => }/Structure/Package.php | 0 src/global.php | 21 --------------------- 8 files changed, 9 insertions(+), 23 deletions(-) rename src/{Integra => }/Context.php (98%) rename src/{Integra => }/Manifest.php (100%) rename src/{Integra => }/Structure/Author.php (100%) rename src/{Integra => }/Structure/Funding.php (100%) rename src/{Integra => }/Structure/Package.php (100%) delete mode 100644 src/global.php diff --git a/CHANGELOG.md b/CHANGELOG.md index a3cde93..ced7d13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +* Refactored package file structure + ## v0.1.6 (2023-10-16) * Updated Atlas dependency diff --git a/composer.json b/composer.json index dc54892..c9b094e 100644 --- a/composer.json +++ b/composer.json @@ -25,10 +25,10 @@ }, "autoload": { "psr-4": { - "DecodeLabs\\Integra\\": "src/Integra" + "DecodeLabs\\Integra\\": "src/" }, "files": [ - "src/global.php" + "src/Context.php" ] }, "extra": { diff --git a/src/Integra/Context.php b/src/Context.php similarity index 98% rename from src/Integra/Context.php rename to src/Context.php index d40f230..5ebe923 100644 --- a/src/Integra/Context.php +++ b/src/Context.php @@ -15,11 +15,16 @@ use DecodeLabs\Coercion; use DecodeLabs\Collections\Tree; use DecodeLabs\Exceptional; +use DecodeLabs\Integra; use DecodeLabs\Systemic; use DecodeLabs\Terminus\Session; +use DecodeLabs\Veneer; use DecodeLabs\Veneer\LazyLoad; use DecodeLabs\Veneer\Plugin; +// Register the Veneer facade +Veneer::register(Context::class, Integra::class); + #[LazyLoad] class Context { diff --git a/src/Integra/Manifest.php b/src/Manifest.php similarity index 100% rename from src/Integra/Manifest.php rename to src/Manifest.php diff --git a/src/Integra/Structure/Author.php b/src/Structure/Author.php similarity index 100% rename from src/Integra/Structure/Author.php rename to src/Structure/Author.php diff --git a/src/Integra/Structure/Funding.php b/src/Structure/Funding.php similarity index 100% rename from src/Integra/Structure/Funding.php rename to src/Structure/Funding.php diff --git a/src/Integra/Structure/Package.php b/src/Structure/Package.php similarity index 100% rename from src/Integra/Structure/Package.php rename to src/Structure/Package.php diff --git a/src/global.php b/src/global.php deleted file mode 100644 index 83c4338..0000000 --- a/src/global.php +++ /dev/null @@ -1,21 +0,0 @@ - Date: Wed, 18 Oct 2023 10:05:14 +0000 Subject: [PATCH 2/5] Moved Veneer initiator to bottom of class Signed-off-by: Tom Wright --- src/Context.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Context.php b/src/Context.php index 5ebe923..f914430 100644 --- a/src/Context.php +++ b/src/Context.php @@ -22,9 +22,6 @@ use DecodeLabs\Veneer\LazyLoad; use DecodeLabs\Veneer\Plugin; -// Register the Veneer facade -Veneer::register(Context::class, Integra::class); - #[LazyLoad] class Context { @@ -491,3 +488,6 @@ public function getExtra(): Tree return $this->getLocalManifest()->getExtra(); } } + +// Register the Veneer facade +Veneer::register(Context::class, Integra::class); From e30be9c22e9c5c4fec542df9e10db0b85bd5f959 Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Mon, 30 Oct 2023 08:29:07 +0000 Subject: [PATCH 3/5] Fixed readme Signed-off-by: Tom Wright --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c38fa77..cc6a675 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![PHP from Packagist](https://img.shields.io/packagist/php-v/decodelabs/integra?style=flat)](https://packagist.org/packages/decodelabs/integra) [![Latest Version](https://img.shields.io/packagist/v/decodelabs/integra.svg?style=flat)](https://packagist.org/packages/decodelabs/integra) [![Total Downloads](https://img.shields.io/packagist/dt/decodelabs/integra.svg?style=flat)](https://packagist.org/packages/decodelabs/integra) -[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/decodelabs/integra/integrate.yml?branch=develop)](https://github.com/string|int|floatdecodelabs/integra/actions/workflows/integrate.yml) +[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/decodelabs/integra/integrate.yml?branch=develop)](https://github.com/decodelabs/integra/actions/workflows/integrate.yml) [![PHPStan](https://img.shields.io/badge/PHPStan-enabled-44CC11.svg?longCache=true&style=flat)](https://github.com/phpstan/phpstan) [![License](https://img.shields.io/packagist/l/decodelabs/integra?style=flat)](https://packagist.org/packages/decodelabs/integra) From ccdf43a65eabde0b6b1b55b8980b9156c7a55e33 Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Mon, 30 Oct 2023 08:35:23 +0000 Subject: [PATCH 4/5] Removed default composer license value Signed-off-by: Tom Wright --- CHANGELOG.md | 1 + src/Manifest.php | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ced7d13..261f556 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +* Removed default composer license value * Refactored package file structure ## v0.1.6 (2023-10-16) diff --git a/src/Manifest.php b/src/Manifest.php index b33ffdd..c0794cf 100644 --- a/src/Manifest.php +++ b/src/Manifest.php @@ -139,9 +139,7 @@ public function getLicense(): string|array|null return Coercion::toStringOrNull(array_pop($arr)); } - return $this->data->license->as('?string', [ - 'default' => 'proprietary' - ]); + return $this->data->license->as('?string'); } /** From b25042a516eb3fa1b73af0512106038439b1a6b8 Mon Sep 17 00:00:00 2001 From: Tom Wright Date: Mon, 30 Oct 2023 08:35:47 +0000 Subject: [PATCH 5/5] Updated changelog Signed-off-by: Tom Wright --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 261f556..36373d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +## v0.1.7 (2023-10-30) * Removed default composer license value * Refactored package file structure