Skip to content

Commit b83eb88

Browse files
committed
Fixed digital post commands
1 parent e169d24 commit b83eb88

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

modules/os2forms_digital_post/drush.services.yml

-9
This file was deleted.

modules/os2forms_digital_post/src/Drush/Commands/DigitalPostTestCommands.php

+6
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Drupal\os2forms_digital_post\Drush\Commands;
44

55
use Drupal\Component\Serialization\Yaml;
6+
use Drupal\Core\DependencyInjection\AutowireTrait;
67
use Drupal\Core\Utility\Token;
78
use Drupal\entity_print\Plugin\EntityPrintPluginManagerInterface;
89
use Drupal\os2forms_digital_post\Helper\DigitalPostHelper;
@@ -12,20 +13,25 @@
1213
use ItkDev\Serviceplatformen\Service\SF1601\SF1601;
1314
use Symfony\Component\Console\Exception\InvalidArgumentException;
1415
use Symfony\Component\Console\Style\SymfonyStyle;
16+
use Symfony\Component\DependencyInjection\Attribute\Autowire;
1517
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
1618

1719
/**
1820
* Test commands for digital post.
1921
*/
2022
class DigitalPostTestCommands extends DrushCommands {
23+
use AutowireTrait;
2124

2225
/**
2326
* Constructor.
2427
*/
2528
public function __construct(
29+
#[Autowire(service: DigitalPostHelper::class)]
2630
private readonly DigitalPostHelper $digitalPostHelper,
2731
private readonly Token $token,
32+
#[Autowire(service: 'plugin.manager.entity_print.print_engine')]
2833
private readonly EntityPrintPluginManagerInterface $entityPrintPluginManager,
34+
#[Autowire(service: Settings::class)]
2935
private readonly Settings $digitalPostSettings,
3036
) {
3137
}

0 commit comments

Comments
 (0)