Skip to content

Commit

Permalink
Use Guzzle PSR-18 wrapper for TMDB API client
Browse files Browse the repository at this point in the history
This is because Symfony's client is incompatible with PHP-VCR.
php-vcr/php-vcr#329
  • Loading branch information
Ruin0x11 committed Jun 18, 2021
1 parent 2d94a5c commit 351dfde
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 4 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"ext-iconv": "*",
"ext-json": "*",
"alanly/traktor": "dev-master",
"alextartan/guzzle-psr18-adapter": "^4.0",
"enqueue/dbal": "^0.10",
"enqueue/enqueue-bundle": "^0.10",
"friendsofsymfony/elastica-bundle": "^5.2",
Expand Down
62 changes: 61 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions config/packages/tmdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tmdb_symfony:
adapter: Symfony\Component\EventDispatcher\EventDispatcher
secure: false
http:
client: Symfony\Component\HttpClient\Psr18Client
client: AlexTartan\GuzzlePsr18Adapter\Client
request_factory: Nyholm\Psr7\Factory\Psr17Factory
response_factory: Nyholm\Psr7\Factory\Psr17Factory
stream_factory: Nyholm\Psr7\Factory\Psr17Factory
Expand All @@ -17,8 +17,8 @@ tmdb_symfony:
enabled: false

services:
Symfony\Component\HttpClient\Psr18Client:
class: Symfony\Component\HttpClient\Psr18Client
AlexTartan\GuzzlePsr18Adapter\Client:
class: AlexTartan\GuzzlePsr18Adapter\Client

Nyholm\Psr7\Factory\Psr17Factory:
class: Nyholm\Psr7\Factory\Psr17Factory
Expand Down
3 changes: 3 additions & 0 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"alanly/traktor": {
"version": "dev-master"
},
"alextartan/guzzle-psr18-adapter": {
"version": "4.0.4"
},
"amphp/amp": {
"version": "v2.5.2"
},
Expand Down

0 comments on commit 351dfde

Please sign in to comment.