diff --git a/src/Bundle/ChillMainBundle/ChillMainBundle.php b/src/Bundle/ChillMainBundle/ChillMainBundle.php index 4a059662c..a3222a685 100644 --- a/src/Bundle/ChillMainBundle/ChillMainBundle.php +++ b/src/Bundle/ChillMainBundle/ChillMainBundle.php @@ -11,6 +11,7 @@ declare(strict_types=1); namespace Chill\MainBundle; +use Chill\MainBundle\Audit\SubjectConverterInterface; use Chill\MainBundle\Cron\CronJobInterface; use Chill\MainBundle\CRUD\CompilerPass\CRUDControllerCompilerPass; use Chill\MainBundle\DependencyInjection\CompilerPass\ACLFlagsCompilerPass; @@ -64,6 +65,8 @@ class ChillMainBundle extends Bundle ->addTag('chill_main.provide_role'); $container->registerForAutoconfiguration(NotificationFlagProviderInterface::class) ->addTag('chill_main.notification_flag_provider'); + $container->registerForAutoconfiguration(SubjectConverterInterface::class) + ->addTag('chill_main.audit_subject_converter'); $container->addCompilerPass(new SearchableServicesCompilerPass(), \Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_OPTIMIZATION, 0); $container->addCompilerPass(new ConfigConsistencyCompilerPass(), \Symfony\Component\DependencyInjection\Compiler\PassConfig::TYPE_BEFORE_OPTIMIZATION, 0); diff --git a/src/Bundle/ChillMainBundle/config/services.yaml b/src/Bundle/ChillMainBundle/config/services.yaml index f73eeb071..b8c0fbd10 100644 --- a/src/Bundle/ChillMainBundle/config/services.yaml +++ b/src/Bundle/ChillMainBundle/config/services.yaml @@ -3,6 +3,7 @@ parameters: imports: - ./services/clock.yaml + - ./services/audit.yaml services: _defaults: diff --git a/src/Bundle/ChillMainBundle/config/services/audit.yaml b/src/Bundle/ChillMainBundle/config/services/audit.yaml new file mode 100644 index 000000000..51ac98369 --- /dev/null +++ b/src/Bundle/ChillMainBundle/config/services/audit.yaml @@ -0,0 +1,16 @@ +services: + _defaults: + autowire: true + autoconfigure: true + + Chill\MainBundle\Audit\: + resource: '../../Audit/*' + exclude: + - '../../Audit/Subject.php' + - '../../Audit/AuditEvent.php' + - '../../Audit/Exception/' + - '../../Audit/Exception/*' + + Chill\MainBundle\Audit\SubjectConverterManager: + arguments: + $converters: !tagged_iterator chill_main.audit_subject_converter