From 5146419e9a9b6d2a2523611ef5d18e969fad8fdf Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Thu, 6 May 2021 15:03:45 +0200 Subject: [PATCH] Remove privacyEvent.yaml + autowire logger. --- src/Bundle/ChillPersonBundle/config/services.yaml | 5 +++++ .../ChillPersonBundle/config/services/privacyEvent.yaml | 7 ------- .../src/DependencyInjection/ChillPersonExtension.php | 1 - .../PrivacyEventSubscriber.php | 7 ++++--- 4 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 src/Bundle/ChillPersonBundle/config/services/privacyEvent.yaml rename src/Bundle/ChillPersonBundle/src/{Privacy => EventSubscriber}/PrivacyEventSubscriber.php (93%) diff --git a/src/Bundle/ChillPersonBundle/config/services.yaml b/src/Bundle/ChillPersonBundle/config/services.yaml index 921e02576..e5dc0080c 100644 --- a/src/Bundle/ChillPersonBundle/config/services.yaml +++ b/src/Bundle/ChillPersonBundle/config/services.yaml @@ -41,6 +41,11 @@ services: tags: - { name: 'chill.menu_builder' } + Chill\PersonBundle\EventSubscriber\: + resource: '../src/EventSubscriber/' + tags: + - { name: kernel.event_subscriber } + chill.person.security.authorization.person: class: Chill\PersonBundle\Security\Authorization\PersonVoter arguments: diff --git a/src/Bundle/ChillPersonBundle/config/services/privacyEvent.yaml b/src/Bundle/ChillPersonBundle/config/services/privacyEvent.yaml deleted file mode 100644 index 780601d9d..000000000 --- a/src/Bundle/ChillPersonBundle/config/services/privacyEvent.yaml +++ /dev/null @@ -1,7 +0,0 @@ -services: - Chill\PersonBundle\Privacy\PrivacyEventSubscriber: - arguments: - $logger: '@chill.main.logger' - $token: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface' - tags: - - { name: kernel.event_subscriber } diff --git a/src/Bundle/ChillPersonBundle/src/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/src/DependencyInjection/ChillPersonExtension.php index 5240a063c..ad97f21fa 100644 --- a/src/Bundle/ChillPersonBundle/src/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/src/DependencyInjection/ChillPersonExtension.php @@ -66,7 +66,6 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac $loader->load('services/exports.yaml'); $loader->load('services/fixtures.yaml'); $loader->load('services/search.yaml'); - $loader->load('services/privacyEvent.yaml'); $loader->load('services/command.yaml'); $loader->load('services/form.yaml'); $loader->load('services/templating.yaml'); diff --git a/src/Bundle/ChillPersonBundle/src/Privacy/PrivacyEventSubscriber.php b/src/Bundle/ChillPersonBundle/src/EventSubscriber/PrivacyEventSubscriber.php similarity index 93% rename from src/Bundle/ChillPersonBundle/src/Privacy/PrivacyEventSubscriber.php rename to src/Bundle/ChillPersonBundle/src/EventSubscriber/PrivacyEventSubscriber.php index c37fc67b2..247619eba 100644 --- a/src/Bundle/ChillPersonBundle/src/Privacy/PrivacyEventSubscriber.php +++ b/src/Bundle/ChillPersonBundle/src/EventSubscriber/PrivacyEventSubscriber.php @@ -1,6 +1,6 @@ logger = $logger; + $this->logger = $chillMain; $this->token = $token; }