From f4e4ecad2782da1b8030610ce1a5cfcafa1ca49d Mon Sep 17 00:00:00 2001 From: mscherer Date: Sun, 20 Apr 2025 13:54:38 +0200 Subject: [PATCH 1/2] Add PHP min version for user and IDE. --- composer.json | 1 + src/Identifier/Ldap/AdapterInterface.php | 2 +- src/Identifier/Ldap/ExtensionAdapter.php | 2 +- src/UrlChecker/DefaultUrlChecker.php | 4 ++-- src/UrlChecker/UrlCheckerInterface.php | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 40c78297..200f27be 100644 --- a/composer.json +++ b/composer.json @@ -23,6 +23,7 @@ "docs": "https://book.cakephp.org/authentication/3/en/" }, "require": { + "php": ">=8.1", "cakephp/http": "^5.0", "laminas/laminas-diactoros": "^3.0", "psr/http-client": "^1.0", diff --git a/src/Identifier/Ldap/AdapterInterface.php b/src/Identifier/Ldap/AdapterInterface.php index 2ad03810..5b7e1f6d 100644 --- a/src/Identifier/Ldap/AdapterInterface.php +++ b/src/Identifier/Ldap/AdapterInterface.php @@ -32,7 +32,7 @@ public function bind(string $bind, string $password): bool; * * @param string $host Hostname * @param int $port Port - * @param array $options Additional options + * @param array $options Additional options * @return void */ public function connect(string $host, int $port, array $options): void; diff --git a/src/Identifier/Ldap/ExtensionAdapter.php b/src/Identifier/Ldap/ExtensionAdapter.php index d9d2893f..3adf9eaf 100644 --- a/src/Identifier/Ldap/ExtensionAdapter.php +++ b/src/Identifier/Ldap/ExtensionAdapter.php @@ -89,7 +89,7 @@ public function getConnection(): Connection * * @param string $host Hostname * @param int $port Port - * @param array $options Additonal LDAP options + * @param array $options Additional LDAP options * @return void */ public function connect(string $host, int $port, array $options): void diff --git a/src/UrlChecker/DefaultUrlChecker.php b/src/UrlChecker/DefaultUrlChecker.php index bd156c36..f2cb5a86 100644 --- a/src/UrlChecker/DefaultUrlChecker.php +++ b/src/UrlChecker/DefaultUrlChecker.php @@ -69,7 +69,7 @@ public function check(ServerRequestInterface $request, $loginUrls, array $option * method and inject additional options without the need to use the * MergeVarsTrait. * - * @param array $options Options to merge in + * @param array $options Options to merge in * @return array */ protected function _mergeDefaultOptions(array $options): array @@ -80,7 +80,7 @@ protected function _mergeDefaultOptions(array $options): array /** * Gets the checker function name or a callback * - * @param array $options Array of options + * @param array $options Array of options * @return callable */ protected function _getChecker(array $options): callable diff --git a/src/UrlChecker/UrlCheckerInterface.php b/src/UrlChecker/UrlCheckerInterface.php index fbf74043..797d0609 100644 --- a/src/UrlChecker/UrlCheckerInterface.php +++ b/src/UrlChecker/UrlCheckerInterface.php @@ -28,7 +28,7 @@ interface UrlCheckerInterface * * @param \Psr\Http\Message\ServerRequestInterface $request Server Request * @param array|string $loginUrls Login URL string or array of URLs - * @param array $options Array of options + * @param array $options Array of options * @return bool */ public function check(ServerRequestInterface $request, array|string $loginUrls, array $options = []): bool; From 3c63e07899f3a5eda2882a283708f745a5d7b6e8 Mon Sep 17 00:00:00 2001 From: mscherer Date: Sun, 20 Apr 2025 13:59:10 +0200 Subject: [PATCH 2/2] Fix up docblocks. --- src/Identifier/Ldap/AdapterInterface.php | 2 +- src/Identifier/Ldap/ExtensionAdapter.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Identifier/Ldap/AdapterInterface.php b/src/Identifier/Ldap/AdapterInterface.php index 5b7e1f6d..2ad03810 100644 --- a/src/Identifier/Ldap/AdapterInterface.php +++ b/src/Identifier/Ldap/AdapterInterface.php @@ -32,7 +32,7 @@ public function bind(string $bind, string $password): bool; * * @param string $host Hostname * @param int $port Port - * @param array $options Additional options + * @param array $options Additional options * @return void */ public function connect(string $host, int $port, array $options): void; diff --git a/src/Identifier/Ldap/ExtensionAdapter.php b/src/Identifier/Ldap/ExtensionAdapter.php index 3adf9eaf..fae1da54 100644 --- a/src/Identifier/Ldap/ExtensionAdapter.php +++ b/src/Identifier/Ldap/ExtensionAdapter.php @@ -89,7 +89,7 @@ public function getConnection(): Connection * * @param string $host Hostname * @param int $port Port - * @param array $options Additional LDAP options + * @param array $options Additional LDAP options * @return void */ public function connect(string $host, int $port, array $options): void @@ -110,7 +110,7 @@ public function connect(string $host, int $port, array $options): void $this->_unsetErrorHandler(); foreach ($options as $option => $value) { - $this->setOption($option, $value); + $this->setOption((int)$option, $value); } }