From b03fc3558e86b083601e3c13a75da8cca54b668c Mon Sep 17 00:00:00 2001 From: Tchama Date: Wed, 15 Jul 2020 18:09:53 +0200 Subject: [PATCH] deprecated, new syntax service definition (export_manager) --- DependencyInjection/CompilerPass/ExportsCompilerPass.php | 8 ++++---- Resources/config/services.yml | 5 ++--- Resources/config/services/export.yml | 5 ----- Resources/config/services/form.yml | 7 ------- 4 files changed, 6 insertions(+), 19 deletions(-) diff --git a/DependencyInjection/CompilerPass/ExportsCompilerPass.php b/DependencyInjection/CompilerPass/ExportsCompilerPass.php index 3b4b2069e..2aa5327b0 100644 --- a/DependencyInjection/CompilerPass/ExportsCompilerPass.php +++ b/DependencyInjection/CompilerPass/ExportsCompilerPass.php @@ -41,13 +41,13 @@ class ExportsCompilerPass implements CompilerPassInterface public function process(ContainerBuilder $container) { - if (!$container->hasDefinition('chill.main.export_manager')) { - throw new \LogicException('service chill.main.export_manager ' + if (!$container->has('Chill\MainBundle\Export\ExportManager')) { + throw new \LogicException('service Chill\MainBundle\Export\ExportManager ' . 'is not defined. It is required by ExportsCompilerPass'); } - $chillManagerDefinition = $container->getDefinition( - 'chill.main.export_manager' + $chillManagerDefinition = $container->findDefinition( + 'Chill\MainBundle\Export\ExportManager' ); $this->compileExports($chillManagerDefinition, $container); diff --git a/Resources/config/services.yml b/Resources/config/services.yml index 010deb3ca..968924782 100644 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -42,7 +42,7 @@ services: - "@doctrine.orm.entity_manager" calls: - [ setContainer, ["@service_container"]] - + chill.main.validator.role_scope_scope_presence: class: Chill\MainBundle\Validation\Validator\RoleScopeScopePresence arguments: @@ -52,8 +52,7 @@ services: tags: - { name: validator.constraint_validator, alias: 'role_scope_scope_presence' } - chill.main.export_manager: - class: Chill\MainBundle\Export\ExportManager + Chill\MainBundle\Export\ExportManager: arguments: - "@logger" - "@doctrine.orm.entity_manager" diff --git a/Resources/config/services/export.yml b/Resources/config/services/export.yml index bd6d730da..f49173b70 100644 --- a/Resources/config/services/export.yml +++ b/Resources/config/services/export.yml @@ -9,7 +9,6 @@ services: # class: Chill\MainBundle\Export\Formatter\CSVFormatter # arguments: # - "@translator" -# - "@chill.main.export_manager" # tags: # - { name: chill.export_formatter, alias: 'csv' } @@ -17,7 +16,6 @@ services: class: Chill\MainBundle\Export\Formatter\SpreadSheetFormatter arguments: - "@translator" - - "@chill.main.export_manager" tags: - { name: chill.export_formatter, alias: 'spreadsheet' } @@ -25,7 +23,6 @@ services: class: Chill\MainBundle\Export\Formatter\CSVListFormatter arguments: - "@translator" - - "@chill.main.export_manager" tags: - { name: chill.export_formatter, alias: 'csvlist' } @@ -33,7 +30,6 @@ services: class: Chill\MainBundle\Export\Formatter\SpreadsheetListFormatter arguments: - "@translator" - - "@chill.main.export_manager" tags: - { name: chill.export_formatter, alias: 'spreadlist' } @@ -41,7 +37,6 @@ services: class: Chill\MainBundle\Export\Formatter\CSVPivotedListFormatter arguments: - "@translator" - - "@chill.main.export_manager" tags: - { name: chill.export_formatter, alias: 'csv_pivoted_list' } \ No newline at end of file diff --git a/Resources/config/services/form.yml b/Resources/config/services/form.yml index d9f8a5700..b6ee8fb6c 100644 --- a/Resources/config/services/form.yml +++ b/Resources/config/services/form.yml @@ -68,15 +68,11 @@ services: chill.main.form.type.export: class: Chill\MainBundle\Form\Type\Export\ExportType - arguments: - - "@chill.main.export_manager" tags: - { name: form.type } chill.main.form.pick_formatter_type: class: Chill\MainBundle\Form\Type\Export\PickFormatterType - arguments: - - "@chill.main.export_manager" tags: - { name: form.type } @@ -84,15 +80,12 @@ services: class: Chill\MainBundle\Form\Type\Export\PickCenterType arguments: - "@security.token_storage" - - "@chill.main.export_manager" - "@chill.main.security.authorization.helper" tags: - { name: form.type } chill.main.form.formatter_type: class: Chill\MainBundle\Form\Type\Export\FormatterType - arguments: - - "@chill.main.export_manager" tags: - { name: form.type }