Skip to content

Commit

Permalink
Merge branch '7.4.x' into merge-updates-3
Browse files Browse the repository at this point in the history
* 7.4.x: (29 commits)
  Thunder 7.4 release
  Cast to string in strip_tags
  Load entity types and add cache tags and contexts in search api producer
  Drupal 10.4
  Release 7.3.9
  Remove committed core patch #3487031
  Issue #3488601: Release Thunder 7.3.8
  Add patch from issue #3487031
  Make private methods in SearchApiResponse protected.
  Add node query to GraphQl schema
  Disable redis extension
  Release Thunder 7.3.7
  Re-add list tags to graphql queries
  Issue #3478701: Release Thunder 7.3.6
  Update diff module (#846)
  Fix notices in graphql requests
  Issue #3476367: Release Thunder 7.3.5
  Issue #3474835 by anacolautti: Scheduling a published content with content moderation unexpectedly unpublishes the content
  Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows (#841)
  Bump vite and vuepress (#842)
  ...
  • Loading branch information
Christian Fritsch committed Jan 8, 2025
2 parents b48493c + dcd69d7 commit e81d93f
Show file tree
Hide file tree
Showing 36 changed files with 4,534 additions and 4,129 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
env:
DRUPAL_TESTING_COMPOSER_PROJECT: thunder/thunder-project
DRUPAL_TESTING_COMPOSER_PROJECT_VERSION: "^4.0@stable"
DRUPAL_TESTING_CLEANUP: false
DRUPAL_TESTING_DATABASE_USER: root
DRUPAL_TESTING_DATABASE_PASSWORD: root
DRUPAL_TESTING_TEST_DUMP_FILE: site-dump.tar.gz
Expand All @@ -28,6 +29,7 @@ env:
DRUPAL_TESTING_PARALLEL_TESTING: false
MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","chromeOptions":{"args":["--disable-gpu","--headless", "--no-sandbox", "--disable-dev-shm-usage"]}}, "http://127.0.0.1:9515"]'
SIMPLETEST_BASE_URL: http://thunder-testing:8888
BROWSERTEST_OUTPUT_DIRECTORY: /tmp
SKIP_TEST_CLEANUP: true
# The following variable set the version that the upgrade test starts with.
DRUPAL_TESTING_UPGRADE_COMPOSER_PROJECT_VERSION: 4.1.0
Expand Down Expand Up @@ -62,7 +64,7 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.PHP_VERSION }}
extensions: Imagick
extensions: :redis, Imagick

- name: Cache composer dependencies
uses: actions/cache@v3
Expand Down Expand Up @@ -98,7 +100,7 @@ jobs:
run: cd /tmp/test; tar cfz build-${{ matrix.PHP_VERSION }}.tgz thunder; mv build-${{ matrix.PHP_VERSION }}.tgz ${GITHUB_WORKSPACE}

- name: Upload build
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.PHP_VERSION }}
path: build-${{ matrix.PHP_VERSION }}.tgz
Expand Down Expand Up @@ -134,7 +136,7 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.PHP_VERSION }}
extensions: :sodium, Imagick, gd, PDO, mysql, pdo_mysql, mbstring, xmlwriter, pdo, date, dom, filter, hash, json, pcre, session, SimpleXML, SPL, tokenizer, xml, curl
extensions: :redis, :sodium, Imagick, gd, PDO, mysql, pdo_mysql, mbstring, xmlwriter, pdo, date, dom, filter, hash, json, pcre, session, SimpleXML, SPL, tokenizer, xml, curl

- name: Add host
run: echo "127.0.0.1 thunder-testing" | sudo tee -a /etc/hosts
Expand All @@ -148,12 +150,12 @@ jobs:
composer global require thunder/drupal-testing:${DRUPAL_TESTING_VERSION}
- name: Download build
uses: actions/download-artifact@v1
uses: actions/download-artifact@v4
with:
name: build-${{ matrix.PHP_VERSION }}

