Skip to content

Add httpsoft/http-message (PSR-17 factories) support #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add httpsoft/http-message support
  • Loading branch information
vjik committed May 14, 2023
commit e683cb0cf578a63fd9d08aef1f517d6a3e7dd6ac
1 change: 1 addition & 0 deletions src/Composer/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [],
],
];

Expand Down
6 changes: 6 additions & 0 deletions src/Strategy/CommonPsr17ClassesStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -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',
Expand All @@ -81,6 +86,7 @@ final class CommonPsr17ClassesStrategy implements DiscoveryStrategy
'Http\Factory\Slim\UriFactory',
'Laminas\Diactoros\UriFactory',
'Slim\Psr7\Factory\UriFactory',
'HttpSoft\Message\UriFactory',
],
];

Expand Down