Skip to content

Commit e617fb2

Browse files
authored
Laravel 9 Support (#4)
1 parent 8eb5c67 commit e617fb2

File tree

5 files changed

+24
-9
lines changed

5 files changed

+24
-9
lines changed

.github/workflows/tests.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ jobs:
1313
strategy:
1414
fail-fast: true
1515
matrix:
16-
php: [7.4, 8.0]
17-
laravel: [6.0, 7.0, 8.0]
16+
php: [7.4, 8.0, 8.1]
17+
laravel: [6.0, 7.0, 8.0, 9.0]
18+
exclude:
19+
- php: 7.4
20+
laravel: 9
1821

1922
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }}
2023

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
],
1616
"require": {
1717
"php": "^7.4|^8.0",
18-
"illuminate/support": "^6.0|^7.0|^8.0",
18+
"illuminate/support": "^6.0|^7.0|^8.0|^9.0",
1919
"joelbutcher/facebook-graph-sdk": "^6.0.0",
2020
"symfony/http-client": "^5.3"
2121
},
2222
"require-dev": {
2323
"mockery/mockery": "^1.4.2",
24-
"orchestra/testbench": "^6.0",
24+
"orchestra/testbench": "^6.0|^7.0",
2525
"phpunit/phpunit": "^9.4"
2626
},
2727
"autoload": {

src/Facebook.php

+7-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class Facebook
4747
/**
4848
* Create a new Facebook wrapper.
4949
*
50-
* @param array $config
50+
* @param array $config
5151
*/
5252
public function __construct(array $config = [])
5353
{
@@ -58,6 +58,8 @@ public function __construct(array $config = [])
5858
* Get the base Facebook instance.
5959
*
6060
* @return \Facebook\Facebook
61+
*
62+
* @throws \Facebook\Exception\SDKException
6163
*/
6264
public function getFacebook(): Base
6365
{
@@ -72,9 +74,9 @@ public function getFacebook(): Base
7274
* Get a graph user instance after an authenticated request.
7375
*
7476
* @param array $params
75-
* @param string|null $eTag
76-
* @param string|null $graphVersion
7777
* @return \Facebook\GraphNode\GraphUser|null
78+
*
79+
* @throws \Facebook\Exception\SDKException
7880
*/
7981
public function getUser(array $params = []): ?GraphUser
8082
{
@@ -87,6 +89,8 @@ public function getUser(array $params = []): ?GraphUser
8789
* @param string $method
8890
* @param array $parameters
8991
* @return mixed
92+
*
93+
* @throws \Facebook\Exception\SDKException
9094
*/
9195
public function __call($method, $parameters)
9296
{

src/Traits/HandlesAuthentication.php

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
/**
88
* @property array $config
9+
*
910
* @method \Facebook\Facebook getFacebook()
1011
*
1112
* @see \JoelButcher\Facebook\Facebook
@@ -23,6 +24,8 @@ trait HandlesAuthentication
2324
* Get the redirect login helper instance.
2425
*
2526
* @return \Facebook\Helper\RedirectLoginHelper
27+
*
28+
* @throws \Facebook\Exception\SDKException
2629
*/
2730
public function getLoginHelper(): ?RedirectLoginHelper
2831
{
@@ -39,6 +42,8 @@ public function getLoginHelper(): ?RedirectLoginHelper
3942
* @param string|null $redirectUrl
4043
* @param array $scopes
4144
* @return string
45+
*
46+
* @throws \Facebook\Exception\SDKException
4247
*/
4348
public function getRedirect(?string $redirectUrl = null, array $scopes = []): string
4449
{
@@ -61,6 +66,7 @@ public function getRedirect(?string $redirectUrl = null, array $scopes = []): st
6166
* @return mixed
6267
*
6368
* @throws \BadMethodCallException
69+
* @throws \Facebook\Exception\SDKException
6470
*/
6571
public function __call($method, $parameters)
6672
{

src/Traits/MakesFacebookRequests.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ public function post(string $endpoint, array $params = []): Response
9494
/**
9595
* Sends a DELETE request to Graph and returns the result.
9696
*
97-
* @param string $endpoint
98-
* @param array $params
97+
* @param string $endpoint
98+
* @param array $params
9999
* @return \Facebook\Response
100100
*
101101
* @throws \Facebook\Exceptions\FacebookSDKException
@@ -143,6 +143,8 @@ public function getResponse(): ?Response
143143
* Get the token to use in authenticated user requests.
144144
*
145145
* @return string|null
146+
*
147+
* @throws \Facebook\Exception\SDKException
146148
*/
147149
public function getToken(): ?string
148150
{

0 commit comments

Comments
 (0)