diff --git a/.github/workflows/setup-di-compile.yml b/.github/workflows/setup-di-compile.yml index d30c9d4..41e20f8 100644 --- a/.github/workflows/setup-di-compile.yml +++ b/.github/workflows/setup-di-compile.yml @@ -1,5 +1,5 @@ name: Run setup:upgrade and setup:di:compile -on: [ pull_request ] +on: [pull_request] jobs: build: @@ -7,8 +7,6 @@ jobs: fail-fast: false matrix: include: - - PHP_VERSION: php81-fpm - MAGENTO_VERSION: 2.4.5-p11 - PHP_VERSION: php82-fpm MAGENTO_VERSION: 2.4.6 runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bf3bd5..f6f6559 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [v2.4.3] - 2026-07-03 + +### Changed + +- Switch to json serialization for cache adapter + ## [v2.4.2] - 2025-03-20 ### Fixed diff --git a/Service/Cache/Psr16CacheAdapter.php b/Service/Cache/Psr16CacheAdapter.php index c46138e..584476a 100644 --- a/Service/Cache/Psr16CacheAdapter.php +++ b/Service/Cache/Psr16CacheAdapter.php @@ -26,7 +26,12 @@ public function get($key, $default = null): mixed return $default; } - return unserialize($item); + $decoded = json_decode($item, true); + if (json_last_error() === JSON_ERROR_NONE) { + return $decoded; + } + + return $default; } /** @@ -34,9 +39,8 @@ public function get($key, $default = null): mixed */ public function set($key, $value, $ttl = null): bool { - $value = serialize($value); return $this->cacheFrontend->save( - $value, + json_encode($value), $key, [CacheType::CACHE_TAG], $ttl diff --git a/etc/config.xml b/etc/config.xml index 9be13cb..648ece2 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -10,7 +10,7 @@ - 2.4.2 + 2.4.3 TrueLayerFacade TrueLayer Make a direct payment securely from your bank app - no card needed