From 495ebfb45cf71b14307987f8164534b5fa29b80f Mon Sep 17 00:00:00 2001 From: Sabina Talipova Date: Mon, 12 Dec 2022 15:47:46 +1300 Subject: [PATCH] DEP PHP Support in CMS5 --- composer.json | 8 ++++---- src/Store/DatabaseStore.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 7872f72..6cff2b1 100644 --- a/composer.json +++ b/composer.json @@ -15,13 +15,13 @@ } ], "require": { - "php": "^7.4 || ^8.0", - "silverstripe/framework": "^4.10" + "php": "^8.1", + "silverstripe/framework": "^5" }, "require-dev": { "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "^3.0", - "silverstripe/versioned": "^1" + "squizlabs/php_codesniffer": "^3", + "silverstripe/versioned": "^2" }, "extra": [], "autoload": { diff --git a/src/Store/DatabaseStore.php b/src/Store/DatabaseStore.php index 7b2bcdd..9b084ad 100644 --- a/src/Store/DatabaseStore.php +++ b/src/Store/DatabaseStore.php @@ -74,7 +74,7 @@ public function read($session_id) $result = DB::query($query); if ($result && $result->numRecords()) { - $data = $result->first(); + $data = $result->record(); $decoded = static::binaryDataJsonDecode($data['Data']); return is_null($decoded) ? $data['Data'] : $decoded; }