diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b646f50..f88f35b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,8 +13,11 @@ jobs: strategy: fail-fast: true matrix: - php: [7.4, 8.0] - laravel: [6.0, 7.0, 8.0] + php: [7.4, 8.0, 8.1] + laravel: [6.0, 7.0, 8.0, 9.0] + exclude: + - php: 7.4 + laravel: 9 name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} diff --git a/composer.json b/composer.json index 9bc90f2..6909f13 100644 --- a/composer.json +++ b/composer.json @@ -15,13 +15,13 @@ ], "require": { "php": "^7.4|^8.0", - "illuminate/support": "^6.0|^7.0|^8.0", + "illuminate/support": "^6.0|^7.0|^8.0|^9.0", "joelbutcher/facebook-graph-sdk": "^6.0.0", "symfony/http-client": "^5.3" }, "require-dev": { "mockery/mockery": "^1.4.2", - "orchestra/testbench": "^6.0", + "orchestra/testbench": "^6.0|^7.0", "phpunit/phpunit": "^9.4" }, "autoload": { diff --git a/src/Facebook.php b/src/Facebook.php index b9879e7..27ceec0 100644 --- a/src/Facebook.php +++ b/src/Facebook.php @@ -47,7 +47,7 @@ class Facebook /** * Create a new Facebook wrapper. * - * @param array $config + * @param array $config */ public function __construct(array $config = []) { @@ -58,6 +58,8 @@ public function __construct(array $config = []) * Get the base Facebook instance. * * @return \Facebook\Facebook + * + * @throws \Facebook\Exception\SDKException */ public function getFacebook(): Base { @@ -72,9 +74,9 @@ public function getFacebook(): Base * Get a graph user instance after an authenticated request. * * @param array $params - * @param string|null $eTag - * @param string|null $graphVersion * @return \Facebook\GraphNode\GraphUser|null + * + * @throws \Facebook\Exception\SDKException */ public function getUser(array $params = []): ?GraphUser { @@ -87,6 +89,8 @@ public function getUser(array $params = []): ?GraphUser * @param string $method * @param array $parameters * @return mixed + * + * @throws \Facebook\Exception\SDKException */ public function __call($method, $parameters) { diff --git a/src/Traits/HandlesAuthentication.php b/src/Traits/HandlesAuthentication.php index b81040e..da1754d 100644 --- a/src/Traits/HandlesAuthentication.php +++ b/src/Traits/HandlesAuthentication.php @@ -6,6 +6,7 @@ /** * @property array $config + * * @method \Facebook\Facebook getFacebook() * * @see \JoelButcher\Facebook\Facebook @@ -23,6 +24,8 @@ trait HandlesAuthentication * Get the redirect login helper instance. * * @return \Facebook\Helper\RedirectLoginHelper + * + * @throws \Facebook\Exception\SDKException */ public function getLoginHelper(): ?RedirectLoginHelper { @@ -39,6 +42,8 @@ public function getLoginHelper(): ?RedirectLoginHelper * @param string|null $redirectUrl * @param array $scopes * @return string + * + * @throws \Facebook\Exception\SDKException */ public function getRedirect(?string $redirectUrl = null, array $scopes = []): string { @@ -61,6 +66,7 @@ public function getRedirect(?string $redirectUrl = null, array $scopes = []): st * @return mixed * * @throws \BadMethodCallException + * @throws \Facebook\Exception\SDKException */ public function __call($method, $parameters) { diff --git a/src/Traits/MakesFacebookRequests.php b/src/Traits/MakesFacebookRequests.php index e68499f..464bf0e 100644 --- a/src/Traits/MakesFacebookRequests.php +++ b/src/Traits/MakesFacebookRequests.php @@ -94,8 +94,8 @@ public function post(string $endpoint, array $params = []): Response /** * Sends a DELETE request to Graph and returns the result. * - * @param string $endpoint - * @param array $params + * @param string $endpoint + * @param array $params * @return \Facebook\Response * * @throws \Facebook\Exceptions\FacebookSDKException @@ -143,6 +143,8 @@ public function getResponse(): ?Response * Get the token to use in authenticated user requests. * * @return string|null + * + * @throws \Facebook\Exception\SDKException */ public function getToken(): ?string {