From e683cb0cf578a63fd9d08aef1f517d6a3e7dd6ac Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Sun, 14 May 2023 21:11:29 +0300 Subject: [PATCH 1/3] Add `httpsoft/http-message` support --- src/Composer/Plugin.php | 1 + src/Strategy/CommonPsr17ClassesStrategy.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/Composer/Plugin.php b/src/Composer/Plugin.php index bba2e2b..008f3d0 100644 --- a/src/Composer/Plugin.php +++ b/src/Composer/Plugin.php @@ -81,6 +81,7 @@ class Plugin implements PluginInterface, EventSubscriberInterface 'http-interop/http-factory-guzzle' => [], 'http-interop/http-factory-diactoros' => [], 'http-interop/http-factory-slim' => [], + 'httpsoft/http-message' => [], ], ]; diff --git a/src/Strategy/CommonPsr17ClassesStrategy.php b/src/Strategy/CommonPsr17ClassesStrategy.php index 3e1c29b..9e858f9 100644 --- a/src/Strategy/CommonPsr17ClassesStrategy.php +++ b/src/Strategy/CommonPsr17ClassesStrategy.php @@ -31,6 +31,7 @@ final class CommonPsr17ClassesStrategy implements DiscoveryStrategy 'Http\Factory\Slim\RequestFactory', 'Laminas\Diactoros\RequestFactory', 'Slim\Psr7\Factory\RequestFactory', + 'HttpSoft\Message\RequestFactory', ], ResponseFactoryInterface::class => [ 'Phalcon\Http\Message\ResponseFactory', @@ -41,6 +42,7 @@ final class CommonPsr17ClassesStrategy implements DiscoveryStrategy 'Http\Factory\Slim\ResponseFactory', 'Laminas\Diactoros\ResponseFactory', 'Slim\Psr7\Factory\ResponseFactory', + 'HttpSoft\Message\ResponseFactory', ], ServerRequestFactoryInterface::class => [ 'Phalcon\Http\Message\ServerRequestFactory', @@ -51,6 +53,7 @@ final class CommonPsr17ClassesStrategy implements DiscoveryStrategy 'Http\Factory\Slim\ServerRequestFactory', 'Laminas\Diactoros\ServerRequestFactory', 'Slim\Psr7\Factory\ServerRequestFactory', + 'HttpSoft\Message\ServerRequestFactory', ], StreamFactoryInterface::class => [ 'Phalcon\Http\Message\StreamFactory', @@ -61,6 +64,7 @@ final class CommonPsr17ClassesStrategy implements DiscoveryStrategy 'Http\Factory\Slim\StreamFactory', 'Laminas\Diactoros\StreamFactory', 'Slim\Psr7\Factory\StreamFactory', + 'HttpSoft\Message\StreamFactory', ], UploadedFileFactoryInterface::class => [ 'Phalcon\Http\Message\UploadedFileFactory', @@ -71,6 +75,7 @@ final class CommonPsr17ClassesStrategy implements DiscoveryStrategy 'Http\Factory\Slim\UploadedFileFactory', 'Laminas\Diactoros\UploadedFileFactory', 'Slim\Psr7\Factory\UploadedFileFactory', + 'HttpSoft\Message\UploadedFileFactory', ], UriFactoryInterface::class => [ 'Phalcon\Http\Message\UriFactory', @@ -81,6 +86,7 @@ final class CommonPsr17ClassesStrategy implements DiscoveryStrategy 'Http\Factory\Slim\UriFactory', 'Laminas\Diactoros\UriFactory', 'Slim\Psr7\Factory\UriFactory', + 'HttpSoft\Message\UriFactory', ], ]; From 129cd8b3a81e88f67a894f6474af24a025ea8d2b Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Sun, 14 May 2023 21:19:18 +0300 Subject: [PATCH 2/3] Changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index abbab8f..ccf645a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## 1.19.0 - 2023-XX-XX + +- [#241](https://github.com/php-http/discovery/pull/241) - Support discovering PSR-17 factories of `httpsoft/http-message` package + ## 1.18.0 - 2023-05-03 - [#235](https://github.com/php-http/discovery/pull/235) - Deprecate HttpClientDiscovery, use Psr18ClientDiscovery instead From 942c5e0952f026cc8f0dfce8e41cd370ab992460 Mon Sep 17 00:00:00 2001 From: David Buchmann Date: Wed, 24 May 2023 10:03:38 +0200 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54b9085..f1d048d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Change Log -## 1.19.0 - 2023-XX-XX +## (unreleased) - [#241](https://github.com/php-http/discovery/pull/241) - Support discovering PSR-17 factories of `httpsoft/http-message` package