diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index f50b23d..69766ce 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -8,7 +8,7 @@ jobs: fail-fast: false steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 2 @@ -39,7 +39,7 @@ jobs: id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} @@ -71,7 +71,7 @@ jobs: id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} @@ -104,7 +104,7 @@ jobs: id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} @@ -118,12 +118,12 @@ jobs: name: markdownlint steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Get yarn cache directory path id: yarn-cache-dir-path run: echo "::set-output name=dir::$(yarn cache dir)" - name: Cache yarn packages - uses: actions/cache@v2 + uses: actions/cache@v4 id: yarn-cache with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/CHANGELOG.md b/CHANGELOG.md index eb68894..7175253 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,13 +11,16 @@ before starting to add changes. Use example [placed in the end of the page](#exa ## [Unreleased] +- [PR-166](https://github.com/OS2Forms/os2forms/pull/166) + - Fix digital post commands + - Updated versions in GitHub Actions `uses` steps - Updating the display of os2forms package on the status page ## [4.0.0] 2025-03-06 -- This is an alias for for 3.22.2. Major change is the module removal, which can lead to lack of backward support. -See full release note here: -https://github.com/OS2Forms/os2forms_docs/blob/master/docs/releases/2024-Q4-Release-notes.md +- This is an alias for for 3.22.2. Major change is the module removal, which can + lead to lack of backward support. See full release note here: + ## [3.22.2] 2025-02-28 @@ -92,9 +95,8 @@ https://github.com/OS2Forms/os2forms_docs/blob/master/docs/releases/2024-Q4-Rele ## [3.16.0] 2024-08-27 f/OS-115_dawa_address -- [OS-115] Skipping empty maktrikula objects - +- [OS-115] Skipping empty maktrikula objects [#110](https://github.com/OS2Forms/os2forms/pull/110) diff --git a/modules/os2forms_digital_post/drush.services.yml b/modules/os2forms_digital_post/drush.services.yml deleted file mode 100644 index ac0d5f8..0000000 --- a/modules/os2forms_digital_post/drush.services.yml +++ /dev/null @@ -1,9 +0,0 @@ -services: - Drupal\os2forms_digital_post\Drush\Commands\DigitalPostTestCommands: - arguments: - - '@Drupal\os2forms_digital_post\Helper\DigitalPostHelper' - - '@token' - - '@plugin.manager.entity_print.print_engine' - - '@Drupal\os2forms_digital_post\Helper\Settings' - tags: - - { name: drush.command } diff --git a/modules/os2forms_digital_post/src/Drush/Commands/DigitalPostTestCommands.php b/modules/os2forms_digital_post/src/Drush/Commands/DigitalPostTestCommands.php index 248452a..201581c 100644 --- a/modules/os2forms_digital_post/src/Drush/Commands/DigitalPostTestCommands.php +++ b/modules/os2forms_digital_post/src/Drush/Commands/DigitalPostTestCommands.php @@ -3,6 +3,7 @@ namespace Drupal\os2forms_digital_post\Drush\Commands; use Drupal\Component\Serialization\Yaml; +use Drupal\Core\DependencyInjection\AutowireTrait; use Drupal\Core\Utility\Token; use Drupal\entity_print\Plugin\EntityPrintPluginManagerInterface; use Drupal\os2forms_digital_post\Helper\DigitalPostHelper; @@ -12,20 +13,25 @@ use ItkDev\Serviceplatformen\Service\SF1601\SF1601; use Symfony\Component\Console\Exception\InvalidArgumentException; use Symfony\Component\Console\Style\SymfonyStyle; +use Symfony\Component\DependencyInjection\Attribute\Autowire; use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; /** * Test commands for digital post. */ class DigitalPostTestCommands extends DrushCommands { + use AutowireTrait; /** * Constructor. */ public function __construct( + #[Autowire(service: DigitalPostHelper::class)] private readonly DigitalPostHelper $digitalPostHelper, private readonly Token $token, + #[Autowire(service: 'plugin.manager.entity_print.print_engine')] private readonly EntityPrintPluginManagerInterface $entityPrintPluginManager, + #[Autowire(service: Settings::class)] private readonly Settings $digitalPostSettings, ) { } diff --git a/os2forms.install b/os2forms.install index 5444428..2079b53 100644 --- a/os2forms.install +++ b/os2forms.install @@ -74,7 +74,7 @@ function os2forms_requirements($phase) { 0 => t('version @version (commit: @reference)', [ '@version' => $version, '@reference' => $reference, - ]) + ]), ], ];