Skip to content

Commit

Permalink
Prefer php-http/discovery over nyholm/psr7 when installed (#1198)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas authored May 6, 2023
1 parent bdf9c6c commit eb27ff3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nyholm/psr7/1.0/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
},
"conflict": {
"php-http/discovery": ">=1.18"
}
}
10 changes: 10 additions & 0 deletions php-http/discovery/1.18/config/packages/http_discovery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
Psr\Http\Message\RequestFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\ResponseFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\ServerRequestFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\StreamFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\UploadedFileFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\UriFactoryInterface: '@http_discovery.psr17_factory'

http_discovery.psr17_factory:
class: Http\Discovery\Psr17Factory
5 changes: 5 additions & 0 deletions php-http/discovery/1.18/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"copy-from-recipe": {
"config/": "%CONFIG_DIR%/"
}
}

0 comments on commit eb27ff3

Please sign in to comment.