Merge pull request #586 from acelaya-forks/hotfix/1.20.3

Hotfix/1.20.3
This commit is contained in:
Alejandro Celaya 2019-12-23 11:06:29 +01:00 committed by GitHub
commit c560e1fda2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 2 deletions

View File

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

View File

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

View File

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