- name: Unzip build artifact
run: mkdir -p /tmp/test; tar xCfz /tmp/test build-${{ matrix.PHP_VERSION }}/build-${{ matrix.PHP_VERSION }}.tgz thunder; rm -rf build-${{ matrix.PHP_VERSION }}
run: mkdir -p /tmp/test; tar xCfz /tmp/test build-${{ matrix.PHP_VERSION }}.tgz thunder; rm -rf build-${{ matrix.PHP_VERSION }}

- name: Setup Apache
uses: thunder/apache-shiva-php-action@v1
Expand All @@ -168,6 +170,13 @@ jobs:
THUNDER_TEST_CHUNK: ${{ matrix.CHUNK }}
DRUPAL_TESTING_TEST_PATH: /tmp/test/thunder/install/docroot/profiles/contrib/thunder/tests/src/TestSuites/ThunderTestSuite.php

- name: Upload test output
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: text-max-output-${{ matrix.CHUNK }}-${{ matrix.PHP_VERSION }}
path: /tmp/test/thunder/install/docroot/sites/simpletest/browser_output/

test-upgrade:

runs-on: ubuntu-24.04
Expand Down Expand Up @@ -202,7 +211,7 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.PHP_VERSION }}
extensions: Imagick, gd, pdo_mysql
extensions: :redis, Imagick, gd, pdo_mysql

- name: Cache composer dependencies
uses: actions/cache@v3
Expand Down Expand Up @@ -310,7 +319,7 @@ jobs:
with:
coverage: none
php-version: ${{ matrix.PHP_VERSION }}
extensions: Imagick, gd, pdo_mysql
extensions: :redis, Imagick, gd, pdo_mysql

- name: Cache composer dependencies
uses: actions/cache@v3
Expand All @@ -335,7 +344,7 @@ jobs:

- name: Install suggested dependencies
run: |
composer require "league/container:^4.2" "drupal/core-dev:^10.3" --no-update --no-progress --working-dir=/tmp/test/thunder/install
composer require "league/container:^4.2" "drupal/core-dev:^10.4" --no-update --no-progress --working-dir=/tmp/test/thunder/install
composer config allow-plugins.php-http/discovery true --no-plugins --working-dir=/tmp/test/thunder/install
- name: Build the docroot
Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
# Changelog

## [7.4.0](https://github.com/thunder/thunder-distribution/tree/7.4.0) 2024-12-18

