diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index f563fbb..2ded5ab 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -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 @@ -55,7 +55,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 @@ -88,7 +88,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 @@ -113,18 +113,24 @@ jobs: 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:^9 --stability=dev 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 - composer --no-interaction --working-dir=drupal config --no-plugins allow-plugins.cweagans/composer-patches true - composer --no-interaction --working-dir=drupal config --no-plugins allow-plugins.zaporylie/composer-drupal-optimizations true - composer --no-interaction --working-dir=drupal config --no-plugins allow-plugins.simplesamlphp/composer-module-installer true + # 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 diff --git a/composer.json b/composer.json index c2b849d..57f7de9 100644 --- a/composer.json +++ b/composer.json @@ -54,7 +54,8 @@ "dealerdirect/phpcodesniffer-composer-installer": true, "cweagans/composer-patches": true, "zaporylie/composer-drupal-optimizations": true, - "simplesamlphp/composer-module-installer": true + "simplesamlphp/composer-module-installer": true, + "mglaman/composer-drupal-lenient": true } }, "extra": {