-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't autowire controllers if no PSR-7 implementation is found, close #…
- Loading branch information
Showing
9 changed files
with
129 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
services: | ||
# Register nyholm/psr7 services for autowiring with PSR-17 (HTTP factories) | ||
Psr\Http\Message\RequestFactoryInterface: '@nyholm.psr7.psr17_factory' | ||
Psr\Http\Message\ResponseFactoryInterface: '@nyholm.psr7.psr17_factory' | ||
Psr\Http\Message\ServerRequestFactoryInterface: '@nyholm.psr7.psr17_factory' | ||
Psr\Http\Message\StreamFactoryInterface: '@nyholm.psr7.psr17_factory' | ||
Psr\Http\Message\UploadedFileFactoryInterface: '@nyholm.psr7.psr17_factory' | ||
Psr\Http\Message\UriFactoryInterface: '@nyholm.psr7.psr17_factory' | ||
|
||
# Register nyholm/psr7 services for autowiring with HTTPlug factories | ||
Http\Message\MessageFactory: '@nyholm.psr7.httplug_factory' | ||
Http\Message\RequestFactory: '@nyholm.psr7.httplug_factory' | ||
Http\Message\ResponseFactory: '@nyholm.psr7.httplug_factory' | ||
Http\Message\StreamFactory: '@nyholm.psr7.httplug_factory' | ||
Http\Message\UriFactory: '@nyholm.psr7.httplug_factory' | ||
|
||
nyholm.psr7.psr17_factory: | ||
class: Nyholm\Psr7\Factory\Psr17Factory | ||
|
||
nyholm.psr7.httplug_factory: | ||
class: Nyholm\Psr7\Factory\HttplugFactory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
services: | ||
_defaults: | ||
autowire: true | ||
autoconfigure: true | ||
|
||
Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface: '@Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory' | ||
|
||
Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface: '@Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory' | ||
|
||
Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory: null | ||
Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory: null | ||
|
||
# Uncomment the following line to allow controllers to receive a | ||
# PSR-7 server request object instead of an HttpFoundation request | ||
Symfony\Bridge\PsrHttpMessage\ArgumentValueResolver\PsrServerRequestResolver: null | ||
|
||
# Uncomment the following line to allow controllers to return a | ||
# PSR-7 response object instead of an HttpFoundation response | ||
Symfony\Bridge\PsrHttpMessage\EventListener\PsrResponseListener: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
fixtures/applications/Symfony/config/packages/psr_http_message_bridge.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
services: | ||
_defaults: | ||
autowire: true | ||
autoconfigure: true | ||
|
||
Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface: '@Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory' | ||
|
||
Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface: '@Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory' | ||
|
||
Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory: null | ||
Symfony\Bridge\PsrHttpMessage\Factory\PsrHttpFactory: null | ||
|
||
# Uncomment the following line to allow controllers to receive a | ||
# PSR-7 server request object instead of an HttpFoundation request | ||
Symfony\Bridge\PsrHttpMessage\ArgumentValueResolver\PsrServerRequestResolver: null | ||
|
||
# Uncomment the following line to allow controllers to return a | ||
# PSR-7 response object instead of an HttpFoundation response | ||
Symfony\Bridge\PsrHttpMessage\EventListener\PsrResponseListener: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters