Updated to shlink-common 4.4, which no longer uses doctrine/cache

This commit is contained in:
Alejandro Celaya 2022-01-23 17:54:49 +01:00
parent 470c62d993
commit 77088d55f9
4 changed files with 21 additions and 2 deletions

View File

@ -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*

View File

@ -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",

View File

@ -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'),

View File

@ -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');