From 415d94009af2aadf98a41c4db337bb791263ee53 Mon Sep 17 00:00:00 2001 From: Steve Boyd Date: Wed, 11 May 2022 15:30:21 +1200 Subject: [PATCH] ENH Use guzzle for oembed --- _config/oembed.yml | 7 +++++++ composer.json | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/_config/oembed.yml b/_config/oembed.yml index 31a1b742b16..343d5364288 100644 --- a/_config/oembed.yml +++ b/_config/oembed.yml @@ -4,6 +4,13 @@ Name: coreoembed SilverStripe\Core\Injector\Injector: SilverStripe\View\Embed\Embeddable: class: SilverStripe\View\Embed\EmbedContainer + # Use guzzle instead of the default Embed\Embed curl implementation so that + # a proxy url can be set via yml if required + Psr\Http\Client\ClientInterface.oembed: + class: GuzzleHttp\Client + Embed\Http\Crawler: + constructor: + - '%$Psr\Http\Client\ClientInterface.oembed' Embed\Embed: constructor: - '%$Embed\Http\Crawler' diff --git a/composer.json b/composer.json index 08806cc7ab6..0bb28858c13 100644 --- a/composer.json +++ b/composer.json @@ -60,7 +60,8 @@ }, "conflict": { "egulias/email-validator": "^2", - "phpunit/phpunit": "^6 || ^7 || ^8" + "phpunit/phpunit": "^6 || ^7 || ^8", + "cwp/cwp-core": "<2.11.0" }, "provide": { "psr/container-implementation": "1.0.0"