Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Merge updates 3 #860

Merged
merged 32 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
483d60f
Add password policy patch to fix password reset (#825)
ol0lll Aug 6, 2024
acb8950
Fix checkbox problem in firefox (#824)
ol0lll Aug 6, 2024
f526e4e
Issue #3466311: Release Thunder 7.3.1
ol0lll Aug 6, 2024
8ee0c94
Fix Testing
ol0lll Aug 14, 2024
ef206e4
Add focal_point patch from #3462165
ol0lll Aug 14, 2024
662fc95
Issue #3468098 by daniel.bosen, volkerk: Release Thunder 7.3.2
dbosen Aug 14, 2024
7c83a0d
GraphQL query for Search API
dbosen Aug 22, 2024
f6902ba
Issue #3469715 by volkerk: Release Thunder 7.3.3
dbosen Aug 22, 2024
f6c24ad
Upload test output
ol0lll Sep 2, 2024
7267fc7
Bump vite and vuepress (#842)
dependabot[bot] Sep 19, 2024
1f5c02d
Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows …
dependabot[bot] Sep 19, 2024
6d497ff
Issue #3474835 by anacolautti: Scheduling a published content with co…
dbosen Sep 24, 2024
fbb5cb5
Issue #3476367: Release Thunder 7.3.5
chrfritsch Sep 24, 2024
949fc54
Fix notices in graphql requests
chrfritsch Sep 30, 2024
098f65c
Update diff module (#846)
chrfritsch Oct 4, 2024
88eeea4
Issue #3478701: Release Thunder 7.3.6
chrfritsch Oct 4, 2024
e7089fa
Re-add list tags to graphql queries
dbosen Oct 14, 2024
662f816
Release Thunder 7.3.7
chrfritsch Oct 14, 2024
5047b86
Disable redis extension
ol0lll Oct 28, 2024
5ed8ae1
Add node query to GraphQl schema
chrfritsch Nov 14, 2024
e467676
Make private methods in SearchApiResponse protected.
mrmishmash Nov 14, 2024
1e425b2
Add patch from issue #3487031
chrfritsch Nov 20, 2024
59b12e1
Issue #3488601: Release Thunder 7.3.8
chrfritsch Nov 20, 2024
3ec48b1
Remove committed core patch #3487031
chrfritsch Nov 25, 2024
206a448
Release 7.3.9
chrfritsch Nov 25, 2024
98fbbc2
Drupal 10.4
chrfritsch Dec 18, 2024
4120888
Load entity types and add cache tags and contexts in search api producer
ol0lll Dec 18, 2024
c4744c1
Cast to string in strip_tags
dbosen Dec 18, 2024
dcd69d7
Thunder 7.4 release
chrfritsch Dec 18, 2024
e81d93f
Merge branch '7.4.x' into merge-updates-3
Jan 8, 2025
ba8bc56
Fix
Jan 8, 2025
1309907
Fix
Jan 8, 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
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 @@ -179,7 +179,10 @@ protected function query(
$query->range($offset, $limit);

$storage = $this->entityTypeManager->getStorage($type);
$cacheContext->addCacheableDependency($storage->getEntityType());
$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 @@ -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
2 changes: 1 addition & 1 deletion modules/thunder_gqls/src/Traits/ResolverHelperTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function createResolverBuilder(): void {
* @return \Drupal\graphql\GraphQL\Resolver\Composite
* The field data producer.
*/
public function fromEntityReference(string $field, ResolverInterface $entity = NULL, bool $multiValue = TRUE): Composite {
public function fromEntityReference(string $field, ?ResolverInterface $entity = NULL, bool $multiValue = TRUE): Composite {
return $this->builder->compose(
$this->builder->produce('entity_reference')
->map('field', $this->builder->fromValue($field))
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
}
}
}
}
}
}
Loading
Loading