diff --git a/CHANGELOG.md b/CHANGELOG.md index 31ba559..a4225f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## [Unreleased] + +### Added + +- Support for `Innmind\Http\Method::query` + +### Changed + +- Requires PHP `8.5` + ## 6.0.0 - 2026-02-08 ### Changed diff --git a/composer.json b/composer.json index 313d377..44aeeb3 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "issues": "http://github.com/Innmind/Router/issues" }, "require": { - "php": "~8.4", + "php": "~8.5", "innmind/url": "~5.0", "innmind/immutable": "~6.0", "innmind/http": "~9.0", diff --git a/psalm.xml b/psalm.xml index b4ba9d5..867601d 100644 --- a/psalm.xml +++ b/psalm.xml @@ -14,7 +14,4 @@ - - - diff --git a/src/Method.php b/src/Method.php index e4ab829..174ada9 100644 --- a/src/Method.php +++ b/src/Method.php @@ -19,6 +19,17 @@ public static function get(): Component return self::of(Http\Method::get); } + /** + * @psalm-pure + * + * @return Component + */ + #[\NoDiscard] + public static function query(): Component + { + return self::of(Http\Method::query); + } + /** * @psalm-pure * diff --git a/src/Pipe.php b/src/Pipe.php index 09c7c91..d1a07f0 100644 --- a/src/Pipe.php +++ b/src/Pipe.php @@ -35,6 +35,12 @@ public function get(): Pipe\Method return Pipe\Method::of(Method::get()); } + #[\NoDiscard] + public function query(): Pipe\Method + { + return Pipe\Method::of(Method::query()); + } + #[\NoDiscard] public function post(): Pipe\Method { diff --git a/src/Pipe/Endpoint.php b/src/Pipe/Endpoint.php index 0fccf2f..c757dae 100644 --- a/src/Pipe/Endpoint.php +++ b/src/Pipe/Endpoint.php @@ -77,6 +77,15 @@ public function get(): Endpoint\Method ); } + #[\NoDiscard] + public function query(): Endpoint\Method + { + return Endpoint\Method::of( + $this->endpoint, + Method::query(), + ); + } + #[\NoDiscard] public function post(): Endpoint\Method { diff --git a/src/Pipe/Forward.php b/src/Pipe/Forward.php index 86b7eda..40bed2b 100644 --- a/src/Pipe/Forward.php +++ b/src/Pipe/Forward.php @@ -30,6 +30,12 @@ public function get(): Forward\Method return Forward\Method::of(Method::get()); } + #[\NoDiscard] + public function query(): Forward\Method + { + return Forward\Method::of(Method::query()); + } + #[\NoDiscard] public function post(): Forward\Method {