File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 2323 "require" : {
2424 "php" : " ^7.3|^8.0" ,
2525 "illuminate/support" : " ^6.0|^7.0|^8.0|^9.0|^10.0|^11.0" ,
26- "joelbutcher/facebook-graph-sdk" : " ^6.0.0" ,
27- "symfony/http-client" : " ^5.3|^6.0|^7.0"
26+ "joelbutcher/facebook-graph-sdk" : " ^6.1.2"
2827 },
2928 "require-dev" : {
3029 "mockery/mockery" : " ^1.4.2" ,
Original file line number Diff line number Diff line change 55use Facebook \PersistentData \PersistentDataInterface ;
66use Facebook \Url \UrlDetectionHandler ;
77use Facebook \Url \UrlDetectionInterface ;
8- use Http \Client \ HttpClient ;
8+ use GuzzleHttp \Client ;
99use Illuminate \Contracts \Foundation \Application ;
1010use Illuminate \Support \ServiceProvider ;
11+ use Psr \Http \Client \ClientInterface ;
1112
1213class FacebookServiceProvider extends ServiceProvider
1314{
@@ -76,8 +77,8 @@ protected function getConfigPath(): string
7677 */
7778 protected function registerDefaultHttpClient (): void
7879 {
79- $ this ->app ->singleton (HttpClient ::class, function () {
80- return null ;
80+ $ this ->app ->singleton (ClientInterface ::class, function () {
81+ return new Client () ;
8182 });
8283 }
8384
@@ -125,7 +126,7 @@ protected function registerFacebook(): void
125126 'default_graph_version ' => $ app ['config ' ]->get ('facebook.graph_version ' ),
126127 'enable_beta_mode ' => $ app ['config ' ]->get ('facebook.beta_mode ' ),
127128 'persistent_data_handler ' => $ app [PersistentDataInterface::class],
128- 'http_client ' => $ app [HttpClient ::class],
129+ 'http_client ' => $ app [ClientInterface ::class],
129130 'url_detection_handler ' => $ app [UrlDetectionInterface::class],
130131 ]);
131132 });
Original file line number Diff line number Diff line change 44
55use JoelButcher \Facebook \Facebook ;
66use JoelButcher \Facebook \FacebookServiceProvider ;
7+ use Psr \Http \Client \ClientInterface ;
78
89abstract class TestCase extends \Orchestra \Testbench \TestCase
910{
@@ -23,6 +24,7 @@ protected function setUp(): void
2324 'app_secret ' => $ this ->app ['config ' ]->get ('facebook.app_secret ' ),
2425 'redirect_uri ' => $ this ->app ['config ' ]->get ('facebook.redirect_uri ' ),
2526 'default_graph_version ' => $ this ->app ['config ' ]->get ('facebook.graph_version ' ),
27+ 'http_client ' => $ this ->app [ClientInterface::class]
2628 ];
2729 }
2830
You can’t perform that action at this time.
0 commit comments