From 4d2153235ee507e147274364f6ec219279af16be Mon Sep 17 00:00:00 2001 From: jekuaitk Date: Thu, 24 Sep 2026 09:45:43 +0200 Subject: [PATCH 1/5] Upgraded to drupal/webform_rest ^4.2 --- CHANGELOG.md | 3 +++ composer.json | 2 +- patches/webform_rest_submission.patch | 22 +++++++++++----------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 044badd..192817a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,9 @@ about writing changes to this log. ## [Unreleased] +* Upgraded to `"drupal/webform_rest": "^4.2"` +* Upgraded linked data patch accordingly. + ## [2.3.0] * Allowed `os2forms/os2forms` `5.x`. diff --git a/composer.json b/composer.json index 553c8a6..a586eb4 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ "require": { "cweagans/composer-patches": "^1.7", "drupal/key_auth": "^2.0", - "drupal/webform_rest": "^4.1", + "drupal/webform_rest": "^4.2", "os2forms/os2forms": "^4.0 || ^5.0" }, "require-dev": { diff --git a/patches/webform_rest_submission.patch b/patches/webform_rest_submission.patch index bb881e5..e41d2f7 100644 --- a/patches/webform_rest_submission.patch +++ b/patches/webform_rest_submission.patch @@ -1,6 +1,6 @@ diff --git a/src/Event/WebformSubmissionDataEvent.php b/src/Event/WebformSubmissionDataEvent.php new file mode 100644 -index 0000000..c378f45 +index 0000000..321018d --- /dev/null +++ b/src/Event/WebformSubmissionDataEvent.php @@ -0,0 +1,52 @@ @@ -42,34 +42,34 @@ index 0000000..c378f45 + */ + public function getWebformSubmission(): WebformSubmissionInterface + { -+ return $this->webformSubmission; ++ return $this->webformSubmission; + } + + public function getData(): array + { -+ return $this->data; ++ return $this->data; + } + + public function setData(array $data) + { -+ $this->data = $data; -+ return $this; ++ $this->data = $data; ++ return $this; + } +} diff --git a/src/Plugin/rest/resource/WebformSubmissionResource.php b/src/Plugin/rest/resource/WebformSubmissionResource.php -index ebe22aa..4102129 100644 +index 651bb26..afadf99 100644 --- a/src/Plugin/rest/resource/WebformSubmissionResource.php +++ b/src/Plugin/rest/resource/WebformSubmissionResource.php @@ -5,6 +5,7 @@ namespace Drupal\webform_rest\Plugin\rest\resource; - use Drupal\webform\WebformSubmissionForm; - use Drupal\rest\Plugin\ResourceBase; use Drupal\rest\ModifiedResourceResponse; + use Drupal\rest\Plugin\ResourceBase; + use Drupal\rest\ResourceResponse; +use Drupal\webform_rest\Event\WebformSubmissionDataEvent; - use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; + use Drupal\webform\WebformSubmissionForm; use Symfony\Component\DependencyInjection\ContainerInterface; - + use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; @@ -43,6 +44,13 @@ class WebformSubmissionResource extends ResourceBase { - + */ protected $currentUser; + /** From 375caffe641499c408d2010d35516ff5245e394b Mon Sep 17 00:00:00 2001 From: jekuaitk Date: Thu, 24 Sep 2026 10:26:07 +0200 Subject: [PATCH 2/5] Update patch url --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index a586eb4..fb925df 100644 --- a/composer.json +++ b/composer.json @@ -63,7 +63,7 @@ "enable-patching": true, "patches": { "drupal/webform_rest": { - "Added ability to modify response data sent from Webform Submission endpoint": "https://raw.githubusercontent.com/OS2Forms/os2forms_rest_api/2.0.2/patches/webform_rest_submission.patch" + "Added ability to modify response data sent from Webform Submission endpoint": "https://raw.githubusercontent.com/OS2Forms/os2forms_rest_api/feature/upgrade-webform-rest-version/patches/webform_rest_submission.patch" } } } From fb0ea24ae41719bd4a0bf9c36eea3f4a37d34353 Mon Sep 17 00:00:00 2001 From: jekuaitk Date: Thu, 24 Sep 2026 11:28:21 +0200 Subject: [PATCH 3/5] Update actions --- .github/workflows/changelog.yaml | 27 ++++++ .github/workflows/composer.yaml | 92 +++++++++++++++++++ .github/workflows/markdown.yaml | 45 ++++++++++ .github/workflows/php.yaml | 76 ++++++++++++++++ .github/workflows/pr.yaml | 149 ------------------------------- .markdownlint.jsonc | 13 +++ CHANGELOG.md | 28 +++--- README.md | 4 +- compose.override.yaml | 4 + compose.yaml | 32 +++++++ composer.json | 76 +++++++++------- 11 files changed, 349 insertions(+), 197 deletions(-) create mode 100644 .github/workflows/changelog.yaml create mode 100644 .github/workflows/composer.yaml create mode 100644 .github/workflows/markdown.yaml create mode 100644 .github/workflows/php.yaml delete mode 100644 .github/workflows/pr.yaml create mode 100644 .markdownlint.jsonc create mode 100644 compose.override.yaml create mode 100644 compose.yaml diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml new file mode 100644 index 0000000..6908667 --- /dev/null +++ b/.github/workflows/changelog.yaml @@ -0,0 +1,27 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/changelog.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Changelog +### +### Checks that changelog has been updated + +name: Changelog + +on: + pull_request: + +jobs: + changelog: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 2 + + - name: Git fetch + run: git fetch + + - name: Check that changelog has been updated. + run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0 diff --git a/.github/workflows/composer.yaml b/.github/workflows/composer.yaml new file mode 100644 index 0000000..65fd01f --- /dev/null +++ b/.github/workflows/composer.yaml @@ -0,0 +1,92 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/composer.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Composer +### +### Validates composer.json and checks that it's normalized. +### +### #### Assumptions +### +### 1. A docker compose service named `phpfpm` can be run and `composer` can be +### run inside the `phpfpm` service. +### 2. [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize) +### is a dev requirement in `composer.json`: +### +### ``` shell +### docker compose run --rm phpfpm composer require --dev ergebnis/composer-normalize +### ``` +### +### Normalize `composer.json` by running +### +### ``` shell +### docker compose run --rm phpfpm composer normalize +### ``` + +name: Composer + +env: + COMPOSE_USER: runner + # https://getcomposer.org/doc/03-cli.md#composer-auth + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"} }' + +on: + pull_request: + paths: &paths + - "composer.json" + - "compose.yaml" + push: + branches: + - main + - develop + paths: *paths + +jobs: + composer-validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Create docker network + run: | + docker network create frontend + + - run: | + docker compose run --rm phpfpm composer validate --strict + + composer-normalized: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Create docker network + run: | + docker network create frontend + + - &composer_install + name: Composer install + run: | + # Create a temporary composer file to install https://github.com/mglaman/composer-drupal-lenient before the real install needs it. + docker compose run --rm --env COMPOSER=composer.lenient.json phpfpm composer init --no-interaction + docker compose run --rm --env COMPOSER=composer.lenient.json phpfpm composer config --no-plugins allow-plugins.mglaman/composer-drupal-lenient true + docker compose run --rm --env COMPOSER_AUTH --env COMPOSER=composer.lenient.json phpfpm composer require mglaman/composer-drupal-lenient:^1 + docker compose run --rm --env COMPOSER=composer.lenient.json phpfpm rm composer.lenient.* + # The real install. + docker compose run --rm --env COMPOSER_AUTH phpfpm composer install --no-blocking + + - run: | + docker compose run --rm phpfpm composer normalize --dry-run + + composer-audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Create docker network + run: | + docker network create frontend + + - *composer_install + + - run: | + docker compose run --rm phpfpm composer audit diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml new file mode 100644 index 0000000..ce1d1e4 --- /dev/null +++ b/.github/workflows/markdown.yaml @@ -0,0 +1,45 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/markdown.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Markdown +### +### Lints Markdown files (`**/*.md`) in the project. +### +### [markdownlint-cli configuration +### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration), +### `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually +### linted and how. +### +### #### Assumptions +### +### 1. A docker compose service named `markdownlint` for running `markdownlint` +### (from +### [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli)) +### exists. + +name: Markdown + +on: + pull_request: + paths: &paths + - "**/*.md" + push: + branches: + - main + - develop + paths: *paths + +jobs: + markdown-lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Create docker network + run: | + docker network create frontend + + - run: | + docker compose run --rm markdownlint markdownlint '**/*.md' diff --git a/.github/workflows/php.yaml b/.github/workflows/php.yaml new file mode 100644 index 0000000..6361b71 --- /dev/null +++ b/.github/workflows/php.yaml @@ -0,0 +1,76 @@ +# Do not edit this file! Make a pull request on changing +# github/workflows/drupal-module/php.yaml in +# https://github.com/itk-dev/devops_itkdev-docker if need be. + +### ### Drupal module PHP +### +### Checks that PHP code adheres to the [Drupal coding +### standards](https://www.drupal.org/docs/develop/standards). +### +### #### Assumptions +### +### 1. A docker compose service named `phpfpm` can be run and `composer` can be +### run inside the `phpfpm` service. +### 2. [drupal/coder](https://www.drupal.org/project/coder) is a dev requirement +### in `composer.json`: +### +### ``` shell +### docker compose run --rm phpfpm composer require --dev drupal/coder +### ``` +### +### Clean up and check code by running +### +### ``` shell +### docker compose run --rm phpfpm vendor/bin/phpcbf +### docker compose run --rm phpfpm vendor/bin/phpcs +### ``` +### +### > [!NOTE] +### > The template adds `.phpcs.xml.dist` as [a configuration file for +### > PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#using-a-default-configuration-file) +### > and this makes it possible to override the actual configuration used in a +### > project by adding a more important configuration file, e.g. `.phpcs.xml`. + +name: PHP + +env: + COMPOSE_USER: runner + # https://getcomposer.org/doc/03-cli.md#composer-auth + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"} }' + +on: + pull_request: + paths: &paths + - "**/*.php" + - "composer.json" + - "compose.yaml" + push: + branches: + - main + - develop + paths: *paths + +jobs: + coding-standards: + name: PHP - Check Coding Standards + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Create docker network + run: | + docker network create frontend + + - &composer_install + name: Composer install + run: | + # Create a temporary composer file to install https://github.com/mglaman/composer-drupal-lenient before the real install needs it. + docker compose run --rm --env COMPOSER=composer.lenient.json phpfpm composer init --no-interaction + docker compose run --rm --env COMPOSER=composer.lenient.json phpfpm composer config --no-plugins allow-plugins.mglaman/composer-drupal-lenient true + docker compose run --rm --env COMPOSER_AUTH --env COMPOSER=composer.lenient.json phpfpm composer require mglaman/composer-drupal-lenient:^1 + docker compose run --rm --env COMPOSER=composer.lenient.json phpfpm rm composer.lenient.* + # The real install. + docker compose run --rm --env COMPOSER_AUTH phpfpm composer install --no-blocking + + - run: | + docker compose run --rm phpfpm vendor/bin/phpcs diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml deleted file mode 100644 index 8021c5e..0000000 --- a/.github/workflows/pr.yaml +++ /dev/null @@ -1,149 +0,0 @@ -on: pull_request -name: PR Review -jobs: - changelog: - runs-on: ubuntu-latest - name: Changelog should be updated - strategy: - fail-fast: false - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 2 - - - name: Git fetch - run: git fetch - - - name: Check that changelog has been updated. - run: git diff --exit-code origin/${{ github.base_ref }} -- CHANGELOG.md && exit 1 || exit 0 - - test-composer-files: - name: Validate composer - runs-on: ubuntu-latest - strategy: - matrix: - php-versions: [ '8.3' ] - dependency-version: [ prefer-lowest, prefer-stable ] - steps: - - uses: actions/checkout@master - - name: Setup PHP, with composer and extensions - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: json - coverage: none - tools: composer:v2 - # https://github.com/shivammathur/setup-php#cache-composer-dependencies - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Validate composer files - run: | - composer validate --strict composer.json - # Check that dependencies resolve. - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - - php-check-coding-standards: - name: PHP - Check Coding Standards - runs-on: ubuntu-latest - strategy: - matrix: - php-versions: [ '8.3' ] - dependency-version: [ prefer-lowest, prefer-stable ] - steps: - - uses: actions/checkout@master - - name: Setup PHP, with composer and extensions - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: json - coverage: none - tools: composer:v2 - # https://github.com/shivammathur/setup-php#cache-composer-dependencies - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install Dependencies - run: | - composer install --no-interaction --no-progress - - name: PHPCS - run: | - composer coding-standards-check/phpcs - - php-code-analysis: - name: PHP - Code analysis - runs-on: ubuntu-latest - strategy: - matrix: - php-versions: [ '8.3' ] - dependency-version: [ prefer-lowest, prefer-stable ] - steps: - - uses: actions/checkout@master - - name: Setup PHP, with composer and extensions - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: json, gd - coverage: none - tools: composer:v2 - # https://github.com/shivammathur/setup-php#cache-composer-dependencies - - name: Get composer cache directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: ${{ runner.os }}-composer- - - name: drupal-check - run: | - # We need a Drupal project to run drupal-check (cf. https://github.com/mglaman/drupal-check#usage) - # Install Drupal - composer --no-interaction create-project drupal/recommended-project:^10 --stability=dev drupal - # Copy our module source code into the Drupal module folder. - mkdir -p drupal/web/modules/contrib/os2forms_rest_api - cp -r os2forms_rest_api.* composer.json src drupal/web/modules/contrib/os2forms_rest_api - - # Allow all plugins - composer --working-dir=drupal config --no-plugins allow-plugins true - - # Add our module as a composer repository. - composer --no-interaction --working-dir=drupal config repositories.os2forms/os2forms_rest_api path web/modules/contrib/os2forms_rest_api - - # Restore Drupal composer repository. - composer --no-interaction --working-dir=drupal config repositories.drupal composer https://packages.drupal.org/8 - - # Make Drupal 10 compatible - composer --working-dir=drupal --no-interaction require psr/http-message:^1.0 - composer --working-dir=drupal --no-interaction require 'mglaman/composer-drupal-lenient' - composer --working-dir=drupal config --no-plugins --merge --json extra.drupal-lenient.allowed-list '["drupal/coc_forms_auto_export", "drupal/webform_node_element"]' - - # @see https://getcomposer.org/doc/03-cli.md#modifying-extra-values - composer --no-interaction --working-dir=drupal config --no-plugins --json extra.enable-patching true - - # Require our module. - composer --no-interaction --working-dir=drupal require 'os2forms/os2forms_rest_api:*' - - # Check code - composer --no-interaction --working-dir=drupal require --dev drupal/core-dev - cd drupal/web/modules/contrib/os2forms_rest_api - # Remove our non-dev dependencies to prevent duplicated Drupal installation - # PHP Fatal error: Cannot redeclare drupal_get_filename() (previously declared in /home/runner/work/os2forms_rest_api/os2forms_rest_api/drupal/web/modules/contrib/os2forms_rest_api/vendor/drupal/core/includes/bootstrap.inc:190) in /home/runner/work/os2forms_rest_api/os2forms_rest_api/drupal/web/core/includes/bootstrap.inc on line 190 - # Use sed to remove the "require" property in composer.json - sed -i '/^\s*"require":/,/^\s*}/d' composer.json - composer --no-interaction install - composer code-analysis diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc new file mode 100644 index 0000000..a28c580 --- /dev/null +++ b/.markdownlint.jsonc @@ -0,0 +1,13 @@ +{ + "default": true, + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md013.md + "line-length": { + "line_length": 120, + "code_blocks": false, + "tables": false + }, + // https://github.com/DavidAnson/markdownlint/blob/main/doc/md024.md + "no-duplicate-heading": { + "siblings_only": true + } +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 192817a..4d6d626 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ about writing changes to this log. * Upgraded to `"drupal/webform_rest": "^4.2"` * Upgraded linked data patch accordingly. +* Upgraded actions. +* Added `drupal/webform_node_element` to Drupal lenient allow list. +* Added `ergebnis/composer-normalize` as dev requirement. +* Allowed `simplesamlphp/composer-xmlprovider-installer` composer plugin. ## [2.3.0] @@ -18,44 +22,44 @@ about writing changes to this log. ## [2.2.1] -- Allowed `os2forms/os2forms` 4.0. -- Updated GitHub action dependencies. +* Allowed `os2forms/os2forms` 4.0. +* Updated GitHub action dependencies. ## [2.2.0] -- Avoided loading submissions through `webform_submission` storage. +* Avoided loading submissions through `webform_submission` storage. ## [2.1.0] -- Drupal 10 compatibility. +* Drupal 10 compatibility. ## [2.0.3] -- Gave users with `view_any` submission permission access to API. +* Gave users with `view_any` submission permission access to API. ## [2.0.2] -- Added `OS2Forms Attachment` to attachments data. +* Added `OS2Forms Attachment` to attachments data. ## [2.0.1] -- Updated module config with new list submissions endpoint +* Updated module config with new list submissions endpoint ## [2.0.0] -- Added endpoint for getting all submissions on a webform. -- **Updated** permissions such that users must be given access explicitly. +* Added endpoint for getting all submissions on a webform. +* **Updated** permissions such that users must be given access explicitly. ## [1.1.0] ### Added -- Added attachments data -- Added linked data +* Added attachments data +* Added linked data ## [1.0.0] -- Release 1.0.0 +* Release 1.0.0 [Unreleased]: https://github.com/OS2Forms/os2forms_rest_api/compare/2.3.0...HEAD [2.3.0]: https://github.com/OS2Forms/os2forms_rest_api/compare/2.2.1...2.3.0 diff --git a/README.md b/README.md index 86c0af4..879d2f5 100644 --- a/README.md +++ b/README.md @@ -133,8 +133,8 @@ Response: You can filter results based on submission time by adding query parameters to the URL: -| Name | Value | Example | -|-------------|----------------------|--------------| +| Name | Value | Example | +|-------------|---------------------------------------------------------------------------------|--------------| | `starttime` | [PHP Date and Time Formats](https://www.php.net/manual/en/datetime.formats.php) | `yesterday` | | `endtime` | [PHP Date and Time Formats](https://www.php.net/manual/en/datetime.formats.php) | `2023-10-23` | diff --git a/compose.override.yaml b/compose.override.yaml new file mode 100644 index 0000000..e81a3bd --- /dev/null +++ b/compose.override.yaml @@ -0,0 +1,4 @@ +services: + phpfpm: + # OS2Forms is not yet ready for PHP 8.4 (!) + image: itkdev/php8.3-fpm:latest diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..bbec743 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,32 @@ +# itk-version: 3.2.4 + +services: + phpfpm: + image: itkdev/php8.4-fpm:latest + user: ${COMPOSE_USER:-deploy} + volumes: + - .:/app-os2forms_get_organized + working_dir: /app-os2forms_get_organized + environment: + # https://getcomposer.org/doc/03-cli.md#composer-no-security-blocking + # @see https://github.com/OS2Forms/os2forms/issues/245 + COMPOSER_NO_SECURITY_BLOCKING: 1 + + # Code checks tools + markdownlint: + image: itkdev/markdownlint + profiles: + - dev + volumes: + - ./:/md + + prettier: + # Prettier does not (yet, cf. + # https://github.com/prettier/prettier/issues/15206) have an official docker + # image. https://hub.docker.com/r/jauderho/prettier is good candidate (cf. + # https://hub.docker.com/search?q=prettier&sort=updated_at&order=desc) + image: jauderho/prettier + profiles: + - dev + volumes: + - ./:/work diff --git a/composer.json b/composer.json index fb925df..dfb0e55 100644 --- a/composer.json +++ b/composer.json @@ -1,22 +1,14 @@ { "name": "os2forms/os2forms_rest_api", "description": "OS2Forms REST API", - "type": "drupal-module", "license": "MIT", + "type": "drupal-module", "authors": [ { "name": "Mikkel Ricky", "email": "rimi@aarhus.dk" } ], - "minimum-stability": "dev", - "prefer-stable": true, - "repositories": [ - { - "type": "composer", - "url": "https://packages.drupal.org/8" - } - ], "require": { "cweagans/composer-patches": "^1.7", "drupal/key_auth": "^2.0", @@ -26,45 +18,61 @@ "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2", "drupal/coder": "^8.3", + "ergebnis/composer-normalize": "^2", "mglaman/drupal-check": "^1.4", "mglaman/phpstan-drupal": "~1.2.0" }, - "scripts": { - "code-analysis/drupal-check": [ - "vendor/bin/drupal-check --deprecations --analysis --exclude-dir=vendor *.* src" - ], - "code-analysis": [ - "@code-analysis/drupal-check" - ], - "coding-standards-check/phpcs": [ - "vendor/bin/phpcs --standard=phpcs.xml.dist" - ], - "coding-standards-check": [ - "@coding-standards-check/phpcs" - ], - "coding-standards-apply/phpcs": [ - "vendor/bin/phpcbf --standard=phpcs.xml.dist" - ], - "coding-standards-apply": [ - "@coding-standards-apply/phpcs" - ] - }, + "repositories": [ + { + "type": "composer", + "url": "https://packages.drupal.org/8" + } + ], + "minimum-stability": "dev", + "prefer-stable": true, "config": { - "sort-packages": true, "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true, "cweagans/composer-patches": true, - "zaporylie/composer-drupal-optimizations": true, + "dealerdirect/phpcodesniffer-composer-installer": true, + "ergebnis/composer-normalize": true, + "mglaman/composer-drupal-lenient": true, "simplesamlphp/composer-module-installer": true, - "mglaman/composer-drupal-lenient": true - } + "simplesamlphp/composer-xmlprovider-installer": true, + "zaporylie/composer-drupal-optimizations": true + }, + "sort-packages": true }, "extra": { + "drupal-lenient": { + "allowed-list": [ + "drupal/webform_node_element" + ] + }, "enable-patching": true, "patches": { "drupal/webform_rest": { "Added ability to modify response data sent from Webform Submission endpoint": "https://raw.githubusercontent.com/OS2Forms/os2forms_rest_api/feature/upgrade-webform-rest-version/patches/webform_rest_submission.patch" } } + }, + "scripts": { + "code-analysis": [ + "@code-analysis/drupal-check" + ], + "code-analysis/drupal-check": [ + "vendor/bin/drupal-check --deprecations --analysis --exclude-dir=vendor *.* src" + ], + "coding-standards-apply": [ + "@coding-standards-apply/phpcs" + ], + "coding-standards-apply/phpcs": [ + "vendor/bin/phpcbf --standard=phpcs.xml.dist" + ], + "coding-standards-check": [ + "@coding-standards-check/phpcs" + ], + "coding-standards-check/phpcs": [ + "vendor/bin/phpcs --standard=phpcs.xml.dist" + ] } } From 68994a702568c8939bd112d5ef6ce668793e697d Mon Sep 17 00:00:00 2001 From: jekuaitk Date: Thu, 24 Sep 2026 15:07:33 +0200 Subject: [PATCH 4/5] Updated referenence to patch --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index dfb0e55..7ebbe0e 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "enable-patching": true, "patches": { "drupal/webform_rest": { - "Added ability to modify response data sent from Webform Submission endpoint": "https://raw.githubusercontent.com/OS2Forms/os2forms_rest_api/feature/upgrade-webform-rest-version/patches/webform_rest_submission.patch" + "Added ability to modify response data sent from Webform Submission endpoint": "https://raw.githubusercontent.com/OS2Forms/os2forms_rest_api/2.4.0/patches/webform_rest_submission.patch" } } }, From 6eecb06f2d446d170011aabcbb1bb074de9efb8b Mon Sep 17 00:00:00 2001 From: jekuaitk Date: Thu, 24 Sep 2026 15:08:51 +0200 Subject: [PATCH 5/5] Release 2.4.0 --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d6d626..fa195c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ about writing changes to this log. ## [Unreleased] +## [2.4.0] + * Upgraded to `"drupal/webform_rest": "^4.2"` * Upgraded linked data patch accordingly. * Upgraded actions. @@ -61,7 +63,8 @@ about writing changes to this log. * Release 1.0.0 -[Unreleased]: https://github.com/OS2Forms/os2forms_rest_api/compare/2.3.0...HEAD +[Unreleased]: https://github.com/OS2Forms/os2forms_rest_api/compare/2.4.0...HEAD +[2.4.0]: https://github.com/OS2Forms/os2forms_rest_api/compare/2.3.0...2.4.0 [2.3.0]: https://github.com/OS2Forms/os2forms_rest_api/compare/2.2.1...2.3.0 [2.2.1]: https://github.com/OS2Forms/os2forms_rest_api/compare/2.2.0...2.2.1 [2.2.0]: https://github.com/OS2Forms/os2forms_rest_api/compare/2.1.0...2.2.0