From bf5316cfb141517ff9f10f8455bf0fd504d1cf2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20F=C3=B6rster?= Date: Fri, 22 Nov 2024 17:12:41 +0100 Subject: [PATCH 1/2] rePosition `include` @ examples --- examples/public/auth_code.php | 4 ++-- examples/public/implicit.php | 4 ++-- examples/public/password.php | 4 ++-- examples/public/refresh_token.php | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/examples/public/auth_code.php b/examples/public/auth_code.php index 815d86dee..7fc528cc7 100644 --- a/examples/public/auth_code.php +++ b/examples/public/auth_code.php @@ -10,6 +10,8 @@ declare(strict_types=1); +include __DIR__ . '/../vendor/autoload.php'; + use Laminas\Diactoros\Stream; use League\OAuth2\Server\AuthorizationServer; use League\OAuth2\Server\Exception\OAuthServerException; @@ -24,8 +26,6 @@ use Psr\Http\Message\ServerRequestInterface; use Slim\App; -include __DIR__ . '/../vendor/autoload.php'; - $app = new App([ 'settings' => [ 'displayErrorDetails' => true, diff --git a/examples/public/implicit.php b/examples/public/implicit.php index 6c54b8f2c..9a968d4be 100644 --- a/examples/public/implicit.php +++ b/examples/public/implicit.php @@ -10,6 +10,8 @@ declare(strict_types=1); +include __DIR__ . '/../vendor/autoload.php'; + use Laminas\Diactoros\Stream; use League\OAuth2\Server\AuthorizationServer; use League\OAuth2\Server\Exception\OAuthServerException; @@ -22,8 +24,6 @@ use Psr\Http\Message\ServerRequestInterface; use Slim\App; -include __DIR__ . '/../vendor/autoload.php'; - $app = new App([ 'settings' => [ 'displayErrorDetails' => true, diff --git a/examples/public/password.php b/examples/public/password.php index 61096226e..539de0f2d 100644 --- a/examples/public/password.php +++ b/examples/public/password.php @@ -2,6 +2,8 @@ declare(strict_types=1); +include __DIR__ . '/../vendor/autoload.php'; + use League\OAuth2\Server\AuthorizationServer; use League\OAuth2\Server\Exception\OAuthServerException; use League\OAuth2\Server\Grant\PasswordGrant; @@ -14,8 +16,6 @@ use Psr\Http\Message\ServerRequestInterface; use Slim\App; -include __DIR__ . '/../vendor/autoload.php'; - $app = new App([ // Add the authorization server to the DI container AuthorizationServer::class => function () { diff --git a/examples/public/refresh_token.php b/examples/public/refresh_token.php index f534d7483..f287ae54f 100644 --- a/examples/public/refresh_token.php +++ b/examples/public/refresh_token.php @@ -10,6 +10,8 @@ declare(strict_types=1); +include __DIR__ . '/../vendor/autoload.php'; + use League\OAuth2\Server\AuthorizationServer; use League\OAuth2\Server\Exception\OAuthServerException; use League\OAuth2\Server\Grant\RefreshTokenGrant; @@ -21,8 +23,6 @@ use Psr\Http\Message\ServerRequestInterface; use Slim\App; -include __DIR__ . '/../vendor/autoload.php'; - $app = new App([ 'settings' => [ 'displayErrorDetails' => true, From 6c8fcb0f83ea6dd30e0140bf7d0d7cdf2d697691 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20F=C3=B6rster?= Date: Fri, 22 Nov 2024 17:16:48 +0100 Subject: [PATCH 2/2] use Laminas\Diactoros\Stream --- examples/public/device_code.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/public/device_code.php b/examples/public/device_code.php index e63349e76..050bab764 100644 --- a/examples/public/device_code.php +++ b/examples/public/device_code.php @@ -12,6 +12,7 @@ include __DIR__ . '/../vendor/autoload.php'; +use Laminas\Diactoros\Stream; use League\OAuth2\Server\AuthorizationServer; use League\OAuth2\Server\Exception\OAuthServerException; use League\OAuth2\Server\Grant\DeviceCodeGrant; @@ -23,7 +24,6 @@ use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Slim\App; -use Zend\Diactoros\Stream; $app = new App([ 'settings' => [