From 27ee2fd4fe7a2c627bc4474139e99feb0ff63632 Mon Sep 17 00:00:00 2001 From: Jeffrey Parker Date: Wed, 21 Jan 2026 16:09:36 -0500 Subject: [PATCH 1/3] Fix errors in example --- example/composer.json | 2 +- example/index.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/example/composer.json b/example/composer.json index 9c3ddb1..253ee76 100644 --- a/example/composer.json +++ b/example/composer.json @@ -1,7 +1,7 @@ { "require": { "slim/slim": "4.12.0", - "slim/psr7": "1.6.1", + "slim/psr7": "^1.7", "slim/php-view": "3.2.0", "bryanjhv/slim-session": "4.1.2", "duosecurity/duo_universal_php": "@dev" diff --git a/example/index.php b/example/index.php index fcd0e36..c8f8752 100644 --- a/example/index.php +++ b/example/index.php @@ -1,5 +1,7 @@ Date: Wed, 21 Jan 2026 16:26:59 -0500 Subject: [PATCH 2/3] When accessing the example app using 127.0.0.1 or 0.0.0.0, auto-redirect to localhost. The PHP development server prints a log message that the server is running on 0.0.0.0:8080. But the server must be accessed using localhost:8080 for proper session management. --- example/index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/example/index.php b/example/index.php index c8f8752..3bad4d5 100644 --- a/example/index.php +++ b/example/index.php @@ -36,6 +36,13 @@ $app->add(new Session()); $app->get('/', function (Request $request, Response $response, $args) { + # Helpfully redirect to `localhost` if accessed via 127.0.0.1 or 0.0.0.0 to ensure session cookie consistency and avoid state errors. + # (The url used in redirect_uri must match the url used to access the app) + if (in_array($request->getUri()->getHost(), ['127.0.0.1', '0.0.0.0'])) { + header('Location: http://localhost:' . $request->getUri()->getPort()); + exit(); + } + $renderer = new PhpRenderer('./templates'); $args["message"] = "This is a demo"; return $renderer->render($response, "login.php", $args); From 9b5f65879c445484324fef49427f380f236ac7a7 Mon Sep 17 00:00:00 2001 From: Jeffrey Parker Date: Wed, 21 Jan 2026 17:00:27 -0500 Subject: [PATCH 3/3] Remove EOL PHP versions from support/CI --- .github/workflows/php_ci.yml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php_ci.yml b/.github/workflows/php_ci.yml index cba50cb..43cf6c1 100644 --- a/.github/workflows/php_ci.yml +++ b/.github/workflows/php_ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - php: [7.4, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5] + php: [8.2, 8.3, 8.4, 8.5] steps: - name: Checkout diff --git a/README.md b/README.md index 6223505..40c7c0b 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ What's included: * `tests` - Test cases ## Getting started -This library requires PHP 7.4 or later +This library requires PHP 8.2 or later To use SDK in your existing developing environment, install it from Packagist ```