Skip to content

Commit

Permalink
Fix deprecation messages Implicitly marking parameter as nullable is …
Browse files Browse the repository at this point in the history
…deprecated, the explicit nullable type must be used instead
  • Loading branch information
klapaudius committed Dec 20, 2024
1 parent 3a1137e commit e4fcade
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
],

"require": {
"php": "^5.5.9 || ^7.0.8 || ^7.1.3 || ^7.2.5 || ^8.0.0 || ^8.2.0",
"symfony/http-foundation": "~3.0|~4.0|~5.0|~6.0|~7.0"
"php": "^7.1.3 || ^7.2.5 || ^8.0.0 || ^8.2.0",
"symfony/http-foundation": "~5.0|~6.0|~7.0"
},
"require-dev": {
"phpunit/phpunit": "^5.0 || ^6.0 || ^8.0 || ^9.0.0 || ^10.0.0"
Expand Down
4 changes: 2 additions & 2 deletions lib/IOAuth2.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function verifyAccessToken($tokenParam, $scope = null);
* @see http://tools.ietf.org/html/draft-ietf-oauth-v2-bearer-08#section-2.3
*
*/
public function getBearerToken(Request $request = null, $removeFromRequest = false);
public function getBearerToken(?Request $request = null, $removeFromRequest = false);

/**
* Grant or deny a requested access token.
Expand All @@ -105,7 +105,7 @@ public function getBearerToken(Request $request = null, $removeFromRequest = fal
*
* @ingroup oauth2_section_4
*/
public function grantAccessToken(Request $request = null);
public function grantAccessToken(?Request $request = null);

/**
* Redirect the user appropriately after approval.
Expand Down
6 changes: 3 additions & 3 deletions lib/OAuth2.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ public function verifyAccessToken($tokenParam, $scope = null)
/**
* {@inheritdoc}
*/
public function getBearerToken(Request $request = null, $removeFromRequest = false)
public function getBearerToken(?Request $request = null, $removeFromRequest = false)
{
if ($request === null) {
$request = Request::createFromGlobals();
Expand Down Expand Up @@ -681,7 +681,7 @@ protected function checkScope($requiredScope, $availableScope)
/**
* {@inheritdoc}
*/
public function grantAccessToken(Request $request = null)
public function grantAccessToken(?Request $request = null)
{
$filters = array(
"grant_type" => array(
Expand Down Expand Up @@ -1014,7 +1014,7 @@ protected function getClientCredentials(array $inputData, array $authHeaders)
*
* @ingroup oauth2_section_3
*/
protected function getAuthorizeParams(Request $request = null)
protected function getAuthorizeParams(?Request $request = null)
{
$filters = array(
"client_id" => array(
Expand Down

0 comments on commit e4fcade

Please sign in to comment.