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" 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 + } } } 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; }