From 77088d55f976a002987efd0ed27c9861f6ebd403 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 23 Jan 2022 17:54:49 +0100 Subject: [PATCH] Updated to shlink-common 4.4, which no longer uses doctrine/cache --- CHANGELOG.md | 17 +++++++++++++++++ composer.json | 2 +- config/autoload/redis.global.php | 1 - .../Core/src/Repository/ShortUrlRepository.php | 3 +++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ebce54f3..5c3b6298 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org). +## [2.10.3] - 2022-01-23 +### Added +* *Nothing* + +### Changed +* *Nothing* + +### Deprecated +* *Nothing* + +### Removed +* *Nothing* + +### Fixed +* [#1349](https://github.com/shlinkio/shlink/issues/1349) Fixed memory leak in cache implementation. + + ## [2.10.2] - 2022-01-07 ### Added * *Nothing* diff --git a/composer.json b/composer.json index 4dfa5796..0342c707 100644 --- a/composer.json +++ b/composer.json @@ -48,7 +48,7 @@ "predis/predis": "^1.1", "pugx/shortid-php": "^1.0", "ramsey/uuid": "^4.2", - "shlinkio/shlink-common": "^4.3", + "shlinkio/shlink-common": "^4.4", "shlinkio/shlink-config": "^1.4", "shlinkio/shlink-event-dispatcher": "^2.3", "shlinkio/shlink-importer": "^2.5", diff --git a/config/autoload/redis.global.php b/config/autoload/redis.global.php index 866f7068..22101b65 100644 --- a/config/autoload/redis.global.php +++ b/config/autoload/redis.global.php @@ -11,7 +11,6 @@ return (static function (): array { $redisServers === null => [], default => [ 'cache' => [ - 'default_lifetime' => 86400, // 24h 'redis' => [ 'servers' => $redisServers, 'sentinel_service' => env('REDIS_SENTINEL_SERVICE'), diff --git a/module/Core/src/Repository/ShortUrlRepository.php b/module/Core/src/Repository/ShortUrlRepository.php index fb853b96..6e4877f6 100644 --- a/module/Core/src/Repository/ShortUrlRepository.php +++ b/module/Core/src/Repository/ShortUrlRepository.php @@ -194,6 +194,9 @@ class ShortUrlRepository extends EntitySpecificationRepository implements ShortU return $this->doShortCodeIsInUse($identifier, $spec, LockMode::PESSIMISTIC_WRITE); } + /** + * @param LockMode::PESSIMISTIC_WRITE|null $lockMode + */ private function doShortCodeIsInUse(ShortUrlIdentifier $identifier, ?Specification $spec, ?int $lockMode): bool { $qb = $this->createFindOneQueryBuilder($identifier, $spec)->select('s.id');