Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Added support for os2web_key #101

Open
wants to merge 49 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
92c0ec4
Moved digital post settings into config. Added support for os2web_key…
rimi-itk May 7, 2024
b07e536
Cleaned up Markdown
rimi-itk May 7, 2024
0f6900d
Cleaned up
rimi-itk May 7, 2024
ae2c683
Required os2web_key 1.0
rimi-itk May 13, 2024
801cae9
Updated os2web_datalookup
rimi-itk May 13, 2024
b5fba51
Cleaned up composer.json
rimi-itk Dec 17, 2024
a8dc3c8
Cleaned up
rimi-itk Dec 17, 2024
fea276d
Updated
rimi-itk Dec 20, 2024
d0cff5e
ITKDEV: Updated fbs handler to use latest endpoints and operations
jekuaitk Jan 2, 2025
1f3a49e
ITKDEV: Adjust indention
jekuaitk Jan 2, 2025
2447c98
ITKDEV: Used configured format in maestro notification
jekuaitk Jan 3, 2025
2308816
Release 3.21.1
jekuaitk Jan 6, 2025
1ff2132
Support for os2web_key in DigitalPost and Fasit
jekuaitk Jan 17, 2025
d566ee0
Service update
jekuaitk Jan 17, 2025
8d831d3
Coding standards
jekuaitk Jan 20, 2025
1820f12
Coding standards
jekuaitk Jan 20, 2025
34ec714
All methods for configuring certificate in fasit module works
jekuaitk Jan 21, 2025
33d0c3b
Applied coding standards
jekuaitk Jan 21, 2025
d5d476b
Updated fasit test command
jekuaitk Jan 21, 2025
8189cdf
Updated Fasit ping command
jekuaitk Jan 22, 2025
fa892f9
Fasit module, cleaned up services
jekuaitk Jan 22, 2025
6f0d1c2
Moved digital post settings into config. Added support for os2web_key…
rimi-itk May 7, 2024
984bb8e
Cleaned up Markdown
rimi-itk May 7, 2024
75d8ad2
Cleaned up
rimi-itk May 7, 2024
d315e88
Required os2web_key 1.0
rimi-itk May 13, 2024
1b0c85d
Updated os2web_datalookup
rimi-itk May 13, 2024
ba5dd00
Cleaned up composer.json
rimi-itk Dec 17, 2024
a32eaae
Cleaned up
rimi-itk Dec 17, 2024
cd3e855
Updated
rimi-itk Dec 20, 2024
7749375
Rebase
jekuaitk Jan 22, 2025
8b3e642
Merge branch 'feature/os2web_key' into feature/os2web_key-hashi-corp-…
jekuaitk Jan 22, 2025
4c60162
Applied coding standards
jekuaitk Jan 22, 2025
1e60744
Merge pull request #2 from itk-dev/feature/os2web_key-hashi-corp-vault
jekuaitk Jan 22, 2025
1964c27
Updated Digital post command
jekuaitk Jan 22, 2025
c58ec55
Coding standards
jekuaitk Jan 22, 2025
0404c5c
Used Autowire trait
jekuaitk Jan 22, 2025
d8c7c2e
Updated digital post module to allow key and old configuration methods
jekuaitk Jan 23, 2025
b0b898d
Service cleanup using autowire
jekuaitk Jan 23, 2025
25f35ce
Updates settings forms
jekuaitk Jan 24, 2025
3bde9cc
Updates settings forms
jekuaitk Jan 24, 2025
e1e38ab
Updates settings forms
jekuaitk Jan 24, 2025
8539452
Update versions requiment
jekuaitk Jan 24, 2025
c6e6cb1
clean up
jekuaitk Jan 24, 2025
d8424d0
Update modules/os2forms_digital_post/src/Helper/CertificateLocatorHel…
jekuaitk Jan 27, 2025
243e1e8
Autowired services
jekuaitk Jan 27, 2025
5e19aa5
Ignored possible UselessOverridingMethod
jekuaitk Jan 27, 2025
c0c053e
Moved autowire to abstract class
jekuaitk Jan 27, 2025
3ffd55b
Merge pull request #3 from itk-dev/feature/os2web_key_digital_post
jekuaitk Jan 28, 2025
44d0d3a
Specified webform.token_manager service
jekuaitk Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 13 additions & 24 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '8.1' ]
php-versions: [ '8.3' ]
dependency-version: [ prefer-lowest, prefer-stable ]
steps:
- uses: actions/checkout@master
Expand All @@ -50,13 +50,16 @@ jobs:
composer validate --strict composer.json
# Check that dependencies resolve.
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Check that composer file is normalized
run: |
composer normalize --dry-run

