diff --git a/CHANGELOG.md b/CHANGELOG.md index c28aa0af..123d0ff4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,29 @@ 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). +## 1.20.3 - 2019-12-23 + +#### Added + +* *Nothing* + +#### Changed + +* *Nothing* + +#### Deprecated + +* *Nothing* + +#### Removed + +* *Nothing* + +#### Fixed + +* [#585](https://github.com/shlinkio/shlink/issues/585) Fixed `PHP Fatal error: Uncaught Error: Class 'Shlinkio\Shlink\LocalLockFactory' not found` happening when running some CLI commands. + + ## 1.20.2 - 2019-12-06 #### Added diff --git a/config/autoload/locks.global.php b/config/autoload/locks.global.php index db64e187..8462e15b 100644 --- a/config/autoload/locks.global.php +++ b/config/autoload/locks.global.php @@ -8,9 +8,7 @@ use Shlinkio\Shlink\Common\Logger\LoggerAwareDelegatorFactory; use Symfony\Component\Lock; use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory; -// This class alias tricks the ConfigAbstractFactory to return Lock\Factory instances even with a different service name $localLockFactory = 'Shlinkio\Shlink\LocalLockFactory'; -class_alias(Lock\Factory::class, $localLockFactory); return [ diff --git a/config/container.php b/config/container.php index 37be5669..d33149a3 100644 --- a/config/container.php +++ b/config/container.php @@ -3,6 +3,7 @@ declare(strict_types=1); use Symfony\Component\Dotenv\Dotenv; +use Symfony\Component\Lock; use Zend\ServiceManager\ServiceManager; chdir(dirname(__DIR__)); @@ -17,6 +18,9 @@ if (class_exists(Dotenv::class)) { $dotenv->load(__DIR__ . '/../.env'); } +// This class alias tricks the ConfigAbstractFactory to return Lock\Factory instances even with a different service name +class_alias(Lock\Factory::class, 'Shlinkio\Shlink\LocalLockFactory'); + // Build container $config = require __DIR__ . '/config.php'; $container = new ServiceManager($config['dependencies']);