Skip to content

Commit

Permalink
Laravel 9 Support (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
joelbutcher authored Feb 9, 2022
1 parent 8eb5c67 commit e617fb2
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
10 changes: 7 additions & 3 deletions src/Facebook.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class Facebook
/**
* Create a new Facebook wrapper.
*
* @param array $config
* @param array $config
*/
public function __construct(array $config = [])
{
Expand All @@ -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
{
Expand All @@ -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
{
Expand All @@ -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)
{
Expand Down
6 changes: 6 additions & 0 deletions src/Traits/HandlesAuthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/**
* @property array $config
*
* @method \Facebook\Facebook getFacebook()
*
* @see \JoelButcher\Facebook\Facebook
Expand All @@ -23,6 +24,8 @@ trait HandlesAuthentication
* Get the redirect login helper instance.
*
* @return \Facebook\Helper\RedirectLoginHelper
*
* @throws \Facebook\Exception\SDKException
*/
public function getLoginHelper(): ?RedirectLoginHelper
{
Expand All @@ -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
{
Expand All @@ -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)
{
Expand Down
6 changes: 4 additions & 2 deletions src/Traits/MakesFacebookRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
{
Expand Down

0 comments on commit e617fb2

Please sign in to comment.