Added support for port option in SimplifiedConfigParser

This commit is contained in:
Alejandro Celaya 2020-10-03 11:54:31 +02:00
parent c8d7413dd4
commit 450eea64aa
2 changed files with 3 additions and 0 deletions

View file

@ -40,6 +40,7 @@ class SimplifiedConfigParser
'anonymize_remote_addr' => ['url_shortener', 'anonymize_remote_addr'],
'redirect_status_code' => ['url_shortener', 'redirect_status_code'],
'redirect_cache_lifetime' => ['url_shortener', 'redirect_cache_lifetime'],
'port' => ['mezzio-swoole', 'swoole-http-server', 'port'],
];
private const SIMPLIFIED_CONFIG_SIDE_EFFECTS = [
'delete_short_url_threshold' => [

View file

@ -67,6 +67,7 @@ class SimplifiedConfigParserTest extends TestCase
'anonymize_remote_addr' => false,
'redirect_status_code' => 301,
'redirect_cache_lifetime' => 90,
'port' => 8888,
];
$expected = [
'app_options' => [
@ -132,6 +133,7 @@ class SimplifiedConfigParserTest extends TestCase
'mezzio-swoole' => [
'swoole-http-server' => [
'port' => 8888,
'options' => [
'task_worker_num' => 50,
],