2020-02-19 20:58:22 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
|
|
|
use Laminas\ServiceManager\Factory\InvokableFactory;
|
|
|
|
use PhpMiddleware\RequestId;
|
2022-06-04 09:59:17 +03:00
|
|
|
use Shlinkio\Shlink\Common\Logger\Processor\BackwardsCompatibleMonologProcessorDelegator;
|
2020-02-19 20:58:22 +03:00
|
|
|
|
|
|
|
return [
|
|
|
|
|
|
|
|
'request_id' => [
|
|
|
|
'allow_override' => true,
|
|
|
|
'header_name' => 'X-Request-Id',
|
|
|
|
],
|
|
|
|
|
|
|
|
'dependencies' => [
|
|
|
|
'factories' => [
|
|
|
|
RequestId\Generator\RamseyUuid4StaticGenerator::class => InvokableFactory::class,
|
|
|
|
RequestId\RequestIdProviderFactory::class => ConfigAbstractFactory::class,
|
|
|
|
RequestId\RequestIdMiddleware::class => ConfigAbstractFactory::class,
|
2020-02-19 21:37:47 +03:00
|
|
|
RequestId\MonologProcessor::class => ConfigAbstractFactory::class,
|
2020-02-19 20:58:22 +03:00
|
|
|
],
|
2022-06-04 09:59:17 +03:00
|
|
|
'delegators' => [
|
|
|
|
RequestId\MonologProcessor::class => [
|
|
|
|
BackwardsCompatibleMonologProcessorDelegator::class,
|
|
|
|
],
|
|
|
|
],
|
2020-02-19 20:58:22 +03:00
|
|
|
],
|
|
|
|
|
|
|
|
ConfigAbstractFactory::class => [
|
|
|
|
RequestId\RequestIdProviderFactory::class => [
|
|
|
|
RequestId\Generator\RamseyUuid4StaticGenerator::class,
|
|
|
|
'config.request_id.allow_override',
|
|
|
|
'config.request_id.header_name',
|
|
|
|
],
|
2020-03-27 00:17:13 +03:00
|
|
|
RequestId\RequestIdMiddleware::class => [
|
|
|
|
RequestId\RequestIdProviderFactory::class,
|
|
|
|
'config.request_id.header_name',
|
|
|
|
],
|
2020-02-19 21:37:47 +03:00
|
|
|
RequestId\MonologProcessor::class => [RequestId\RequestIdMiddleware::class],
|
2020-02-19 20:58:22 +03:00
|
|
|
],
|
|
|
|
|
|
|
|
];
|