From b8f0551f1307378b9ae9260f52092a8407f9a3e8 Mon Sep 17 00:00:00 2001
From: Paul Water
Date: Mon, 30 Sep 2024 07:14:05 +0200
Subject: [PATCH] Align with changes in dependencies.
---
composer.json | 5 +++--
src/CoreLoginHandler.php | 2 +-
test/TestKernel.php | 7 +++++--
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/composer.json b/composer.json
index 8002fc9..3e85e4a 100644
--- a/composer.json
+++ b/composer.json
@@ -13,14 +13,15 @@
"plaisio/kernel": "^3.2.1",
"plaisio/login-handler": "^1.3.0",
"plaisio/login-requirement": "^1.2.0",
+ "plaisio/request": "^1.0.0",
"plaisio/session": "^5.0.0",
- "setbased/php-stratum-mysql": "^7.0.0"
+ "setbased/php-stratum-mysql": "^7.0.1"
},
"require-dev": {
"phing/phing": "^3.0.0",
"phpunit/phpunit": "^10.5.35",
"plaisio/console-kernel": "^1.0.1",
- "plaisio/request-core": "^0.13.0",
+ "plaisio/request-core": "^1.0.0",
"setbased/php-stratum": "^6.3.1"
},
"autoload": {
diff --git a/src/CoreLoginHandler.php b/src/CoreLoginHandler.php
index e3fc95a..da44292 100644
--- a/src/CoreLoginHandler.php
+++ b/src/CoreLoginHandler.php
@@ -121,7 +121,7 @@ protected function preValidation(): bool
*/
private function logLoginAttempt(): void
{
- $ip = $this->nub->request->getRemoteIp();
+ $ip = $this->nub->request->remoteIp;
if ($ip!==null)
{
if (!str_contains($ip, ':'))
diff --git a/test/TestKernel.php b/test/TestKernel.php
index c6eb79b..124081b 100644
--- a/test/TestKernel.php
+++ b/test/TestKernel.php
@@ -32,7 +32,7 @@ protected function getCompany(): CompanyResolver
*
* @return Object
*/
- protected function getDL(): Object
+ protected function getDL(): object
{
$connector = new MySqlDefaultConnector('127.0.0.1', 'test', 'test', 'test');
$dl = new TestDataLayer($connector);
@@ -50,7 +50,10 @@ protected function getDL(): Object
*/
protected function getRequest(): Request
{
- return new CoreRequest();
+ $request = new CoreRequest();
+ $request->validate();
+
+ return $request;
}
//--------------------------------------------------------------------------------------------------------------------