Skip to content

Commit

Permalink
Merge branch '7.3.x' into d11-compatibility
Browse files Browse the repository at this point in the history
* 7.3.x:
  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)
  Upload test output
  Issue #3469715 by volkerk: Release Thunder 7.3.3
  GraphQL query for Search API
  Issue #3468098 by daniel.bosen, volkerk: Release Thunder 7.3.2
  Add focal_point patch from #3462165
  Fix Testing
  Issue #3466311: Release Thunder 7.3.1
  Fix checkbox problem in firefox (#824)
  Add password policy patch to fix password reset (#825)
  • Loading branch information
Christian Fritsch committed Oct 30, 2024
2 parents 0bba8f7 + 5047b86 commit 7080bef
Show file tree
Hide file tree
Showing 29 changed files with 4,220 additions and 4,121 deletions.
23 changes: 16 additions & 7 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: "dev-drush-13"
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 @@ -29,6 +30,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 @@ -63,7 +65,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 @@ -105,7 +107,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 @@ -140,7 +142,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 @@ -154,12 +156,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 @@ -181,6 +183,13 @@ jobs:
- name: Run tests
run: test-drupal-project run_tests

- 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 @@ -214,7 +223,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 @@ -319,7 +328,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
21 changes: 0 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
# Changelog

## [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)

Add search api GraphQl schema and data producer.

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

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

* [Issue #3462165: Add focal_point patch](https://www.drupal.org/node/3462165)

## [7.3.1](https://github.com/thunder/thunder-distribution/tree/7.3.1) 2024-06-024

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

Add patches for upstream issues.

* [Issue #3465364: Fatal error when changing password when password_policy_history is enabled](https://www.drupal.org/project/password_policy/issues/3465364)
* [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/project/gin/issues/3455558)

## [7.3.0](https://github.com/thunder/thunder-distribution/tree/7.1.0) 2024-06-024

[Full Changelog](https://github.com/thunder/thunder-distribution/compare/7.2.2...7.3.0)
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@
"drupal/config_update": "^2.0-alpha4",
"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",
"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/focal_point": "2.1.1",
"drupal/facets": "^2.0.7",
"drupal/gin": "3.0-rc11",
"drupal/gin_toolbar": "^1.0-rc6",
Expand All @@ -114,7 +114,7 @@
"drupal/media_entity_slideshow": "^2.0-alpha1",
"drupal/media_entity_twitter": "^2.5",
"drupal/media_expire": "^2.6",
"drupal/media_library_media_modify": "dev-1.0.x",
"drupal/media_library_media_modify": "^2.0.0-beta1",
"drupal/media_file_delete": "^1.2",
"drupal/metatag": "^2.0.2",
"drupal/metatag_async_widget": "^1.0-alpha2",
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
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
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Drupal\Tests\thunder_gqls\Functional\DataProducer;

use Drupal\search_api\Query\QueryInterface;
use Drupal\Tests\graphql\Traits\DataProducerExecutionTrait;
use Drupal\Tests\thunder_gqls\Functional\ThunderGqlsTestBase;
use Drupal\search_api\Query\QueryInterface;

/**
* Test ThunderSearchApi data producer.
Expand Down
6 changes: 3 additions & 3 deletions modules/thunder_gqls/tests/src/Functional/SchemaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Drupal\Tests\thunder_gqls\Functional;

use Drupal\access_unpublished\Entity\AccessToken;
use Drupal\Component\Serialization\Json;
use Drupal\access_unpublished\Entity\AccessToken;
use Drupal\media\Entity\MediaType;
use Drupal\node\Entity\Node;

Expand Down Expand Up @@ -157,7 +157,7 @@ public function testNonExistingEntityLinks(): void {
}
GQL;

$variables = ['path' => 'user/1'];
$variables = ['path' => '/user/1'];
$response = $this->query($query, Json::encode($variables));
$page = $this->jsonDecode($response->getBody());
$this->assertArrayNotHasKey('errors', $page);
Expand Down Expand Up @@ -205,7 +205,7 @@ public function testLabelAccess(): void {
}
GQL;

$variables = ['path' => 'duis-autem-vel-eum-iriure'];
$variables = ['path' => '/duis-autem-vel-eum-iriure'];
$response = $this->query($query, Json::encode($variables));
$this->assertEquals(200, $response->getStatusCode(), 'Response not 200');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

namespace Drupal\Tests\thunder_gqls\Kernel\DataProducer;

use Drupal\Tests\graphql\Kernel\GraphQLTestBase;
use Drupal\field\Entity\FieldConfig;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\node\Entity\Node;
use Drupal\node\Entity\NodeType;
use Drupal\taxonomy\Entity\Term;
use Drupal\taxonomy\Entity\Vocabulary;
use Drupal\taxonomy\TermInterface;
use Drupal\Tests\graphql\Kernel\GraphQLTestBase;

/**
* Test entities_with_term data producer.
Expand Down Expand Up @@ -122,6 +122,46 @@ public function setUp(): void {
$node3->save();

$this->parent = $parent;

$schema = <<<GQL
type Query {
articles: EntityList
}
type EntityList {
total: Int!
}
GQL;

$this->setUpSchema($schema);
}

/**
* Test cache metadata for the query.
*/
public function testQueryCacheMetadata(): void {
$query = <<<GQL
query {
articles {
total
}
}
GQL;

$this->mockResolver('Query', 'articles',
$this->builder->produce('entities_with_term')
->map('term', $this->builder->fromValue($this->parent))
->map('type', $this->builder->fromValue('node'))
->map('field', $this->builder->fromValue(self::TAXONOMY_FIELD_NAME))
);
$this->mockResolver('EntityList', 'total', $this->builder->fromValue(1));

$metadata = $this->defaultCacheMetaData();
$metadata->setCacheContexts(['user.permissions', 'user.node_grants:view']);
$metadata->addCacheTags(['node_list', 'taxonomy_term:' . $this->parent->id()]);

$this->assertResults($query, [], [
'articles' => ['total' => '1'],
], $metadata);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Drupal\Tests\thunder_gqls\Kernel\DataProducer;

use Drupal\Tests\graphql\Kernel\GraphQLTestBase;
use Drupal\node\Entity\Node;
use Drupal\node\Entity\NodeType;
use Drupal\Tests\graphql\Kernel\GraphQLTestBase;

/**
* Data producers EntityLinks test class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Drupal\Tests\thunder_gqls\Kernel\DataProducer;

use Drupal\Tests\graphql\Kernel\GraphQLTestBase;
use Drupal\paragraphs\Entity\Paragraph;
use Drupal\paragraphs\Entity\ParagraphsType;
use Drupal\Tests\graphql\Kernel\GraphQLTestBase;

/**
* Tests the paragraphs behavior data producer.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?php

namespace Drupal\Tests\thunder_gqls\Kernel\DataProducer;

use Drupal\Tests\graphql\Kernel\GraphQLTestBase;

/**
* Test entities_with_term data producer.
*
* @group Thunder
*/
class ThunderEntityListTest extends GraphQLTestBase {

/**
* {@inheritdoc}
*/
protected static $modules = [
'text',
'thunder_gqls',
];

/**
* {@inheritdoc}
*/
public function setUp(): void {
parent::setUp();

$schema = <<<GQL
type Query {
articles: EntityList
}
type EntityList {
total: Int!
}
GQL;

$this->setUpSchema($schema);
}

/**
* Test cache metadata for the query.
*/
public function testQueryCacheMetadata(): void {
$query = <<<GQL
query {
articles {
total
}
}
GQL;

$this->mockResolver('Query', 'articles',
$this->builder->produce('thunder_entity_list')
->map('type', $this->builder->fromValue('node'))
);
$this->mockResolver('EntityList', 'total', $this->builder->fromValue(1));

$metadata = $this->defaultCacheMetaData();
$metadata->setCacheContexts(['user.permissions', 'user.node_grants:view']);
$metadata->addCacheTags(['node_list']);

$this->assertResults($query, [], [
'articles' => ['total' => '1'],
], $metadata);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

namespace Drupal\Tests\thunder_gqls\Kernel\DataProducer;

use Drupal\Tests\TestFileCreationTrait;
use Drupal\Tests\graphql\Kernel\GraphQLTestBase;
use Drupal\node\Entity\Node;
use Drupal\node\NodeInterface;
use Drupal\Tests\graphql\Kernel\GraphQLTestBase;
use Drupal\Tests\TestFileCreationTrait;

/**
* Data producers Metatags test class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
namespace Drupal\Tests\thunder_gqls\Kernel\DataProducer;

use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Tests\graphql\Kernel\GraphQLTestBase;
use Drupal\node\Entity\Node;
use Drupal\node\NodeInterface;
use Drupal\Tests\graphql\Kernel\GraphQLTestBase;

/**
* ThunderRedirect data producer test class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

namespace Drupal\Tests\thunder_gqls\Kernel\TypeResolver;

use Drupal\node\NodeInterface;
use Drupal\Tests\graphql\Kernel\GraphQLTestBase;
use Drupal\node\NodeInterface;
use Drupal\thunder_gqls\GraphQL\DecoratableTypeResolver;

/**
Expand Down
Loading

0 comments on commit 7080bef

Please sign in to comment.