diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 05fc251ac..e842b58fc 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,15 +19,16 @@ env: DRUPAL_TESTING_DATABASE_ENGINE: mysql DRUPAL_TESTING_TEST_CODING_STYLES: false DRUPAL_TESTING_TEST_PROFILE: thunder + DRUPAL_TESTING_TEST_CONFIGURATION: /tmp/test/thunder/install/docroot/profiles/contrib/thunder/ DRUPAL_TESTING_HTTP_PORT: 8888 DRUPAL_TESTING_VERBOSE: false - DRUPAL_TESTING_VERSION: "^1.0.42" + DRUPAL_TESTING_VERSION: "^1.0.45" DRUPAL_TESTING_TEST_FILTER: "" DRUPAL_TESTING_SELENIUM_HOST: 127.0.0.1 DRUPAL_TESTING_SELENIUM_PORT: 9515 PHPSTAN_MEMORY_LIMIT: 4G 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"]' + MINK_DRIVER_ARGS_WEBDRIVER: '["chrome", {"browserName":"chrome","goog: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 @@ -127,7 +128,7 @@ jobs: fail-fast: false matrix: PHP_VERSION: [ '8.3' ] - CHUNK: [ 1, 2, 3 ] + DRUPAL_TESTING_TEST_SUITE: [ 'kernel', 'functional', 'functional-javascript' ] steps: - uses: actions/checkout@v3 @@ -167,14 +168,13 @@ jobs: - name: Run tests run: test-drupal-project run_tests env: - THUNDER_TEST_CHUNK: ${{ matrix.CHUNK }} - DRUPAL_TESTING_TEST_PATH: /tmp/test/thunder/install/docroot/profiles/contrib/thunder/tests/src/TestSuites/ThunderTestSuite.php + DRUPAL_TESTING_TEST_SUITE: ${{ matrix.DRUPAL_TESTING_TEST_SUITE }} - name: Upload test output uses: actions/upload-artifact@v4 if: success() || failure() with: - name: text-max-output-${{ matrix.CHUNK }}-${{ matrix.PHP_VERSION }} + name: text-max-output-${{ matrix.DRUPAL_TESTING_TEST_SUITE }}-${{ matrix.PHP_VERSION }} path: /tmp/test/thunder/install/docroot/sites/simpletest/browser_output/ test-upgrade: @@ -202,7 +202,6 @@ jobs: env: DRUPAL_TESTING_TEST_GROUP_EXCLUDE: "NoUpdate" - DRUPAL_TESTING_TEST_GROUP: Thunder steps: - uses: actions/checkout@v3 @@ -309,9 +308,6 @@ jobs: if: ${{ contains(github.event.pull_request.labels.*.name, 'test-min') || github.event_name == 'schedule' }} - env: - DRUPAL_TESTING_TEST_GROUP: Thunder - steps: - uses: actions/checkout@v3 diff --git a/composer.json b/composer.json index 52978a3af..1af63f1f1 100644 --- a/composer.json +++ b/composer.json @@ -57,60 +57,60 @@ "drupal/autofill": "^1.1", "drupal/autosave_form": "1.7", "drupal/checklistapi": "^2.1.3", - "drupal/core-recommended": "~10.4.0@stable", - "drupal/config_selector": "^2.1", - "drupal/config_update": "^1.7 || ^2.0", + "drupal/core-recommended": "~11.1.0", + "drupal/config_selector": "^3.0", + "drupal/config_update": "^2.0-alpha4", "drupal/content_lock": "^3.0.0-alpha2", "drupal/crop": "^2.2", "drupal/diff": "1.8", "drupal/dropzonejs": "^2.8", - "drupal/empty_fields": "^1.0-alpha1", + "drupal/empty_fields": "^1.0", "drupal/entity_reference_actions": "^1.1.1", "drupal/entity_reference_revisions": "^1.3", "drupal/field_group": "3.6", "drupal/focal_point": "^2.1.2", "drupal/facets": "^2.0.7", - "drupal/gin": "3.0-rc15", + "drupal/gin": "^3.0-rc15", "drupal/gin_toolbar": "^1.0-rc6", "drupal/graphql": "^4.7", - "drupal/inline_entity_form": "^3.0.0@rc", + "drupal/inline_entity_form": "^3.0.0-rc20", "drupal/ivw_integration": "^2.0", "drupal/length_indicator": "^1.2", - "drupal/linkit": "^6.0-beta4", - "drupal/media_entity_instagram": "^3.0.3", + "drupal/linkit": "^7.0.0-alpha1", + "drupal/media_entity_instagram": "^4.0", "drupal/media_entity_pinterest": "^2.7", "drupal/media_entity_slideshow": "^2.0-alpha1", "drupal/media_entity_twitter": "^2.5", "drupal/media_expire": "^2.6", - "drupal/media_library_media_modify": "^1.0.0", + "drupal/media_library_media_modify": "^2.0.0-beta1", "drupal/media_file_delete": "^1.2", - "drupal/metatag": "^1.26", + "drupal/metatag": "^2.0.2", "drupal/metatag_async_widget": "^1.0-alpha2", - "drupal/paragraphs": "^1.12", - "drupal/paragraphs_features": "^2.0.0-beta3", + "drupal/paragraphs": "^1.18", + "drupal/paragraphs_features": "^2.1.0", "drupal/paragraphs_paste": "^2.0-beta3", "drupal/password_policy": "^4.0.3", "drupal/pathauto": "^1.12", "drupal/responsive_preview": "^2.1", "drupal/redirect": "^1.7", - "drupal/scheduler": "^2.0.2", - "drupal/scheduler_content_moderation_integration": "^2.0||^3.0", - "drupal/schema_metatag": "^2.5", - "drupal/select2": "^1.7", + "drupal/scheduler": "^2.1.0", + "drupal/scheduler_content_moderation_integration": "^3.0.1", + "drupal/schema_metatag": "^3.0.3", + "drupal/select2": "^2.0", "drupal/search_api_mark_outdated": "^1.0", - "drupal/simple_sitemap": "^4.1.6", + "drupal/simple_sitemap": "^4.2.1", "drupal/token": "^1.7", "drupal/update_helper": "^2.0||^3.0.3||^4.0", "drupal/search_api": "^1.29", - "drupal/views_bulk_edit": "^2.5", + "drupal/views_bulk_edit": "^3.0", "drupal/views_bulk_operations": "^4.2.7", - "drupal/vgwort": "^2.0@beta", + "drupal/vgwort": "^3.0@beta", "drupal/xymatic": "^1.0@beta", "npm-asset/dropzone": "^5.5.1", "npm-asset/exif-js": "^2.3.0", "npm-asset/blazy": "^1.8", "npm-asset/slick-carousel": "^1.8", - "npm-asset/select2": "^4.0.7", + "npm-asset/select2": "dev-develop", "caxy/php-htmldiff": "^0.1.14", "webonyx/graphql-php": "^14.11.8" }, diff --git a/config/optional/metatag.metatag_defaults.node__article.yml b/config/optional/metatag.metatag_defaults.node__article.yml index 72fbc22af..673d23535 100644 --- a/config/optional/metatag.metatag_defaults.node__article.yml +++ b/config/optional/metatag.metatag_defaults.node__article.yml @@ -4,7 +4,6 @@ dependencies: { } id: node__article label: 'Content: Article' tags: - content_language: '[node:langcode]' description: '[node:field_teaser_text]' image_src: '[node:field_teaser_media:entity:field_image]' referrer: no-referrer @@ -22,8 +21,6 @@ tags: og_url: '[node:url]' twitter_cards_description: '[node:field_teaser_text]' twitter_cards_image: '[node:field_teaser_media:entity:field_image:twitter]' - twitter_cards_image_height: '[node:field_teaser_media:entity:field_image:twitter:height]' - twitter_cards_image_width: '[node:field_teaser_media:entity:field_image:twitter:width]' twitter_cards_type: summary_large_image schema_article_about: '[node:field_channel:entity:name]' schema_article_date_modified: '[node:changed:html_datetime]' diff --git a/config/optional/metatag.metatag_defaults.node__news_article.yml b/config/optional/metatag.metatag_defaults.node__news_article.yml index 75e0bc60e..59f87129e 100644 --- a/config/optional/metatag.metatag_defaults.node__news_article.yml +++ b/config/optional/metatag.metatag_defaults.node__news_article.yml @@ -6,7 +6,6 @@ dependencies: id: node__news_article label: 'Content: News Article' tags: - content_language: '[node:langcode]' description: '[node:field_teaser_text]' image_src: '[node:field_teaser_media:entity:field_image]' referrer: no-referrer @@ -24,8 +23,6 @@ tags: og_url: '[node:url]' twitter_cards_description: '[node:field_teaser_text]' twitter_cards_image: '[node:field_teaser_media:entity:field_image:twitter]' - twitter_cards_image_height: '[node:field_teaser_media:entity:field_image:twitter:height]' - twitter_cards_image_width: '[node:field_teaser_media:entity:field_image:twitter:width]' twitter_cards_type: summary_large_image schema_article_about: '[node:field_channel:entity:name]' schema_article_date_modified: '[node:changed:html_datetime]' diff --git a/modules/thunder_article/src/Breadcrumb/ThunderArticleBreadcrumbBuilder.php b/modules/thunder_article/src/Breadcrumb/ThunderArticleBreadcrumbBuilder.php index 1f4ee5d9c..f513dc52b 100644 --- a/modules/thunder_article/src/Breadcrumb/ThunderArticleBreadcrumbBuilder.php +++ b/modules/thunder_article/src/Breadcrumb/ThunderArticleBreadcrumbBuilder.php @@ -4,6 +4,7 @@ use Drupal\Core\Breadcrumb\Breadcrumb; use Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface; +use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityRepositoryInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; @@ -45,7 +46,7 @@ public function __construct(EntityTypeManagerInterface $entityTypeManager, prote /** * {@inheritdoc} */ - public function applies(RouteMatchInterface $route_match): bool { + public function applies(RouteMatchInterface $route_match, ?CacheableMetadata $cacheable_metadata = NULL): bool { // This breadcrumb apply only for all articles. $parameters = $route_match->getParameters()->all(); if (($route_match->getRouteName() === 'entity.node.canonical') && is_object($parameters['node'])) { diff --git a/modules/thunder_article/thunder_article.info.yml b/modules/thunder_article/thunder_article.info.yml index 2c8a31217..0d9278049 100644 --- a/modules/thunder_article/thunder_article.info.yml +++ b/modules/thunder_article/thunder_article.info.yml @@ -1,7 +1,7 @@ name: 'Thunder Article' description: 'Provide Article content type for Thunder.' type: module -core_version_requirement: ^10 +core_version_requirement: ^11 package: Thunder dependencies: - drupal:node diff --git a/modules/thunder_gqls/tests/src/Functional/CacheInvalidationTest.php b/modules/thunder_gqls/tests/src/Functional/CacheInvalidationTest.php index df99386c9..5a38a515d 100644 --- a/modules/thunder_gqls/tests/src/Functional/CacheInvalidationTest.php +++ b/modules/thunder_gqls/tests/src/Functional/CacheInvalidationTest.php @@ -95,14 +95,14 @@ public function testMetatagsCacheInvalidation(): void { $this->assertEquals('New teaser text', $descriptionData['content'], 'The meta tag has the wrong content.'); // Assert that changing the site config invalidates the cache. - $descriptionData = $this->jsonDecode($responseData[7]['attributes']); + $descriptionData = $this->jsonDecode($responseData[6]['attributes']); $this->assertEquals('og:site_name', $descriptionData['property'], 'The meta tag for og:site_name is not the seventh tag in the response.'); $this->assertEquals('Drush Site-Install', $descriptionData['content'], 'The meta tag has the wrong content.'); $this->setSiteName('Drupal Test Installation'); $responseData = $this->getResponseData($query, $variables)['metatags']; - $descriptionData = $this->jsonDecode($responseData[7]['attributes']); + $descriptionData = $this->jsonDecode($responseData[6]['attributes']); $this->assertEquals('og:site_name', $descriptionData['property'], 'The meta tag for og:site_name is not the seventh tag in the response.'); $this->assertEquals('Drupal Test Installation', $descriptionData['content'], 'The meta tag has the wrong content.'); diff --git a/modules/thunder_gqls/tests/src/Kernel/DataProducer/EntitiesWithTermTest.php b/modules/thunder_gqls/tests/src/Kernel/DataProducer/EntitiesWithTermTest.php index 9ddac8201..972cdbef2 100644 --- a/modules/thunder_gqls/tests/src/Kernel/DataProducer/EntitiesWithTermTest.php +++ b/modules/thunder_gqls/tests/src/Kernel/DataProducer/EntitiesWithTermTest.php @@ -197,7 +197,7 @@ public function testEntityWithTerms(array $parameterMapping, array $expectedResu * * @see ::testEntityWithTerms() */ - public function providerEntityWithTerms() : array { + public static function providerEntityWithTerms() : array { return [ 'query without depth' => [ [ diff --git a/modules/thunder_gqls/tests/src/Kernel/DataProducer/EntityLinksTest.php b/modules/thunder_gqls/tests/src/Kernel/DataProducer/EntityLinksTest.php index 07deac1d1..fd4ce8048 100644 --- a/modules/thunder_gqls/tests/src/Kernel/DataProducer/EntityLinksTest.php +++ b/modules/thunder_gqls/tests/src/Kernel/DataProducer/EntityLinksTest.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\thunder_gqls\Kernel\DataProducer; +use Drupal\node\NodeInterface; use Drupal\Tests\graphql\Kernel\GraphQLTestBase; use Drupal\node\Entity\Node; use Drupal\node\Entity\NodeType; @@ -13,6 +14,13 @@ */ class EntityLinksTest extends GraphQLTestBase { + /** + * The node entity. + * + * @var \Drupal\node\Entity\Node + */ + protected NodeInterface $node; + /** * {@inheritdoc} */ diff --git a/modules/thunder_gqls/tests/src/Kernel/TypeResolver/DecoratableTypeResolverTest.php b/modules/thunder_gqls/tests/src/Kernel/TypeResolver/DecoratableTypeResolverTest.php index 79ff54a15..36f80da56 100644 --- a/modules/thunder_gqls/tests/src/Kernel/TypeResolver/DecoratableTypeResolverTest.php +++ b/modules/thunder_gqls/tests/src/Kernel/TypeResolver/DecoratableTypeResolverTest.php @@ -30,13 +30,19 @@ class DecoratableTypeResolverTest extends GraphQLTestBase { */ public function setUp(): void { parent::setUp(); - $this->resolver = $this->getMockForAbstractClass(DecoratableTypeResolver::class, [NULL]); + $this->resolver = $this->getMockBuilder(DecoratableTypeResolver::class) + ->setConstructorArgs([NULL]) + ->onlyMethods(['resolve']) + ->getMock(); $this->resolver->method('resolve') ->willReturnCallback(function ($object) { return ucfirst($object->bundle()); }); - $this->decoratedResolver = $this->getMockForAbstractClass(DecoratableTypeResolver::class, [$this->resolver]); + $this->decoratedResolver = $this->getMockBuilder(DecoratableTypeResolver::class) + ->setConstructorArgs([$this->resolver]) + ->onlyMethods(['resolve']) + ->getMock(); $this->decoratedResolver->method('resolve') ->willReturnCallback(function ($object) { if ($object->bundle( diff --git a/modules/thunder_gqls/thunder_gqls.info.yml b/modules/thunder_gqls/thunder_gqls.info.yml index f2860b84b..2a568efad 100644 --- a/modules/thunder_gqls/thunder_gqls.info.yml +++ b/modules/thunder_gqls/thunder_gqls.info.yml @@ -5,4 +5,4 @@ package: Thunder Optional dependencies: - graphql:graphql - drupal:node -core_version_requirement: ^10 +core_version_requirement: ^11 diff --git a/modules/thunder_ivw/thunder_ivw.info.yml b/modules/thunder_ivw/thunder_ivw.info.yml index fd09b4a97..02eff6cef 100644 --- a/modules/thunder_ivw/thunder_ivw.info.yml +++ b/modules/thunder_ivw/thunder_ivw.info.yml @@ -1,7 +1,7 @@ name: 'Thunder IVW' description: 'Enable your site to track page views for the german Information Community for the Assessment of the Circulation of Media.' type: module -core_version_requirement: ^10 +core_version_requirement: ^11 package: Thunder Optional dependencies: - ivw_integration:ivw_integration diff --git a/modules/thunder_media/thunder_media.info.yml b/modules/thunder_media/thunder_media.info.yml index f80220dfe..204ee310b 100644 --- a/modules/thunder_media/thunder_media.info.yml +++ b/modules/thunder_media/thunder_media.info.yml @@ -1,7 +1,7 @@ name: 'Thunder Media' description: 'Provides media bundles for thunder.' type: module -core_version_requirement: ^10 +core_version_requirement: ^11 dependencies: - drupal:image package: Thunder diff --git a/modules/thunder_news_article/thunder_news_article.info.yml b/modules/thunder_news_article/thunder_news_article.info.yml index 036e452e0..afa64c9ed 100644 --- a/modules/thunder_news_article/thunder_news_article.info.yml +++ b/modules/thunder_news_article/thunder_news_article.info.yml @@ -1,7 +1,7 @@ name: 'Thunder News Article' description: 'Provide News Article content type for Thunder.' type: module -core_version_requirement: ^10 +core_version_requirement: ^11 package: Thunder dependencies: - drupal:node diff --git a/modules/thunder_paragraphs/thunder_paragraphs.info.yml b/modules/thunder_paragraphs/thunder_paragraphs.info.yml index b13346233..4847b38f5 100644 --- a/modules/thunder_paragraphs/thunder_paragraphs.info.yml +++ b/modules/thunder_paragraphs/thunder_paragraphs.info.yml @@ -1,5 +1,5 @@ name: 'Thunder Paragraphs' description: 'Provide paragaphs functions for Thunder.' type: module -core_version_requirement: ^10 +core_version_requirement: ^11 package: Thunder diff --git a/modules/thunder_paragraphs_paste/thunder_paragraphs_paste.info.yml b/modules/thunder_paragraphs_paste/thunder_paragraphs_paste.info.yml index 7cd1eb8f0..21e9e5577 100644 --- a/modules/thunder_paragraphs_paste/thunder_paragraphs_paste.info.yml +++ b/modules/thunder_paragraphs_paste/thunder_paragraphs_paste.info.yml @@ -1,7 +1,7 @@ name: 'Thunder Paragraphs Paste' description: 'Add paste area to the article content type to easily import text from other sources.' type: module -core_version_requirement: ^10 +core_version_requirement: ^11 package: Thunder Optional dependencies: - paragraphs_paste:paragraphs_paste diff --git a/modules/thunder_password_policy/thunder_password_policy.info.yml b/modules/thunder_password_policy/thunder_password_policy.info.yml index 31e9ec077..90b5c7274 100644 --- a/modules/thunder_password_policy/thunder_password_policy.info.yml +++ b/modules/thunder_password_policy/thunder_password_policy.info.yml @@ -1,7 +1,7 @@ name: 'Thunder Password Policy' description: 'Full integration for more sophisticated password policies.' type: module -core_version_requirement: ^10 +core_version_requirement: ^11 package: Thunder Optional dependencies: - password_policy:password_policy diff --git a/modules/thunder_search/thunder_search.info.yml b/modules/thunder_search/thunder_search.info.yml index fb31ac92f..370719d6c 100644 --- a/modules/thunder_search/thunder_search.info.yml +++ b/modules/thunder_search/thunder_search.info.yml @@ -1,7 +1,7 @@ name: 'Thunder Search API' description: 'Integrates with the Search API module' type: module -core_version_requirement: ^10 +core_version_requirement: ^11 package: Thunder Optional dependencies: - search_api:search_api_db diff --git a/modules/thunder_taxonomy/thunder_taxonomy.info.yml b/modules/thunder_taxonomy/thunder_taxonomy.info.yml index d2a1a726b..c36bad4c8 100644 --- a/modules/thunder_taxonomy/thunder_taxonomy.info.yml +++ b/modules/thunder_taxonomy/thunder_taxonomy.info.yml @@ -1,7 +1,7 @@ name: 'Thunder Taxonomy' description: 'Provide taxonomy functions for Thunder.' type: module -core_version_requirement: ^10 +core_version_requirement: ^11 package: Thunder dependencies: - drupal:taxonomy diff --git a/modules/thunder_translation/thunder_translation.info.yml b/modules/thunder_translation/thunder_translation.info.yml index df0e9bbfb..449252980 100644 --- a/modules/thunder_translation/thunder_translation.info.yml +++ b/modules/thunder_translation/thunder_translation.info.yml @@ -1,7 +1,7 @@ name: 'Thunder Translation' description: 'Enable your editors to translate your content in multiple languages.' type: module -core_version_requirement: ^10 +core_version_requirement: ^11 package: Thunder Optional dependencies: - drupal:content_translation diff --git a/modules/thunder_vgwort/thunder_vgwort.info.yml b/modules/thunder_vgwort/thunder_vgwort.info.yml index 4014ea72a..6f01808de 100644 --- a/modules/thunder_vgwort/thunder_vgwort.info.yml +++ b/modules/thunder_vgwort/thunder_vgwort.info.yml @@ -1,7 +1,7 @@ name: Thunder VG Wort integration type: module description: 'VG Wort integration for the Thunder distribution.' -core_version_requirement: ^10 +core_version_requirement: ^11 package: Thunder Optional dependencies: - vgwort:vgwort diff --git a/modules/thunder_workflow/thunder_workflow.info.yml b/modules/thunder_workflow/thunder_workflow.info.yml index cc5c21536..a76e78d0d 100644 --- a/modules/thunder_workflow/thunder_workflow.info.yml +++ b/modules/thunder_workflow/thunder_workflow.info.yml @@ -1,7 +1,7 @@ name: 'Thunder Workflow' description: 'Get an advanced content creation workflow with scheduling functionality.' type: module -core_version_requirement: ^10 +core_version_requirement: ^11 package: Thunder Optional dependencies: - drupal:content_moderation diff --git a/modules/thunder_xymatic/thunder_xymatic.info.yml b/modules/thunder_xymatic/thunder_xymatic.info.yml index a75e26fc6..d9cceb12b 100644 --- a/modules/thunder_xymatic/thunder_xymatic.info.yml +++ b/modules/thunder_xymatic/thunder_xymatic.info.yml @@ -1,7 +1,7 @@ name: Thunder Xymatic integration type: module description: 'Xymatic integration for the Thunder distribution.' -core_version_requirement: ^10 +core_version_requirement: ^11 package: Thunder Optional dependencies: - xymatic:xymatic diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 652178514..d7662bfd7 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -10,11 +10,6 @@ parameters: count: 1 path: modules/thunder_gqls/src/Plugin/GraphQL/SchemaExtension/ThunderPagesSchemaExtension.php - - - message: "#^Access to an undefined property Drupal\\\\Tests\\\\thunder_gqls\\\\Kernel\\\\DataProducer\\\\EntityLinksTest\\:\\:\\$node\\.$#" - count: 4 - path: modules/thunder_gqls/tests/src/Kernel/DataProducer/EntityLinksTest.php - - message: "#^Access to an undefined property Drupal\\\\Core\\\\Entity\\\\EntityInterface\\:\\:\\$status\\.$#" count: 1 @@ -150,16 +145,6 @@ parameters: count: 1 path: tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php - - - message: "#^Class Drupal\\\\Tests\\\\TestSuites\\\\ThunderTestSuite extends @internal class PHPUnit\\\\Framework\\\\TestSuite\\.$#" - count: 1 - path: tests/src/TestSuites/ThunderTestSuite.php - - - - message: "#^Function drupal_phpunit_find_extension_directories not found\\.$#" - count: 1 - path: tests/src/TestSuites/ThunderTestSuite.php - - message: "#^Call to method id\\(\\) on an unknown class Drupal\\\\entity_browser\\\\Entity\\\\EntityBrowser\\.$#" count: 1 diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f63099d0d..7b389d5f9 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -4,24 +4,20 @@ or your current system user. See core/tests/README.md and https://www.drupal.org/node/2116263 for details. --> - - - - ./includes - ./lib - ./modules - ../modules - ../sites - - - ./modules/*/src/Tests - ./modules/*/tests - ../modules/*/src/Tests - ../modules/*/tests - ../modules/*/*/src/Tests - ../modules/*/*/tests - - + @@ -44,29 +40,41 @@ - - + + + + + + + + + + + - - ./tests/TestSuites/UnitTestSuite.php - - ./tests/TestSuites/KernelTestSuite.php + modules/**/tests/src/Kernel + tests/src/Kernel - ./tests/TestSuites/FunctionalTestSuite.php + modules/**/tests/src/Functional + tests/src/Functional - ./tests/TestSuites/FunctionalJavascriptTestSuite.php - - - ./tests/TestSuites/BuildTestSuite.php + modules/**/tests/src/FunctionalJavascript + tests/src/FunctionalJavascript - - - - - diff --git a/src/Breadcrumb/ThunderNodeEditBreadcrumbBuilder.php b/src/Breadcrumb/ThunderNodeEditBreadcrumbBuilder.php index cbd5d38b2..a922ef7a7 100644 --- a/src/Breadcrumb/ThunderNodeEditBreadcrumbBuilder.php +++ b/src/Breadcrumb/ThunderNodeEditBreadcrumbBuilder.php @@ -4,6 +4,7 @@ use Drupal\Core\Breadcrumb\Breadcrumb; use Drupal\Core\Breadcrumb\BreadcrumbBuilderInterface; +use Drupal\Core\Cache\CacheableMetadata; use Drupal\Core\Link; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\StringTranslation\StringTranslationTrait; @@ -17,7 +18,7 @@ class ThunderNodeEditBreadcrumbBuilder implements BreadcrumbBuilderInterface { /** * {@inheritdoc} */ - public function applies(RouteMatchInterface $route_match): bool { + public function applies(RouteMatchInterface $route_match, ?CacheableMetadata $cacheable_metadata = NULL): bool { return in_array($route_match->getRouteName(), [ 'entity.node.edit_form', 'node.add', diff --git a/tests/modules/thunder_test_mock_request/src/MockHttpClientMiddleware.php b/tests/modules/thunder_test_mock_request/src/MockHttpClientMiddleware.php index babed8040..31ccfc702 100644 --- a/tests/modules/thunder_test_mock_request/src/MockHttpClientMiddleware.php +++ b/tests/modules/thunder_test_mock_request/src/MockHttpClientMiddleware.php @@ -59,6 +59,8 @@ public static function addUrlResponse(string $url, string $body, array $headers * HTTP middleware that adds the next mocked response. */ public function __invoke(): callable { + // Needed due to a bug in coder. + // phpcs:disable Generic.CodeAnalysis.EmptyPHPStatement.SemicolonWithoutCodeDetected return fn($handler): callable => function (RequestInterface $request, array $options) use ($handler) { $items = $this->state->get(static::class, []); $url = (string) $request->getUri(); diff --git a/tests/src/Functional/InstalledConfigurationTest.php b/tests/src/Functional/InstalledConfigurationTest.php index bf03562b9..d6935a531 100644 --- a/tests/src/Functional/InstalledConfigurationTest.php +++ b/tests/src/Functional/InstalledConfigurationTest.php @@ -72,6 +72,7 @@ class InstalledConfigurationTest extends ThunderTestBase { 'core.entity_view_mode.content_moderation_state.token', 'core.entity_view_mode.crop.token', 'core.entity_view_mode.file.token', + 'core.entity_view_mode.media.token', 'core.entity_view_mode.menu_link_content.token', 'core.entity_view_mode.node.token', 'core.entity_view_mode.paragraph.token', diff --git a/tests/src/FunctionalJavascript/Integration/EntityReferenceActionsTest.php b/tests/src/FunctionalJavascript/Integration/EntityReferenceActionsTest.php index 1f1a25271..7f215a649 100644 --- a/tests/src/FunctionalJavascript/Integration/EntityReferenceActionsTest.php +++ b/tests/src/FunctionalJavascript/Integration/EntityReferenceActionsTest.php @@ -36,6 +36,7 @@ public function testMediaEditInArticle(): void { $this->getSession()->getPage()->checkField('media[image][_field_selector][field_copyright]'); $this->getSession()->getPage()->fillField('media[image][field_copyright][0][value]', 'Test copyright'); + $this->getSession()->getPage()->selectFieldOption('media[image][field_copyright_change_method]', 'replace'); $this->assertSession()->elementExists('css', '.ui-dialog-buttonpane')->pressButton('Confirm'); diff --git a/tests/src/FunctionalJavascript/MediaImageModifyTest.php b/tests/src/FunctionalJavascript/MediaImageModifyTest.php index bfdad2ec5..c61dbab84 100644 --- a/tests/src/FunctionalJavascript/MediaImageModifyTest.php +++ b/tests/src/FunctionalJavascript/MediaImageModifyTest.php @@ -105,7 +105,7 @@ public function testRemoveAdd(): void { $this->assertSession()->assertWaitOnAjaxRequest(); $this->assertNotEmpty($this->assertSession()->waitForElementVisible('css', '#drupal-modal')); $this->assertSession()->fieldNotExists('also_delete_file'); - $this->assertSession()->pageTextContains('This action cannot be undone.The file attached to this media is owned by admin so will be retained.'); + $this->assertSession()->pageTextContains('The file attached to this media is owned by admin so will be retained.'); Role::load(static::$defaultUserRole)->grantPermission('delete any file')->save(); $this->getSession()->reload(); $this->getSession()->getPage()->find('css', '[data-drupal-selector="edit-gin-sticky-actions"] .gin-more-actions__trigger')->click(); diff --git a/tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php b/tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php index 0f11d48c0..d4460e492 100644 --- a/tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php +++ b/tests/src/FunctionalJavascript/ThunderJavascriptTestBase.php @@ -134,7 +134,7 @@ protected function getScreenshotFolder() { * Return array of content types arrays. The first element is the content * type, the second argument is the display name of the content type. */ - public function providerContentTypes(): array { + public static function providerContentTypes(): array { return [ 'Content type "Article"' => ['article', 'Article'], 'Content type "News Article"' => ['news_article', 'News Article'], diff --git a/tests/src/Kernel/MetatagTest.php b/tests/src/Kernel/MetatagTest.php index efda99b43..ea148588d 100644 --- a/tests/src/Kernel/MetatagTest.php +++ b/tests/src/Kernel/MetatagTest.php @@ -105,7 +105,6 @@ public function testTagDefaultValues(): void { $elements = $metatagManager->generateRawElements($tags, $this->node); $this->assertStringEndsWith('/node/1', $elements['canonical_url']['#attributes']['href']); - $this->assertEquals('en', $elements['content_language']['#attributes']['content']); $this->assertEquals($description, $elements['description']['#attributes']['content']); $this->assertStringEndsWith('/files/image-test.png', $elements['image_src']['#attributes']['href']); $this->assertEquals('no-referrer', $elements['referrer']['#attributes']['content']); @@ -123,8 +122,6 @@ public function testTagDefaultValues(): void { $this->assertEquals($description, $elements['twitter_cards_description']['#attributes']['content']); $this->assertStringContainsString('/files/styles/twitter/public/image-test.png.webp', $elements['twitter_cards_image']['#attributes']['content']); - $this->assertEquals('512', $elements['twitter_cards_image_height']['#attributes']['content']); - $this->assertEquals('1024', $elements['twitter_cards_image_width']['#attributes']['content']); $this->assertEquals('summary_large_image', $elements['twitter_cards_type']['#attributes']['content']); $this->assertEquals('Article', $elements['schema_article_type']['#attributes']['content']); diff --git a/tests/src/TestSuites/ThunderTestSuite.php b/tests/src/TestSuites/ThunderTestSuite.php deleted file mode 100644 index 15c817c31..000000000 --- a/tests/src/TestSuites/ThunderTestSuite.php +++ /dev/null @@ -1,54 +0,0 @@ - $dir) { - foreach (['Functional', 'FunctionalJavascript', 'Kernel'] as $suite_namespace) { - $test_path = "$dir/tests/src/$suite_namespace"; - if (is_dir($test_path)) { - $tests += TestDiscovery::scanDirectory("Drupal\\Tests\\$extension_name\\$suite_namespace\\", $test_path); - } - } - } - - if ($chunk = (int) getenv('THUNDER_TEST_CHUNK')) { - $sorted_tests = []; - foreach (array_values($tests) as $key => $value) { - if ($key % 3 === ($chunk - 1)) { - $sorted_tests[] = $value; - } - } - $suite->addTestFiles($sorted_tests); - } - else { - $suite->addTestFiles($tests); - } - - return $suite; - } - -} diff --git a/thunder.info.yml b/thunder.info.yml index 27e1efd38..ef289512e 100644 --- a/thunder.info.yml +++ b/thunder.info.yml @@ -2,8 +2,8 @@ name: Thunder type: profile description: 'The Drupal based CMS for professional publishing.' project: thunder -core_version_requirement: ~10.4.0 -version: '7.4.3' +core_version_requirement: ~11.1.0 +version: '8.1.0' distribution: name: Thunder @@ -46,7 +46,6 @@ install: # contrib - access_unpublished:access_unpublished - admin_toolbar:admin_toolbar_tools - - admin_toolbar:admin_toolbar_links_access_filter - autosave_form:autosave_form - autofill:autofill - content_lock:content_lock diff --git a/thunder.post_update.php b/thunder.post_update.php index 44b8a1b4b..e0beb4084 100644 --- a/thunder.post_update.php +++ b/thunder.post_update.php @@ -69,10 +69,8 @@ function thunder_post_update_0001_upgrade_to_thunder7(array &$sandbox): string { } } - /** @var \Drupal\ckeditor5\SmartDefaultSettings $ckEditorMigration */ $ckEditorMigration = new SmartDefaultSettings( \Drupal::service('plugin.manager.ckeditor5.plugin'), - \Drupal::service('plugin.manager.public_ckeditor4to5upgrade.plugin'), $updater->logger(), \Drupal::service('module_handler'), \Drupal::service('current_user'));