diff --git a/.docksal/commands/phpunit b/.docksal/commands/phpunit index a2e2e90f..2513a903 100644 --- a/.docksal/commands/phpunit +++ b/.docksal/commands/phpunit @@ -11,7 +11,6 @@ # $DOCROOT - name of the docroot folder # $DOCKER_RUNNING - (string) "true" or "false" -args="$@" path="/var/www" phpunit_xml_path="$PROJECT_ROOT/phpunit.xml" @@ -27,4 +26,21 @@ if [[ ! -f "$phpunit_path" ]]; then exit 1 fi -fin exec "php $path/${phpunit_path} -c $path ${args} $path/$DOCROOT/modules/custom" \ No newline at end of file + +COVERAGE=false +args="" +while [ "$1" != "" ]; do + case $1 in + --open-coverage ) COVERAGE=true + ;; + *) args="$args $1" + ;; + esac + shift +done + +fin exec "XDEBUG_MODE=coverage $path/${phpunit_path} -c $path ${args} $path/$DOCROOT/modules/custom --coverage-html $path/$DOCROOT/sites/simpletest/test-coverage" + +if $COVERAGE; then + fin utils/open-link "http://ghi-site.docksal.site/sites/simpletest/test-coverage/dashboard.html" +fi \ No newline at end of file diff --git a/.docksal/commands/post-deploy b/.docksal/commands/post-deploy index d7e0de7e..cbcb433f 100644 --- a/.docksal/commands/post-deploy +++ b/.docksal/commands/post-deploy @@ -65,6 +65,9 @@ if $IMPORT_BACKUP; then fi fi +# Make sure that the code base is up to date. +composer install + echo "Set maintenance mode to on" drush sset system.maintenance_mode 1 -y diff --git a/.docksal/docksal.yml b/.docksal/docksal.yml index 328ab3f1..dc94ed86 100644 --- a/.docksal/docksal.yml +++ b/.docksal/docksal.yml @@ -9,6 +9,8 @@ services: - HID_CLIENT_SECRET - GRAPHQL_KEY - COMPOSER_MEMORY_LIMIT=-1 + - XDEBUG_ENABLED=1 + - XDEBUG_MODE=off browser: hostname: browser diff --git a/.github/tests/docker-compose.yml b/.github/tests/docker-compose.yml index f5c47c75..0963c549 100644 --- a/.github/tests/docker-compose.yml +++ b/.github/tests/docker-compose.yml @@ -22,7 +22,7 @@ services: - default mysql: - image: public.ecr.aws/unocha/mysql:10.6 + image: public.ecr.aws/unocha/mysql:10.11 hostname: hpc-content-test-mysql container_name: hpc-content-test-mysql environment: @@ -92,4 +92,4 @@ services: ports: - "7900:7900" networks: - - default \ No newline at end of file + - default diff --git a/.github/workflows/composer-update.yml b/.github/workflows/composer-update.yml index c7e3d887..4ec19a55 100644 --- a/.github/workflows/composer-update.yml +++ b/.github/workflows/composer-update.yml @@ -13,9 +13,10 @@ jobs: id: update-action uses: UN-OCHA/actions/composer-update@main with: + aws_access_key_id: ${{ secrets.ECR_AWS_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.ECR_AWS_SECRET_ACCESS_KEY }} github_access_token: ${{ secrets.PAT }} - patch_branch: 'develop' - patch_packages: 'drupal/*' + patch_branch: ${{ github.head_ref || github.ref_name }} patch_maintainers: ${{ vars.DRUPAL_MAINTAINERS }} slack_bot_token: ${{ secrets.SLACK_BOT_TOKEN }} slack_channel_name: ${{ vars.SLACK_CHANNEL }} diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 98401076..e75dc0f0 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -5,11 +5,17 @@ on: [pull_request] jobs: tests: runs-on: ubuntu-latest + permissions: + contents: write + checks: write + pull-requests: write + actions: read + statuses: write steps: - name: Checkout Code id: checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Extract PHP Version id: php @@ -97,6 +103,7 @@ jobs: with: run: | docker-compose -f .github/tests/docker-compose.yml exec -w /srv/www -T drupal /usr/bin/composer run sub-theme + - name: PHPCS id: phpcs uses: cafuego/command-output@main @@ -157,18 +164,18 @@ jobs: docker-compose -f .github/tests/docker-compose.yml exec -T drupal drush watchdog:show - name: Find Comment - uses: peter-evans/find-comment@v2 + uses: peter-evans/find-comment@v3 id: fc with: - github-token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} issue-number: ${{ github.event.pull_request.number }} comment-author: 'github-actions[bot]' body-includes: Build output - name: Create or update comment - uses: peter-evans/create-or-update-comment@v2 + uses: peter-evans/create-or-update-comment@v4 with: - github-token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} comment-id: ${{ steps.fc.outputs.comment-id }} issue-number: ${{ github.event.pull_request.number }} body: | @@ -193,7 +200,7 @@ jobs: - name: Slack Success Notification id: slack_success if: success() - uses: slackapi/slack-github-action@v1.23.0 + uses: slackapi/slack-github-action@v1.25.0 with: channel-id: '${{ vars.SLACK_CHANNEL }}' payload: | @@ -220,7 +227,7 @@ jobs: - name: Slack Failure Notification id: slack_failure if: failure() - uses: slackapi/slack-github-action@v1.23.0 + uses: slackapi/slack-github-action@v1.25.0 with: channel-id: '${{ vars.SLACK_CHANNEL }}' payload: | diff --git a/composer.json b/composer.json index b5eccad8..a7ace90f 100644 --- a/composer.json +++ b/composer.json @@ -58,13 +58,14 @@ "drupal/core-recommended": "^10", "drupal/csp": "^1.16", "drupal/ctools": "^4.0", - "drupal/custom_field": "^2.0@RC", + "drupal/custom_field": "^3", "drupal/diff": "^1.1", "drupal/double_field": "^4.0", "drupal/editor_advanced_link": "^2.0", "drupal/entity_browser": "^2.9", "drupal/entity_browser_table": "^1.4", "drupal/entity_usage": "^2.0@beta", + "drupal/field_config_cardinality": "^3.0", "drupal/field_group": "^3.4", "drupal/gin": "^3.0@RC", "drupal/google_tag": "^1.4", diff --git a/composer.lock b/composer.lock index 69740629..04746783 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "12569a8c6834a7ab5add06011793900c", + "content-hash": "26e93d38d1c5ff6c15abae3101f2879d", "packages": [ { "name": "asm89/stack-cors", @@ -617,16 +617,16 @@ }, { "name": "composer/composer", - "version": "2.7.4", + "version": "2.7.6", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "a625e50598e12171d3f60b1149eb530690c43474" + "reference": "fabd995783b633829fd4280e272284b39b6ae702" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/a625e50598e12171d3f60b1149eb530690c43474", - "reference": "a625e50598e12171d3f60b1149eb530690c43474", + "url": "https://api.github.com/repos/composer/composer/zipball/fabd995783b633829fd4280e272284b39b6ae702", + "reference": "fabd995783b633829fd4280e272284b39b6ae702", "shasum": "" }, "require": { @@ -711,7 +711,7 @@ "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", "security": "https://github.com/composer/composer/security/policy", - "source": "https://github.com/composer/composer/tree/2.7.4" + "source": "https://github.com/composer/composer/tree/2.7.6" }, "funding": [ { @@ -727,7 +727,7 @@ "type": "tidelift" } ], - "time": "2024-04-22T19:17:03+00:00" + "time": "2024-05-04T21:03:15+00:00" }, { "name": "composer/installers", @@ -1183,16 +1183,16 @@ }, { "name": "composer/xdebug-handler", - "version": "3.0.4", + "version": "3.0.5", "source": { "type": "git", "url": "https://github.com/composer/xdebug-handler.git", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255" + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/4f988f8fdf580d53bdb2d1278fe93d1ed5462255", - "reference": "4f988f8fdf580d53bdb2d1278fe93d1ed5462255", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", "shasum": "" }, "require": { @@ -1229,7 +1229,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/xdebug-handler/issues", - "source": "https://github.com/composer/xdebug-handler/tree/3.0.4" + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" }, "funding": [ { @@ -1245,7 +1245,7 @@ "type": "tidelift" } ], - "time": "2024-03-26T18:29:49+00:00" + "time": "2024-05-06T16:37:16+00:00" }, { "name": "consolidation/annotated-command", @@ -2533,7 +2533,7 @@ "reference": "6ddc8cbd576206887b648d1195638effe990896a" }, "require": { - "drupal/core": "^8 || ^9 || ^10 || ^11" + "drupal/core": "^8 || ^9 || ^10" }, "type": "drupal-module", "extra": { @@ -3370,27 +3370,27 @@ }, { "name": "drupal/csp", - "version": "1.30.0", + "version": "1.31.0", "source": { "type": "git", "url": "https://git.drupalcode.org/project/csp.git", - "reference": "8.x-1.30" + "reference": "8.x-1.31" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/csp-8.x-1.30.zip", - "reference": "8.x-1.30", - "shasum": "50ff811459e9d93a1d605f96ada4082aa0dc637f" + "url": "https://ftp.drupal.org/files/projects/csp-8.x-1.31.zip", + "reference": "8.x-1.31", + "shasum": "f5279b78f2edac89d5cb2a731a246da9d429573a" }, "require": { - "drupal/core": "~10.0.0 || ^10.1.3", + "drupal/core": "~10.0.0 || ^10.1.3 || ^11", "ext-json": "*" }, "type": "drupal-module", "extra": { "drupal": { - "version": "8.x-1.30", - "datestamp": "1705655685", + "version": "8.x-1.31", + "datestamp": "1714819870", "security-coverage": { "status": "covered", "message": "Covered by Drupal's security advisory policy" @@ -3512,30 +3512,30 @@ }, { "name": "drupal/custom_field", - "version": "2.0.0-rc6", + "version": "3.0.0-rc2", "source": { "type": "git", "url": "https://git.drupalcode.org/project/custom_field.git", - "reference": "2.0.0-rc6" + "reference": "3.0.0-rc2" }, "dist": { "type": "zip", - "url": "https://ftp.drupal.org/files/projects/custom_field-2.0.0-rc6.zip", - "reference": "2.0.0-rc6", - "shasum": "53db8135daee8c9273006de3ca208ba9de4a74f0" + "url": "https://ftp.drupal.org/files/projects/custom_field-3.0.0-rc2.zip", + "reference": "3.0.0-rc2", + "shasum": "0a7e27a71a20a9483bb92845625f0827bce9f354" }, "require": { - "drupal/core": "^9.4 || ^10.1" + "drupal/core": "^10.2" }, "require-dev": { "drupal/feeds": "3.x-dev", - "drupal/linkit": "^6" + "drupal/linkit": "^6.1" }, "type": "drupal-module", "extra": { "drupal": { - "version": "2.0.0-rc6", - "datestamp": "1703275144", + "version": "3.0.0-rc2", + "datestamp": "1713762104", "security-coverage": { "status": "not-covered", "message": "RC releases are not covered by Drupal security advisories." @@ -4046,6 +4046,82 @@ "issues": "http://drupal.org/project/issues/entity_usage" } }, + { + "name": "drupal/field_config_cardinality", + "version": "3.0.1", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/field_config_cardinality.git", + "reference": "3.0.1" + }, + "dist": { + "type": "zip", + "url": "https://ftp.drupal.org/files/projects/field_config_cardinality-3.0.1.zip", + "reference": "3.0.1", + "shasum": "47a2d933514464bea620617eb2ec34988b60ce37" + }, + "require": { + "drupal/core": "^9 || ^10" + }, + "type": "drupal-module", + "extra": { + "drupal": { + "version": "3.0.1", + "datestamp": "1680866025", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "ayalon", + "homepage": "https://www.drupal.org/user/419226" + }, + { + "name": "brittany.huntzberry", + "homepage": "https://www.drupal.org/user/3552960" + }, + { + "name": "dealancer", + "homepage": "https://www.drupal.org/user/243418" + }, + { + "name": "devkinetic", + "homepage": "https://www.drupal.org/user/114708" + }, + { + "name": "e.bogatyrev", + "homepage": "https://www.drupal.org/user/2760527" + }, + { + "name": "eloivaque", + "homepage": "https://www.drupal.org/user/605038" + }, + { + "name": "Naveen Kumar Reddy", + "homepage": "https://www.drupal.org/user/3693535" + }, + { + "name": "Shruthi Shetty M", + "homepage": "https://www.drupal.org/user/3580970" + }, + { + "name": "stefan.korn", + "homepage": "https://www.drupal.org/user/1942204" + } + ], + "description": "Allow apply cardinality on Field Config (Cardinality Instance)", + "homepage": "https://www.drupal.org/project/field_config_cardinality", + "support": { + "source": "https://git.drupalcode.org/project/field_config_cardinality" + } + }, { "name": "drupal/field_group", "version": "3.4.0", @@ -4813,7 +4889,7 @@ "shasum": "b01ed2dd4371c9ff24dbbbe235bedfe44f0e008e" }, "require": { - "drupal/core": "^8 || ^9 || ^10 || ^11" + "drupal/core": "^8 || ^9 || ^10" }, "type": "drupal-module", "extra": { @@ -6290,16 +6366,16 @@ }, { "name": "drush/drush", - "version": "12.5.1", + "version": "12.5.2", "source": { "type": "git", "url": "https://github.com/drush-ops/drush.git", - "reference": "71fcea30a22e7336e17be18bb5945400b2c63fad" + "reference": "4aebed85dc818ff762f2e24a85b023d2a52050df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/drush-ops/drush/zipball/71fcea30a22e7336e17be18bb5945400b2c63fad", - "reference": "71fcea30a22e7336e17be18bb5945400b2c63fad", + "url": "https://api.github.com/repos/drush-ops/drush/zipball/4aebed85dc818ff762f2e24a85b023d2a52050df", + "reference": "4aebed85dc818ff762f2e24a85b023d2a52050df", "shasum": "" }, "require": { @@ -6422,7 +6498,7 @@ "issues": "https://github.com/drush-ops/drush/issues", "security": "https://github.com/drush-ops/drush/security/advisories", "slack": "https://drupal.slack.com/messages/C62H9CWQM", - "source": "https://github.com/drush-ops/drush/tree/12.5.1" + "source": "https://github.com/drush-ops/drush/tree/12.5.2" }, "funding": [ { @@ -6430,7 +6506,7 @@ "type": "github" } ], - "time": "2024-03-20T15:03:27+00:00" + "time": "2024-05-02T17:20:48+00:00" }, { "name": "egulias/email-validator", @@ -9939,16 +10015,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "1.28.0", + "version": "1.29.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb" + "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", - "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/536889f2b340489d328f5ffb7b02bb6b183ddedc", + "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc", "shasum": "" }, "require": { @@ -9980,9 +10056,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/1.28.0" + "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.0" }, - "time": "2024-04-03T18:51:33+00:00" + "time": "2024-05-06T12:04:23+00:00" }, { "name": "phpstan/phpstan", @@ -16147,30 +16223,31 @@ }, { "name": "webflo/drupal-finder", - "version": "1.2.2", + "version": "1.3.0", "source": { "type": "git", "url": "https://github.com/webflo/drupal-finder.git", - "reference": "c8e5dbe65caef285fec8057a4c718a0d4138d1ee" + "reference": "1fa65484857c7a2e4dcf0d9e0b47198fe0681b8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webflo/drupal-finder/zipball/c8e5dbe65caef285fec8057a4c718a0d4138d1ee", - "reference": "c8e5dbe65caef285fec8057a4c718a0d4138d1ee", + "url": "https://api.github.com/repos/webflo/drupal-finder/zipball/1fa65484857c7a2e4dcf0d9e0b47198fe0681b8a", + "reference": "1fa65484857c7a2e4dcf0d9e0b47198fe0681b8a", "shasum": "" }, "require": { - "ext-json": "*" + "composer-runtime-api": "^2.2", + "php": ">=8.1" }, "require-dev": { "mikey179/vfsstream": "^1.6", - "phpunit/phpunit": "^4.8" + "phpunit/phpunit": "^10.4" }, "type": "library", "autoload": { - "classmap": [ - "src/DrupalFinder.php" - ] + "psr-4": { + "DrupalFinder\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -16182,12 +16259,12 @@ "email": "florian@webflo.org" } ], - "description": "Helper class to locate a Drupal installation from a given path.", + "description": "Helper class to locate a Drupal installation.", "support": { "issues": "https://github.com/webflo/drupal-finder/issues", - "source": "https://github.com/webflo/drupal-finder/tree/1.2.2" + "source": "https://github.com/webflo/drupal-finder/tree/1.3.0" }, - "time": "2020-10-27T09:42:17+00:00" + "time": "2024-05-08T21:22:39+00:00" }, { "name": "webmozart/assert", @@ -16650,7 +16727,6 @@ "stability-flags": { "drupal/bigint": 20, "drupal/bulk_update_fields": 15, - "drupal/custom_field": 5, "drupal/entity_usage": 10, "drupal/gin": 5, "drupal/imageapi_optimize_binaries": 15, diff --git a/composer.patches.json b/composer.patches.json index 2f132011..a10f7440 100644 --- a/composer.patches.json +++ b/composer.patches.json @@ -1,7 +1,8 @@ { "patches": { "drupal/core": { - "https://www.drupal.org/project/drupal/issues/2544110": "./patches/2544110-2024-02-15.patch", + "Issue #2544110: XSS attribute filtering is inconsistent and strips valid attributes": "./patches/2544110-2024-02-15.patch", + "Issue #2329253: Allow the ChangedItem to skip updating the entity's changed timestamp when synchronizing (f.e. when migrating)": "https://www.drupal.org/files/issues/2024-04-18/2329253-127-10.2.5.patch", "Issue #3392572: strnatcasecmp(): Passing null to parameter #2 in LayoutPluginManager": "https://www.drupal.org/files/issues/2023-10-25/drupal-strnatcasecmp_string_only-3392572-10.patch", "Issue #3413079: Cannot read properties of null (reading 'nodeType') on node.page.body": "https://www.drupal.org/files/issues/2024-01-08/3413079-9.patch", "Issue #3274635: [upstream] Use CKEditor 5's native
    and