From cbd59a366d70dc8fee087b6698f8d56a4213937c Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Tue, 23 Feb 2021 13:54:28 +0100 Subject: [PATCH] Support new DI Provide Services.yaml to provide new DI. Also remove deprecated command registration and move them into Services.yaml. --- Configuration/Commands.php | 16 ---------------- Configuration/Services.yaml | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 16 deletions(-) delete mode 100644 Configuration/Commands.php create mode 100644 Configuration/Services.yaml diff --git a/Configuration/Commands.php b/Configuration/Commands.php deleted file mode 100644 index 11e5c0f..0000000 --- a/Configuration/Commands.php +++ /dev/null @@ -1,16 +0,0 @@ - [ - 'class' => DestinationDataImportCommand::class - ], - 'events:removeAll' => [ - 'class' => RemoveAllCommand::class - ], - 'events:removePast' => [ - 'class' => RemovePastCommand::class - ], -]; diff --git a/Configuration/Services.yaml b/Configuration/Services.yaml new file mode 100644 index 0000000..9f37eb6 --- /dev/null +++ b/Configuration/Services.yaml @@ -0,0 +1,23 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Wrm\Events\: + resource: '../Classes/*' + + Wrm\Events\Command\DestinationDataImportCommand: + tags: + - name: 'console.command' + command: 'events:destinationdataimport' + + Wrm\Events\Command\RemoveAllCommand: + tags: + - name: 'console.command' + command: 'events:removeAll' + + Wrm\Events\Command\RemovePastCommand: + tags: + - name: 'console.command' + command: 'events:removePast'