From dcf2748c89459e23feb6c6b657ff9dc4569efd88 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sat, 1 Nov 2025 14:42:53 +0100 Subject: [PATCH 1/5] update dependencies --- composer.json | 4 ++-- src/Constraint.php | 9 ++++++++- src/Predicate.php | 47 ---------------------------------------------- 3 files changed, 10 insertions(+), 50 deletions(-) delete mode 100644 src/Predicate.php diff --git a/composer.json b/composer.json index 2ed01fe..a1f96f6 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,8 @@ }, "require": { "php": "~8.2", - "innmind/immutable": "~5.19", - "innmind/time-continuum": "~3.4|^4.0.2" + "innmind/immutable": "dev-next", + "innmind/time-continuum": "dev-next" }, "autoload": { "psr-4": { diff --git a/src/Constraint.php b/src/Constraint.php index 99a8373..078afd3 100644 --- a/src/Constraint.php +++ b/src/Constraint.php @@ -284,7 +284,14 @@ public function mapFailures(callable $map): self #[\NoDiscard] public function asPredicate(): Predicate { - return namespace\Predicate::of($this->implementation); + /** + * @psalm-suppress MixedArgument + * @var Predicate + */ + return Predicate::of(fn($value) => ($this->implementation)($value)->match( + static fn() => true, + static fn() => false, + )); } /** diff --git a/src/Predicate.php b/src/Predicate.php deleted file mode 100644 index 80bfcf2..0000000 --- a/src/Predicate.php +++ /dev/null @@ -1,47 +0,0 @@ - - * @psalm-immutable - */ -final class Predicate implements PredicateInterface -{ - /** - * @param Constraint\Implementation $constraint - */ - private function __construct( - private Constraint\Implementation $constraint, - ) { - } - - #[\Override] - public function __invoke(mixed $value): bool - { - return ($this->constraint)($value)->match( - static fn() => true, - static fn() => false, - ); - } - - /** - * @internal - * @template A - * @psalm-pure - * - * @param Constraint\Implementation $constraint - * - * @return self - */ - #[\NoDiscard] - public static function of(Constraint\Implementation $constraint): self - { - return new self($constraint); - } -} From 795fc2d8da213dba4843941e89f237785a9faaf9 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sat, 1 Nov 2025 14:44:45 +0100 Subject: [PATCH 2/5] require php 8.4 --- .github/workflows/ci.yml | 10 ++++------ CHANGELOG.md | 6 ++++++ composer.json | 2 +- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3dcfd19..a5ee281 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,13 +4,11 @@ on: [push] jobs: blackbox: - uses: innmind/github-workflows/.github/workflows/black-box-matrix.yml@main + uses: innmind/github-workflows/.github/workflows/black-box-matrix.yml@next coverage: - uses: innmind/github-workflows/.github/workflows/coverage-matrix.yml@main + uses: innmind/github-workflows/.github/workflows/coverage-matrix.yml@next secrets: inherit psalm: - uses: innmind/github-workflows/.github/workflows/psalm-matrix.yml@main + uses: innmind/github-workflows/.github/workflows/psalm-matrix.yml@next cs: - uses: innmind/github-workflows/.github/workflows/cs.yml@main - with: - php-version: '8.2' + uses: innmind/github-workflows/.github/workflows/cs.yml@next diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fe9eb3..55462ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased] + +### Changed + +- Require PHP `8.4` + ## 2.3.0 - 2025-09-15 ### Added diff --git a/composer.json b/composer.json index a1f96f6..574ae01 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "issues": "http://github.com/innmind/validation/issues" }, "require": { - "php": "~8.2", + "php": "~8.4", "innmind/immutable": "dev-next", "innmind/time-continuum": "dev-next" }, From c9ce87a0689783cfa4517f79266e5acb75350014 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sun, 18 Jan 2026 15:41:45 +0100 Subject: [PATCH 3/5] tag dependencies --- .github/workflows/ci.yml | 8 ++++---- composer.json | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5ee281..180ee0d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,11 +4,11 @@ on: [push] jobs: blackbox: - uses: innmind/github-workflows/.github/workflows/black-box-matrix.yml@next + uses: innmind/github-workflows/.github/workflows/black-box-matrix.yml@main coverage: - uses: innmind/github-workflows/.github/workflows/coverage-matrix.yml@next + uses: innmind/github-workflows/.github/workflows/coverage-matrix.yml@main secrets: inherit psalm: - uses: innmind/github-workflows/.github/workflows/psalm-matrix.yml@next + uses: innmind/github-workflows/.github/workflows/psalm-matrix.yml@main cs: - uses: innmind/github-workflows/.github/workflows/cs.yml@next + uses: innmind/github-workflows/.github/workflows/cs.yml@main diff --git a/composer.json b/composer.json index 574ae01..6c0e207 100644 --- a/composer.json +++ b/composer.json @@ -16,8 +16,8 @@ }, "require": { "php": "~8.4", - "innmind/immutable": "dev-next", - "innmind/time-continuum": "dev-next" + "innmind/immutable": "~6.0", + "innmind/time-continuum": "~5.0" }, "autoload": { "psr-4": { @@ -25,7 +25,7 @@ } }, "require-dev": { - "innmind/static-analysis": "^1.2.1", + "innmind/static-analysis": "~1.3", "innmind/black-box": "~6.1", "innmind/coding-standard": "~2.0" } From db4261b2975839a34341a00470c468855ee23d66 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sun, 18 Jan 2026 15:45:21 +0100 Subject: [PATCH 4/5] update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 55462ab..bf6d114 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ ### Changed - Require PHP `8.4` +- Require `innmind/immutable:~6.0` +- Require `innmind/time-continuum:~5.0` ## 2.3.0 - 2025-09-15 From b5fa1ae6dddfb10658270d2c7e91bb950a8504be Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Sun, 18 Jan 2026 15:45:47 +0100 Subject: [PATCH 5/5] add extensive CI --- .github/workflows/extensive.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/extensive.yml diff --git a/.github/workflows/extensive.yml b/.github/workflows/extensive.yml new file mode 100644 index 0000000..257f139 --- /dev/null +++ b/.github/workflows/extensive.yml @@ -0,0 +1,12 @@ +name: Extensive CI + +on: + push: + tags: + - '*' + paths: + - '.github/workflows/extensive.yml' + +jobs: + blackbox: + uses: innmind/github-workflows/.github/workflows/extensive.yml@main