mirror of
https://github.com/shlinkio/shlink.git
synced 2025-03-28 04:22:04 +03:00
Merge pull request #1872 from acelaya-forks/bugfix/db-commands-timeout
Fix incorrect timeout in init commands
This commit is contained in:
commit
ef073d59ca
6 changed files with 26 additions and 10 deletions
17
CHANGELOG.md
17
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).
|
The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
### Added
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
### Deprecated
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
* *Nothing*
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* [#1819](https://github.com/shlinkio/shlink/issues/1819) Fix incorrect timeout when running DB commands during Shlink start-up.
|
||||||
|
|
||||||
|
|
||||||
## [3.6.3] - 2023-06-14
|
## [3.6.3] - 2023-06-14
|
||||||
### Added
|
### Added
|
||||||
* *Nothing*
|
* *Nothing*
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
"ext-json": "*",
|
"ext-json": "*",
|
||||||
"ext-pdo": "*",
|
"ext-pdo": "*",
|
||||||
"akrabat/ip-address-middleware": "^2.1",
|
"akrabat/ip-address-middleware": "^2.1",
|
||||||
"cakephp/chronos": "^2.3",
|
"cakephp/chronos": "~2.3.3",
|
||||||
"doctrine/migrations": "^3.5",
|
"doctrine/migrations": "^3.5",
|
||||||
"doctrine/orm": "^2.14",
|
"doctrine/orm": "^2.14",
|
||||||
"endroid/qr-code": "^4.7",
|
"endroid/qr-code": "^4.7",
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
"shlinkio/shlink-config": "^2.4",
|
"shlinkio/shlink-config": "^2.4",
|
||||||
"shlinkio/shlink-event-dispatcher": "^3.0",
|
"shlinkio/shlink-event-dispatcher": "^3.0",
|
||||||
"shlinkio/shlink-importer": "^5.1",
|
"shlinkio/shlink-importer": "^5.1",
|
||||||
"shlinkio/shlink-installer": "^8.4.1",
|
"shlinkio/shlink-installer": "^8.4.2",
|
||||||
"shlinkio/shlink-ip-geolocation": "^3.2",
|
"shlinkio/shlink-ip-geolocation": "^3.2",
|
||||||
"shlinkio/shlink-json": "^1.0",
|
"shlinkio/shlink-json": "^1.0",
|
||||||
"spiral/roadrunner": "^2023.1",
|
"spiral/roadrunner": "^2023.1",
|
||||||
|
|
|
@ -42,10 +42,9 @@ return (new ConfigAggregator\ConfigAggregator([
|
||||||
Core\ConfigProvider::class,
|
Core\ConfigProvider::class,
|
||||||
CLI\ConfigProvider::class,
|
CLI\ConfigProvider::class,
|
||||||
Rest\ConfigProvider::class,
|
Rest\ConfigProvider::class,
|
||||||
new ConfigAggregator\PhpFileProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
|
new ConfigAggregator\PhpFileProvider('config/autoload/{,*.}global.php'),
|
||||||
$isTestEnv
|
// Local config should not be loaded during tests, whereas test config should be loaded ONLY during tests
|
||||||
? new ConfigAggregator\PhpFileProvider('config/test/*.global.php')
|
new ConfigAggregator\PhpFileProvider($isTestEnv ? 'config/test/*.global.php' : 'config/autoload/{,*.}local.php'),
|
||||||
: new ConfigAggregator\ArrayProvider([]),
|
|
||||||
// Routes have to be loaded last
|
// Routes have to be loaded last
|
||||||
new ConfigAggregator\PhpFileProvider('config/autoload/routes.config.php'),
|
new ConfigAggregator\PhpFileProvider('config/autoload/routes.config.php'),
|
||||||
], 'data/cache/app_config.php', [
|
], 'data/cache/app_config.php', [
|
||||||
|
|
|
@ -23,8 +23,8 @@ class ProcessRunner implements ProcessRunnerInterface
|
||||||
public function __construct(private ProcessHelper $helper, ?callable $createProcess = null)
|
public function __construct(private ProcessHelper $helper, ?callable $createProcess = null)
|
||||||
{
|
{
|
||||||
$this->createProcess = $createProcess !== null
|
$this->createProcess = $createProcess !== null
|
||||||
? Closure::fromCallable($createProcess)
|
? $createProcess(...)
|
||||||
: static fn (array $cmd) => new Process($cmd, null, null, null, LockedCommandConfig::DEFAULT_TTL);
|
: static fn (array $cmd) => new Process($cmd, timeout: LockedCommandConfig::DEFAULT_TTL);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function run(OutputInterface $output, array $cmd): void
|
public function run(OutputInterface $output, array $cmd): void
|
||||||
|
|
|
@ -12,7 +12,7 @@ enum DeviceType: string
|
||||||
|
|
||||||
public static function matchFromUserAgent(string $userAgent): ?self
|
public static function matchFromUserAgent(string $userAgent): ?self
|
||||||
{
|
{
|
||||||
$detect = new MobileDetect(null, $userAgent); // @phpstan-ignore-line
|
$detect = new MobileDetect(userAgent: $userAgent); // @phpstan-ignore-line
|
||||||
|
|
||||||
return match (true) {
|
return match (true) {
|
||||||
// $detect->is('iOS') && $detect->isTablet() => self::IOS, // TODO To detect iPad only
|
// $detect->is('iOS') && $detect->isTablet() => self::IOS, // TODO To detect iPad only
|
||||||
|
|
|
@ -40,7 +40,7 @@ class ListTagsAction extends AbstractRestAction
|
||||||
|
|
||||||
// This part is deprecated. To get tags with stats, the /tags/stats endpoint should be used instead
|
// This part is deprecated. To get tags with stats, the /tags/stats endpoint should be used instead
|
||||||
$tagsInfo = $this->tagService->tagsInfo($params, $apiKey);
|
$tagsInfo = $this->tagService->tagsInfo($params, $apiKey);
|
||||||
$rawTags = $this->serializePaginator($tagsInfo, null, 'stats');
|
$rawTags = $this->serializePaginator($tagsInfo, dataProp: 'stats');
|
||||||
$rawTags['data'] = map($tagsInfo, static fn (TagInfo $info) => $info->tag);
|
$rawTags['data'] = map($tagsInfo, static fn (TagInfo $info) => $info->tag);
|
||||||
|
|
||||||
return new JsonResponse(['tags' => $rawTags]);
|
return new JsonResponse(['tags' => $rawTags]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue