From ef3df292a78922e1bc859480fba46cdb8be459e4 Mon Sep 17 00:00:00 2001 From: Julien Mercier-Rojas Date: Mon, 25 Mar 2024 16:03:41 +0100 Subject: [PATCH 1/3] Allow Stringable type --- src/Domain/Identity/Identity.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Domain/Identity/Identity.php b/src/Domain/Identity/Identity.php index 0a051f5..eeb88ba 100644 --- a/src/Domain/Identity/Identity.php +++ b/src/Domain/Identity/Identity.php @@ -16,7 +16,7 @@ * Interface Identity * @package JeckelLab\Contract\Domain\Identity * @psalm-immutable - * @template IdentityType of int|string + * @template IdentityType of int|string|Stringable */ interface Identity extends Equality, Stringable, JsonSerializable { @@ -26,15 +26,15 @@ interface Identity extends Equality, Stringable, JsonSerializable public static function new(): static; /** - * @param int|string $identity + * @param int|string|Stringable $identity * @return static * @throws InvalidIdException */ - public static function from(int|string $identity): static; + public static function from(int|string|Stringable $identity): static; /** - * @return int|string + * @return int|string|Stringable * @psalm-return IdentityType */ - public function id(): int|string; + public function id(): int|string|Stringable; } From b4ff293de9b8d206b43fa92e396a39e4bac45a92 Mon Sep 17 00:00:00 2001 From: Julien Mercier-Rojas Date: Mon, 25 Mar 2024 16:06:15 +0100 Subject: [PATCH 2/3] Allow plugins --- composer.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/composer.json b/composer.json index df48c39..25c7909 100644 --- a/composer.json +++ b/composer.json @@ -38,5 +38,11 @@ }, "suggest": { "vimeo/psalm": "Using psalm with this 'contract' will enable immutability and strong typing verification" + }, + "config": { + "allow-plugins": { + "infection/extension-installer": true, + "phpro/grumphp": true + } } } From e3ccd8a30addeacd38910ed58680bd1c6d4ff3a6 Mon Sep 17 00:00:00 2001 From: Julien Mercier-Rojas Date: Mon, 25 Mar 2024 16:07:19 +0100 Subject: [PATCH 3/3] Add php 8.2 and 8.3 to validation matrix --- .github/workflows/validate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 5824a3c..66c53e4 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -49,7 +49,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: [ '8.0', '8.1' ] + php-versions: [ '8.0', '8.1', '8.2', '8.3' ] include: - php-versions: 8.0 env: COMPOSER_FLAGS="--prefer-lowest"