[Full Changelog](https://github.com/thunder/thunder-distribution/compare/7.3.9...7.4.0)

* Drupal 10.4 compatibility.
* Updated Gin theme.
* Load entity types and add cache tags and contexts in search api producer.

## [7.3.9](https://github.com/thunder/thunder-distribution/tree/7.3.9) 2024-11-25

[Full Changelog](https://github.com/thunder/thunder-distribution/compare/7.3.8...7.3.9)

* Remove Drupal core patch [#3487031](https://www.drupal.org/i/3487031), because it was merged upstream.

## [7.3.8](https://github.com/thunder/thunder-distribution/tree/7.3.8) 2024-11-20

[Full Changelog](https://github.com/thunder/thunder-distribution/compare/7.3.7...7.3.8)

* Pin autosave_form to 1.7 and apply patch from issue [#3487459](https://www.drupal.org/i/3487459)
* Add a node Graphql query to fetch a single node by its UUID
* Make private methods in SearchApiResponse protected.
* Add Drupal core patch from issue [#3487031](https://www.drupal.org/i/3487031) because of a performance regression.

## [7.3.7](https://github.com/thunder/thunder-distribution/tree/7.3.7) 2024-10-14

[Full Changelog](https://github.com/thunder/thunder-distribution/compare/7.3.6...7.3.7)

Re-add list tags to graphql queries

## [7.3.6](https://github.com/thunder/thunder-distribution/tree/7.3.6) 2024-10-04

[Full Changelog](https://github.com/thunder/thunder-distribution/compare/7.3.5...7.3.6)

Update diff module to 1.8

## [7.3.5](https://github.com/thunder/thunder-distribution/tree/7.3.5) 2024-09-24

[Full Changelog](https://github.com/thunder/thunder-distribution/compare/7.3.3...7.3.5)

Allow scheduler version ^3.0 in composer.json

## [7.3.3](https://github.com/thunder/thunder-distribution/tree/7.3.3) 2024-08-22

[Full Changelog](https://github.com/thunder/thunder-distribution/compare/7.3.2...7.3.3)
Expand Down
22 changes: 11 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
"drupal/diff": {
"Back button for comparison page": "https://www.drupal.org/files/issues/back_button_for-2853193-4.patch"
},
"drupal/focal_point": {
"Issue #3462165: Preview results in Error: Call to a member function getDefinitions() on null": "https://www.drupal.org/files/issues/2024-07-18/Preview-results-in-Error-3462165.patch"
"drupal/autosave_form": {
"Issue #3487459: Deprecation error on user edit form": "https://git.drupalcode.org/project/autosave_form/-/merge_requests/19.diff"
},
"drupal/gin": {
"Issue #3455558: There is no visible change to a toggle when pressed (but it does trigger conditional fields, value is saved, etc)": "https://www.drupal.org/files/issues/2024-08-06/3455558-Refactor-toggle-styles-mr438.patch"
"drupal/field_group": {
"Drupal 10.4 RC1 error with field_ui.js": "https://git.drupalcode.org/project/field_group/-/merge_requests/88.diff"
}
}
},
Expand All @@ -55,22 +55,22 @@
"drupal/access_unpublished": "^1.5",
"drupal/admin_toolbar": "^3.4",
"drupal/autofill": "^1.1",
"drupal/autosave_form": "^1.6",
"drupal/autosave_form": "1.7",
"drupal/checklistapi": "^2.1.3",
"drupal/core-recommended": "~10.3.0@stable",
"drupal/core-recommended": "~10.4.0@stable",
"drupal/config_selector": "^2.1",
"drupal/config_update": "^1.7 || ^2.0",
"drupal/content_lock": "^3.0.0-alpha2",
"drupal/crop": "^2.2",
"drupal/diff": "1.7",
"drupal/diff": "1.8",
"drupal/dropzonejs": "^2.8",
"drupal/empty_fields": "^1.0-alpha1",
"drupal/entity_reference_actions": "^1.1.1",
"drupal/entity_reference_revisions": "^1.3",
"drupal/field_group": "^3.4",
"drupal/focal_point": "^2.1.1",
"drupal/field_group": "3.6",
"drupal/focal_point": "^2.1.2",
"drupal/facets": "^2.0.7",
"drupal/gin": "3.0-rc11",
"drupal/gin": "3.0-rc15",
"drupal/gin_toolbar": "^1.0-rc6",
"drupal/graphql": "^4.7",
"drupal/inline_entity_form": "^3.0.0@rc",
Expand All @@ -94,7 +94,7 @@
"drupal/responsive_preview": "^2.1",
"drupal/redirect": "^1.7",
"drupal/scheduler": "^2.0.2",
"drupal/scheduler_content_moderation_integration": "^2.0",
"drupal/scheduler_content_moderation_integration": "^2.0||^3.0",
"drupal/schema_metatag": "^2.5",
"drupal/select2": "^1.7",
"drupal/search_api_mark_outdated": "^1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function getDescription(): TranslatableMarkup {
/**
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state, NodeInterface $node = NULL): array {
public function buildForm(array $form, FormStateInterface $form_state, ?NodeInterface $node = NULL): array {
$this->revision = $node;
return parent::buildForm($form, $form_state);
}
Expand Down
4 changes: 2 additions & 2 deletions modules/thunder_article/src/Twig/FilterExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function getName(): string {
*/
public static function plainText($value): string {
$element = self::render($value);
$element = strip_tags($element);
$element = strip_tags((string) $element);
return html_entity_decode($element, ENT_QUOTES);
}

Expand All @@ -59,7 +59,7 @@ public static function plainText($value): string {
*/
public static function basicFormat($value): string {
$element = self::render($value);
return strip_tags($element, '<a><em><strong><b><i>');
return strip_tags((string) $element, '<a><em><strong><b><i>');
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ extend type Query {
channel(uuid: String!): Channel
user(uuid: String!): User
page(path: String!): Page
node(uuid: String!): Page
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ protected function buildBaseQuery(

$query->range($offset, $limit);
$cacheContext->addCacheableDependency($searchIndex);
foreach ($searchIndex->getDatasources() as $datasource) {
$storage = $this->entityTypeManager->getStorage($datasource->getEntityTypeId());
$entityType = $storage->getEntityType();

$cacheContext->addCacheTags($entityType->getListCacheTags());
$cacheContext->addCacheContexts($entityType->getListCacheContexts());
}

return $query;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ protected function resolveFields(): void {
$this->fromRoute($this->builder->fromArgument('path'))
);

$this->resolvePageInterfaceQueryFields('node', 'node');

// Teaser.
$this->addSimpleCallbackFields('Teaser', ['image', 'text']);

Expand Down
51 changes: 51 additions & 0 deletions modules/thunder_gqls/tests/examples/node.query.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
query ($uuid: String!) {
node(uuid: $uuid) {
uuid
url
name
entity
language
entityLinks {
canonical
}
... on Article {
published
author {
uuid
name
mail
entity
language
}
channel {
uuid
published
name
url
parent {
name
id
url
}
}
tags {
uuid
name
url
}
seoTitle
content {
__typename
}
teaser {
text
image {
uuid
derivative(style: "medium") {
width
}
}
}
}
}
}
69 changes: 69 additions & 0 deletions modules/thunder_gqls/tests/examples/node.response.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"data": {
"node": {
"uuid": "36b2e2b2-3df0-43eb-a282-d792b0999c07",
"url": "/come-drupalcon-new-orleans",
"name": "Come to DrupalCon New Orleans",
"entity": "node",
"language": "en",
"entityLinks": {
"canonical": "/come-drupalcon-new-orleans"
},
"published": true,
"author": {
"uuid": "be8e7a25-8a41-4bda-a854-b4b9bb1b0a02",
"name": "test-seo",
"mail": null,
"entity": "user",
"language": "en"
},
"channel": {
"uuid": "0bb70443-8172-4d8e-9335-2876bc32e356",
"published": true,
"name": "Events",
"url": "/events",
"parent": null
},
"tags": [
{
"uuid": "35bdba6e-9b45-472a-8fda-11e7e69de71b",
"name": "Drupal",
"url": "/drupal"
}
],
"seoTitle": "Come to DrupalCon New Orleans",
"content": [
{
"__typename": "ParagraphGallery"
},
{
"__typename": "ParagraphText"
},
{
"__typename": "ParagraphTwitter"
},
{
"__typename": "ParagraphLink"
},
{
"__typename": "ParagraphQuote"
},
{
"__typename": "ParagraphVideo"
},
{
"__typename": "ParagraphPinterest"
}
],
"teaser": {
"text": "The Drupal community is one of the largest open source communities in the world. We're developers, designers, strategists, coordinators, editors, translators, and more. Each year, we meet at DrupalCamps, meetups, and other events in more than 200 countries. But once a year, our community comes together at the biggest Drupal event in the world: DrupalCon North America. This year, from May 9-13, we'll be in New Orleans.",
"image": {
"uuid": "a4c1035a-5b27-4713-8ba3-40ba5942486d",
"derivative": {
"width": 220
}
}
}
}
}
}
3 changes: 3 additions & 0 deletions modules/thunder_gqls/tests/examples/node.variables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"uuid": "36b2e2b2-3df0-43eb-a282-d792b0999c07"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Drupal\Tests\thunder_gqls\Functional;

use Drupal\redirect\Entity\Redirect;
use Drupal\Tests\graphql\Traits\DataProducerExecutionTrait;
use Drupal\redirect\Entity\Redirect;

/**
* Test the schema.
Expand Down
Loading

0 comments on commit e81d93f

Please sign in to comment.