mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Created task running system based on event listener which are transparently cast into tasks
This commit is contained in:
20
config/autoload/event_dispatcher.global.php
Normal file
20
config/autoload/event_dispatcher.global.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink;
|
||||
|
||||
use Phly\EventDispatcher as Phly;
|
||||
use Psr\EventDispatcher as Psr;
|
||||
|
||||
return [
|
||||
|
||||
'dependencies' => [
|
||||
'factories' => [
|
||||
Psr\ListenerProviderInterface::class => Common\EventDispatcher\ListenerProviderFactory::class,
|
||||
],
|
||||
'aliases' => [
|
||||
Psr\EventDispatcherInterface::class => Phly\EventDispatcher::class,
|
||||
],
|
||||
],
|
||||
|
||||
];
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink;
|
||||
|
||||
use Phly\EventDispatcher as Phly;
|
||||
use Psr\EventDispatcher as Psr;
|
||||
use Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
||||
|
||||
return [
|
||||
|
||||
'dependencies' => [
|
||||
'factories' => [
|
||||
Common\EventDispatcher\SwooleEventDispatcher::class => ConfigAbstractFactory::class,
|
||||
Psr\ListenerProviderInterface::class => Common\EventDispatcher\ListenerProviderFactory::class,
|
||||
],
|
||||
'aliases' => [
|
||||
Psr\EventDispatcherInterface::class => Common\EventDispatcher\SwooleEventDispatcher::class,
|
||||
],
|
||||
],
|
||||
|
||||
ConfigAbstractFactory::class => [
|
||||
Common\EventDispatcher\SwooleEventDispatcher::class => [Phly\EventDispatcher::class],
|
||||
],
|
||||
|
||||
];
|
||||
@@ -5,10 +5,8 @@ namespace Shlinkio\Shlink;
|
||||
|
||||
use Acelaya\ExpressiveErrorHandler;
|
||||
use Phly\EventDispatcher;
|
||||
use Phly\Swoole\TaskWorker;
|
||||
use Zend\ConfigAggregator;
|
||||
use Zend\Expressive;
|
||||
|
||||
use function Shlinkio\Shlink\Common\env;
|
||||
|
||||
return (new ConfigAggregator\ConfigAggregator([
|
||||
@@ -19,7 +17,6 @@ return (new ConfigAggregator\ConfigAggregator([
|
||||
Expressive\Swoole\ConfigProvider::class,
|
||||
ExpressiveErrorHandler\ConfigProvider::class,
|
||||
EventDispatcher\ConfigProvider::class,
|
||||
TaskWorker\ConfigProvider::class,
|
||||
Common\ConfigProvider::class,
|
||||
Core\ConfigProvider::class,
|
||||
CLI\ConfigProvider::class,
|
||||
|
||||
Reference in New Issue
Block a user