php-coding-standards:
name: PHP coding standards
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '8.1' ]
php-versions: [ '8.3' ]
steps:
- uses: actions/checkout@master
- name: Setup PHP, with composer and extensions
Expand Down Expand Up @@ -89,7 +92,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: [ '8.1' ]
php-versions: [ '8.3' ]
steps:
- uses: actions/checkout@master
- name: Setup PHP, with composer and extensions
Expand All @@ -113,27 +116,13 @@ jobs:
run: |
./scripts/code-analysis

markdownlint:
coding-standards-markdown:
name: Markdown coding standards
runs-on: ubuntu-latest
name: markdownlint
steps:
- name: Checkout
uses: actions/checkout@v2
- 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
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Yarn install
uses: actions/setup-node@v2
with:
node-version: '20'
- run: yarn install
- name: markdownlint
run: yarn coding-standards-check/markdownlint
uses: actions/checkout@master

- name: Coding standards
run: |
docker run --rm --volume $PWD:/md peterdavehello/markdownlint markdownlint --ignore vendor --ignore LICENSE.md '**/*.md'
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@
composer.lock
vendor

node_modules/
yarn.lock
13 changes: 13 additions & 0 deletions .markdownlint.jsonc
Original file line number Diff line number Diff line change
@@ -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
}
}
18 changes: 0 additions & 18 deletions .markdownlintrc

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ before starting to add changes. Use example [placed in the end of the page](#exa

## [Unreleased]

- [#101](https://github.com/OS2Forms/os2forms/pull/101)
- Added support for `os2web_key` in Digital post
- Switched from saving settings in key value store to config, i.e
the module needs to be reconfigured.
- Added support for `os2web_key` in Fasit handler.
- Switched from saving settings in key value store to config, i.e
the module needs to be reconfigured.
- Removed modules ldap_auth, logging_alerts, maillog

## [3.21.2] 2025-01-07
Expand Down
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,29 +122,28 @@ run the checks locally.

```sh
docker run --rm --volume ${PWD}:/app --workdir /app itkdev/php8.1-fpm composer install
docker run --rm --volume ${PWD}:/app --workdir /app itkdev/php8.1-fpm composer coding-standards-check

# Fix (some) coding standards issues.
docker run --rm --volume ${PWD}:/app --workdir /app itkdev/php8.1-fpm composer coding-standards-apply
docker run --rm --volume ${PWD}:/app --workdir /app itkdev/php8.1-fpm composer coding-standards-check
```

### Markdown

```sh
docker run --rm --volume ${PWD}:/app --workdir /app node:20 yarn install
docker run --rm --volume ${PWD}:/app --workdir /app node:20 yarn coding-standards-check/markdownlint

# Fix (some) coding standards issues.
docker run --rm --volume ${PWD}:/app --workdir /app node:20 yarn coding-standards-apply/markdownlint
docker pull peterdavehello/markdownlint
docker run --rm --volume $PWD:/md peterdavehello/markdownlint markdownlint --ignore vendor --ignore LICENSE.md '**/*.md' --fix
docker run --rm --volume $PWD:/md peterdavehello/markdownlint markdownlint --ignore vendor --ignore LICENSE.md '**/*.md'
```

## Code analysis

We use [PHPStan](https://phpstan.org/) for static code analysis.

Running statis code analysis on a standalone Drupal module is a bit tricky, so
we use a helper script to run the analysis:
Running statis code analysis on a standalone Drupal module is a bit tricky, so we use a helper script to run the
analysis:

```sh
./scripts/code-analysis
```shell
docker run --rm --volume ${PWD}:/app --workdir /app itkdev/php8.1-fpm ./scripts/code-analysis
```

**Note**: Currently the code analysis is only run on the `os2forms_digital_post` sub-module (cf. [`phpstan.neon`](./phpstan.neon)).
112 changes: 57 additions & 55 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
{
"name": "os2forms/os2forms",
"type": "drupal-module",
"description": "Drupal 8 OS2Form module provides advanced webform functionality for Danish Municipalities",
"minimum-stability": "dev",
"prefer-stable": true,
"license": "EUPL-1.2",
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"assets": {
"type": "composer",
"url": "https://asset-packagist.org"
}
},
"type": "drupal-module",
"require": {
"php": "^8.1",
"ext-dom": "*",
Expand All @@ -23,7 +11,7 @@
"dompdf/dompdf": "^2.0",
"drupal/admin_toolbar": "^3.0",
"drupal/advancedqueue": "^1.0",
"drupal/cache_control_override": "^1.1|^2.0",
"drupal/cache_control_override": "^1.1 || ^2.0",
"drupal/clientside_validation": "^4.0",
"drupal/coc_forms_auto_export": "^2.0@alpha",
"drupal/config_entity_revisions": "dev-2.0.x",
Expand All @@ -43,7 +31,7 @@
"drupal/mailsystem": "^4.1",
"drupal/masquerade": "^2.0@RC",
"drupal/pathauto": "^1.5",
"drupal/permissions_by_term": "^3.1 || ^2.25",
"drupal/permissions_by_term": "^2.25 || ^3.1",
"drupal/queue_mail": "^1.4",
"drupal/r4032login": "^2.1",
"drupal/redirect": "^1.4",
Expand All @@ -69,90 +57,104 @@
"http-interop/http-factory-guzzle": "^1.0.0",
"itk-dev/beskedfordeler-drupal": "^1.0",
"itk-dev/serviceplatformen": "^1.5",
"mglaman/composer-drupal-lenient": "^1.0",
"os2web/os2web_audit": "^0.1.6",
"os2web/os2web_datalookup": "^2.0",
"os2web/os2web_key": "^1.0",
"os2web/os2web_nemlogin": "^1.0",
"os2web/os2web_simplesaml": "dev-master",
"php-http/guzzle7-adapter": "^1.0",
"phpoffice/phpword": "^0.18.2",
"symfony/options-resolver": "^5.4 || ^6.0",
"webmozart/path-util": "^2.3",
"wsdltophp/packagebase": "^5.0",
"zaporylie/composer-drupal-optimizations": "^1.2",
"mglaman/composer-drupal-lenient": "^1.0"
"zaporylie/composer-drupal-optimizations": "^1.2"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
"drupal/coder": "^8.3",
"ergebnis/composer-normalize": "^2.42",
"mglaman/phpstan-drupal": "^1.1",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpunit/phpunit": "^9.5",
"wsdltophp/packagegenerator": "^4.0"
},
"extra" : {
"repositories": {
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"assets": {
"type": "composer",
"url": "https://asset-packagist.org"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"cweagans/composer-patches": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"ergebnis/composer-normalize": true,
"mglaman/composer-drupal-lenient": true,
"phpstan/extension-installer": true,
"simplesamlphp/composer-module-installer": true,
"vaimo/composer-patches": true,
"zaporylie/composer-drupal-optimizations": true
},
"sort-packages": true
},
"extra": {
"composer-exit-on-patch-failure": false,
"enable-patching" : true,
"drupal-lenient": {
"allowed-list": [
"drupal/coc_forms_auto_export",
"drupal/webform_node_element"
]
},
"enable-patching": true,
"patches": {
"drupal/coc_forms_auto_export": {
"3240592 - Problem with phpseclib requirement in 2.x (https://www.drupal.org/project/coc_forms_auto_export/issues/3240592)": "https://www.drupal.org/files/issues/2021-10-04/requirement-namespace-3240592-1.patch",
"3286562 - Automated Drupal 10 compatibility fixes": "https://www.drupal.org/files/issues/2022-06-15/coc_forms_auto_export.2.0.x-dev.rector.patch",
"3259009 - PHP Warnings/Notices on Download Page": "https://git.drupalcode.org/project/coc_forms_auto_export/-/merge_requests/1.diff"
},
"drupal/entity_print": {
"2733781 - Add Export to Word Support": "https://www.drupal.org/files/issues/2019-11-22/2733781-47.patch"
},
"drupal/webform": {
"Unlock possibility of using Entity print module export to Word": "https://www.drupal.org/files/issues/2020-02-29/3096552-6.patch",
"Webform computed element post save alter": "https://www.drupal.org/files/issues/2024-06-25/webform_computed_post_save_field_alter.patch",
"Add custom hook (hook_webform_post_load_data) for audit logging": "https://gist.githubusercontent.com/cableman/d26898fc8f65ee0a31001bf391583b59/raw/6189dc4c2ceaabb19d25cc4b98b0b3028a6b0e1e/gistfile1.txt"

},
"drupal/coc_forms_auto_export": {
"3240592 - Problem with phpseclib requirement in 2.x (https://www.drupal.org/project/coc_forms_auto_export/issues/3240592)": "https://www.drupal.org/files/issues/2021-10-04/requirement-namespace-3240592-1.patch",
"3286562 - Automated Drupal 10 compatibility fixes" : "https://www.drupal.org/files/issues/2022-06-15/coc_forms_auto_export.2.0.x-dev.rector.patch",
"3259009 - PHP Warnings/Notices on Download Page" : "https://git.drupalcode.org/project/coc_forms_auto_export/-/merge_requests/1.diff"
},
"drupal/webform_node_element": {
"3290637 - Automated Drupal 10 compatibility fixes": "https://www.drupal.org/files/issues/2023-05-12/webform_node_element_d10-3290637-11.patch"
},
"drupal/webform_encrypt": {
"Ensure data is base64 encoded (https://www.drupal.org/project/webform_encrypt/issues/3399414)": "https://git.drupalcode.org/project/webform_encrypt/-/merge_requests/4.patch",
"PHP Warning if unserialize fails (https://www.drupal.org/project/webform_encrypt/issues/3292305)": "https://www.drupal.org/files/issues/2022-06-23/unserialize-php-notice.patch"
},
"drupal/webform_node_element": {
"3290637 - Automated Drupal 10 compatibility fixes": "https://www.drupal.org/files/issues/2023-05-12/webform_node_element_d10-3290637-11.patch"
}
},
"drupal-lenient": {
"allowed-list": [
"drupal/coc_forms_auto_export",
"drupal/webform_node_element"
]
}
},
"scripts": {
"code-analysis/phpstan": [
"phpstan analyse"
],
"code-analysis": [
"@code-analysis/phpstan"
],
"coding-standards-check/phpcs": [
"phpcs --standard=phpcs.xml.dist"
"code-analysis/phpstan": [
"phpstan analyse"
],
"coding-standards-check": [
"@coding-standards-check/phpcs"
"coding-standards-apply": [
"@coding-standards-apply/phpcs"
],
"coding-standards-apply/phpcs": [
"phpcbf --standard=phpcs.xml.dist"
],
"coding-standards-apply": [
"@coding-standards-apply/phpcs"
"coding-standards-check": [
"@coding-standards-check/phpcs"
],
"coding-standards-check/phpcs": [
"phpcs --standard=phpcs.xml.dist"
]
},
"config": {
"sort-packages": true,
"allow-plugins": {
"cweagans/composer-patches": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpstan/extension-installer": true,
"simplesamlphp/composer-module-installer": true,
"vaimo/composer-patches": true,
"zaporylie/composer-drupal-optimizations": true,
"mglaman/composer-drupal-lenient": true
}
}
}
14 changes: 8 additions & 6 deletions modules/os2forms_attachment/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
# OS2Forms Attachment Drupal module

# Module purpose
## Module purpose

The aim of this module is to provide an OS2forms attachment element for adding PDF/HTML attachment.

It also supports creation of reusable headers/footers components which are used when rendering the attachments.

# How does it work
## How does it work

To add custom headers/footer ```admin/structure/webform/config/os2forms_attachment_component```
To add custom headers/footer `admin/structure/webform/config/os2forms_attachment_component`

To specify headers/footers that will override the default ones on a global level (**Third party settings** -> **Entity print** section): ```admin/structure/webform/config```
To specify headers/footers that will override the default ones on a global level (**Third party settings** -> **Entity
print** section): `admin/structure/webform/config`

To specify headers/footers that will override the default ones on a form level (**Third party settings** -> **Entity print** section): ```/admin/structure/webform/manage/[webform]/settings```
To specify headers/footers that will override the default ones on a form level (**Third party settings** -> **Entity
print** section): ```/admin/structure/webform/manage/[webform]/settings```

# Overwriting templates
## Overwriting templates

With some setups it might be necessary to overwrite templates
in order to access stylesheets or images.
Expand Down
9 changes: 5 additions & 4 deletions modules/os2forms_autocomplete/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# OS2Forms Autocomplete Drupal module

# Module purpose
## Module purpose

The aim of this module is to provide a genetic OS2Forms Autocomplete element which can return options from an external webservice.
The aim of this module is to provide a genetic OS2Forms Autocomplete element which can return options from an external
webservice.

# How does it work
## How does it work

Module exposes OS2Forms Autocomplete component that are available in the webform build process.

Build page:

```
```url
admin/structure/webform/manage/[webform]
```
Loading