Support new DI

Provide Services.yaml to provide new DI.
Also remove deprecated command registration and move them into
Services.yaml.
This commit is contained in:
Daniel Siepmann 2021-02-23 13:54:28 +01:00
parent 59db0d6432
commit cbd59a366d
2 changed files with 23 additions and 16 deletions

View file

@ -1,16 +0,0 @@
<?php
use Wrm\Events\Command\DestinationDataImportCommand;
use Wrm\Events\Command\RemoveAllCommand;
use Wrm\Events\Command\RemovePastCommand;
return [
'events:destinationdataimport' => [
'class' => DestinationDataImportCommand::class
],
'events:removeAll' => [
'class' => RemoveAllCommand::class
],
'events:removePast' => [
'class' => RemovePastCommand::class
],
];

View file

@ -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'