mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
fix
This commit is contained in:
@@ -88,7 +88,6 @@ use Alchemy\Phrasea\Media\PermalinkMediaResolver;
|
||||
use Alchemy\Phrasea\Media\TechnicalDataServiceProvider;
|
||||
use Alchemy\Phrasea\Model\Entities\User;
|
||||
use Alchemy\QueueProvider\QueueServiceProvider;
|
||||
use Alchemy\Phrasea\Core\Event\Subscriber\WebhookSubdefEventSubscriber;
|
||||
use Alchemy\WorkerProvider\WorkerServiceProvider;
|
||||
use Doctrine\DBAL\Event\ConnectionEventArgs;
|
||||
use MediaVorus\Media\MediaInterface;
|
||||
@@ -743,7 +742,6 @@ class Application extends SilexApplication
|
||||
$dispatcher->addSubscriber(new LazaretSubscriber($app));
|
||||
$dispatcher->addSubscriber(new ValidationSubscriber($app));
|
||||
$dispatcher->addSubscriber(new WebhookUserEventSubscriber($app));
|
||||
$dispatcher->addSubscriber(new WebhookSubdefEventSubscriber($app['manipulator.webhook-event']));
|
||||
|
||||
return $dispatcher;
|
||||
})
|
||||
|
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Alchemy\Phrasea\Core\Provider;
|
||||
|
||||
use Alchemy\Phrasea\Core\Event\Subscriber\WebhookSubdefEventSubscriber;
|
||||
use Alchemy\Phrasea\Webhook\EventProcessorFactory;
|
||||
use Alchemy\Phrasea\Webhook\EventProcessorWorker;
|
||||
use Alchemy\Phrasea\Webhook\WebhookInvoker;
|
||||
@@ -10,6 +11,7 @@ use Alchemy\Worker\CallableWorkerFactory;
|
||||
use Alchemy\Worker\TypeBasedWorkerResolver;
|
||||
use Silex\Application;
|
||||
use Silex\ServiceProviderInterface;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
|
||||
class WebhookServiceProvider implements ServiceProviderInterface
|
||||
{
|
||||
@@ -69,6 +71,12 @@ class WebhookServiceProvider implements ServiceProviderInterface
|
||||
|
||||
public function boot(Application $app)
|
||||
{
|
||||
// no-op
|
||||
$app['dispatcher'] = $app->share(
|
||||
$app->extend('dispatcher', function (EventDispatcherInterface $dispatcher) use ($app) {
|
||||
$dispatcher->addSubscriber(new WebhookSubdefEventSubscriber($app['manipulator.webhook-event']));
|
||||
|
||||
return $dispatcher;
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user