From 846d0acfc37d5cc499332af6f5ee6818345875d0 Mon Sep 17 00:00:00 2001 From: 22Alexandra Date: Wed, 13 Dec 2023 14:17:29 +0200 Subject: [PATCH 1/2] EWPP-3831: Update to PHP 8.2 and drop support for D9.4. --- .drone.yml | 33 +++++++++++-------- composer.json | 10 +++--- docker-compose.yml | 2 +- .../oe_theme_contact_forms.info.yml | 2 +- .../oe_theme_content_call_proposals.info.yml | 2 +- .../oe_theme_content_call_tenders.info.yml | 2 +- .../oe_theme_content_consultation.info.yml | 2 +- .../oe_theme_content_entity_contact.info.yml | 2 +- ...theme_content_entity_organisation.info.yml | 2 +- .../oe_theme_content_entity_venue.info.yml | 2 +- .../oe_theme_content_event.info.yml | 2 +- .../oe_theme_content_news.info.yml | 2 +- .../oe_theme_content_organisation.info.yml | 2 +- ...me_content_organisation_reference.info.yml | 2 +- .../oe_theme_content_page.info.yml | 2 +- .../oe_theme_content_person.info.yml | 2 +- .../oe_theme_content_policy.info.yml | 2 +- .../oe_theme_content_project.info.yml | 2 +- .../oe_theme_content_publication.info.yml | 2 +- ...ent_sub_entity_document_reference.info.yml | 2 +- modules/oe_theme_demo/oe_theme_demo.info.yml | 2 +- .../oe_theme_helper/oe_theme_helper.info.yml | 2 +- .../oe_theme_inpage_navigation_test.info.yml | 2 +- .../page_header_metadata_test.info.yml | 2 +- .../MediaGalleryFormatterTest.php | 32 +++++------------- .../oe_theme_list_pages.info.yml | 2 +- .../oe_theme_paragraphs_banner.info.yml | 2 +- .../oe_theme_paragraphs_contact.info.yml | 2 +- modules/oe_theme_test/oe_theme_test.info.yml | 2 +- .../oe_theme_js_test.info.yml | 2 +- .../oe_theme_patterns_render_test.info.yml | 2 +- tests/src/Kernel/ContactRenderTest.php | 1 + .../oe_theme_subtheme_test.info.yml | 2 +- 33 files changed, 62 insertions(+), 72 deletions(-) diff --git a/.drone.yml b/.drone.yml index bd45361c0..91ce3fec4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -111,8 +111,8 @@ pipeline: event: include: tag matrix: - CORE_VERSION: "9.4.0" - PHP_VERSION: "8.0" + CORE_VERSION: "10.0" + PHP_VERSION: "8.1" github-release: image: registry.fpfis.eu/drone-plugins/github-release @@ -124,22 +124,27 @@ pipeline: event: include: tag matrix: - CORE_VERSION: "9.4.0" - PHP_VERSION: "8.0" + CORE_VERSION: "10.0" + PHP_VERSION: "8.1" matrix: include: - - { PHP_VERSION: 8.0, CORE_VERSION: 9.4.0, TYPE: behat } - - { PHP_VERSION: 8.0, CORE_VERSION: 9.4.0, TYPE: phpunit, BATCH: batch1 } - - { PHP_VERSION: 8.0, CORE_VERSION: 9.4.0, TYPE: phpunit, BATCH: batch2 } - - { PHP_VERSION: 8.0, CORE_VERSION: 9.4.0, TYPE: phpunit, BATCH: batch3 } - - - { PHP_VERSION: 8.1, CORE_VERSION: 9.4.0, TYPE: behat } - - { PHP_VERSION: 8.1, CORE_VERSION: 9.4.0, TYPE: phpunit, BATCH: batch1 } - - { PHP_VERSION: 8.1, CORE_VERSION: 9.4.0, TYPE: phpunit, BATCH: batch2 } - - { PHP_VERSION: 8.1, CORE_VERSION: 9.4.0, TYPE: phpunit, BATCH: batch3 } - - { PHP_VERSION: 8.1, CORE_VERSION: 10.0, TYPE: behat } - { PHP_VERSION: 8.1, CORE_VERSION: 10.0, TYPE: phpunit, BATCH: batch1 } - { PHP_VERSION: 8.1, CORE_VERSION: 10.0, TYPE: phpunit, BATCH: batch2 } - { PHP_VERSION: 8.1, CORE_VERSION: 10.0, TYPE: phpunit, BATCH: batch3 } + + - { PHP_VERSION: 8.2, CORE_VERSION: 10.0, TYPE: behat } + - { PHP_VERSION: 8.2, CORE_VERSION: 10.0, TYPE: phpunit, BATCH: batch1 } + - { PHP_VERSION: 8.2, CORE_VERSION: 10.0, TYPE: phpunit, BATCH: batch2 } + - { PHP_VERSION: 8.2, CORE_VERSION: 10.0, TYPE: phpunit, BATCH: batch3 } + + - { PHP_VERSION: 8.1, CORE_VERSION: 10.1, TYPE: behat } + - { PHP_VERSION: 8.1, CORE_VERSION: 10.1, TYPE: phpunit, BATCH: batch1 } + - { PHP_VERSION: 8.1, CORE_VERSION: 10.1, TYPE: phpunit, BATCH: batch2 } + - { PHP_VERSION: 8.1, CORE_VERSION: 10.1, TYPE: phpunit, BATCH: batch3 } + + - { PHP_VERSION: 8.2, CORE_VERSION: 10.1, TYPE: behat } + - { PHP_VERSION: 8.2, CORE_VERSION: 10.1, TYPE: phpunit, BATCH: batch1 } + - { PHP_VERSION: 8.2, CORE_VERSION: 10.1, TYPE: phpunit, BATCH: batch2 } + - { PHP_VERSION: 8.2, CORE_VERSION: 10.1, TYPE: phpunit, BATCH: batch3 } diff --git a/composer.json b/composer.json index 72cc752a7..3d1cb60a7 100644 --- a/composer.json +++ b/composer.json @@ -6,9 +6,9 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": ">=8.0", + "php": ">=8.1", "cweagans/composer-patches": "~1.4", - "drupal/core": "^9.4 || ^10", + "drupal/core": "^10", "drupal/smart_trim": "^2", "drupal/stable": "^2.0", "drupal/twig_field_value": "^2.0", @@ -23,8 +23,8 @@ "drupal/ckeditor": "^1.0", "drupal/composite_reference": "^2.1", "drupal/config_devel": "^1.9", - "drupal/core-composer-scaffold": "^9.4 || ^10", - "drupal/core-utility": "^9.4 || ^10", + "drupal/core-composer-scaffold": "^10", + "drupal/core-utility": "^10", "drupal/datetime_range_timezone": "^1.0.0-alpha4", "drupal/datetime_testing": "^1.0", "drupal/description_list_field": "^1.0", @@ -45,7 +45,7 @@ "openeuropa/behat-transformation-context": "^0.2", "openeuropa/code-review": "^2.0.0-alpha6", "openeuropa/oe_contact_forms": "^1.11", - "openeuropa/oe_content": "^3.0.0-beta3", + "openeuropa/oe_content": "^3.0.0-beta4", "openeuropa/oe_corporate_blocks": "^4.14", "openeuropa/oe_corporate_countries": "^2.0.0-alpha8", "openeuropa/oe_corporate_site_info": "^1.0.0-alpha8", diff --git a/docker-compose.yml b/docker-compose.yml index 29dbfad20..6673847d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '2' services: web: - image: fpfis/httpd-php-dev:8.1 + image: fpfis/httpd-php-dev:8.2 working_dir: /var/www/html ports: - 8080:8080 diff --git a/modules/oe_theme_contact_forms/oe_theme_contact_forms.info.yml b/modules/oe_theme_contact_forms/oe_theme_contact_forms.info.yml index 39c7f10d4..2e712afae 100644 --- a/modules/oe_theme_contact_forms/oe_theme_contact_forms.info.yml +++ b/modules/oe_theme_contact_forms/oe_theme_contact_forms.info.yml @@ -2,6 +2,6 @@ name: OpenEuropa Theme Contact Forms type: module description: Companion module for the OE Contact Forms module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - oe_contact_forms:oe_contact_forms diff --git a/modules/oe_theme_content_call_proposals/oe_theme_content_call_proposals.info.yml b/modules/oe_theme_content_call_proposals/oe_theme_content_call_proposals.info.yml index f75f3b365..90dd1fb1b 100644 --- a/modules/oe_theme_content_call_proposals/oe_theme_content_call_proposals.info.yml +++ b/modules/oe_theme_content_call_proposals/oe_theme_content_call_proposals.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Call for proposals Content type: module description: Companion module for the OE Call for proposals Content module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - extra_field:extra_field - field_group:field_group diff --git a/modules/oe_theme_content_call_tenders/oe_theme_content_call_tenders.info.yml b/modules/oe_theme_content_call_tenders/oe_theme_content_call_tenders.info.yml index 376bcdb23..7331d42e8 100644 --- a/modules/oe_theme_content_call_tenders/oe_theme_content_call_tenders.info.yml +++ b/modules/oe_theme_content_call_tenders/oe_theme_content_call_tenders.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Call for tenders Content type: module description: Companion module for the OE Call for tenders content module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - extra_field:extra_field - field_group:field_group diff --git a/modules/oe_theme_content_consultation/oe_theme_content_consultation.info.yml b/modules/oe_theme_content_consultation/oe_theme_content_consultation.info.yml index 8367b2d2d..b811ace9c 100644 --- a/modules/oe_theme_content_consultation/oe_theme_content_consultation.info.yml +++ b/modules/oe_theme_content_consultation/oe_theme_content_consultation.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Consultation Content type: module description: Companion module for the OE Content Consultation module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - drupal:datetime diff --git a/modules/oe_theme_content_entity_contact/oe_theme_content_entity_contact.info.yml b/modules/oe_theme_content_entity_contact/oe_theme_content_entity_contact.info.yml index 041d54c62..efc9bf725 100755 --- a/modules/oe_theme_content_entity_contact/oe_theme_content_entity_contact.info.yml +++ b/modules/oe_theme_content_entity_contact/oe_theme_content_entity_contact.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Content Entity Contact description: Companion module for the OE Content Entity Contact module package: OpenEuropa type: module -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - oe_theme:oe_theme_helper diff --git a/modules/oe_theme_content_entity_organisation/oe_theme_content_entity_organisation.info.yml b/modules/oe_theme_content_entity_organisation/oe_theme_content_entity_organisation.info.yml index 8d5d02e97..fc3a652a0 100644 --- a/modules/oe_theme_content_entity_organisation/oe_theme_content_entity_organisation.info.yml +++ b/modules/oe_theme_content_entity_organisation/oe_theme_content_entity_organisation.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Content Entity Organisation description: Companion module for the OE Content Entity Organisation module package: OpenEuropa type: module -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - oe_theme:oe_theme_helper diff --git a/modules/oe_theme_content_entity_venue/oe_theme_content_entity_venue.info.yml b/modules/oe_theme_content_entity_venue/oe_theme_content_entity_venue.info.yml index 983326b44..c3b816119 100755 --- a/modules/oe_theme_content_entity_venue/oe_theme_content_entity_venue.info.yml +++ b/modules/oe_theme_content_entity_venue/oe_theme_content_entity_venue.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Content Entity Venue description: Companion module for the OE Content Entity Venue module package: OpenEuropa type: module -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - oe_theme:oe_theme_helper diff --git a/modules/oe_theme_content_event/oe_theme_content_event.info.yml b/modules/oe_theme_content_event/oe_theme_content_event.info.yml index 5e28bc420..c3afae251 100644 --- a/modules/oe_theme_content_event/oe_theme_content_event.info.yml +++ b/modules/oe_theme_content_event/oe_theme_content_event.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Event Content type: module description: Companion module for the OE Content Event module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - extra_field:extra_field - oe_content:oe_content_event diff --git a/modules/oe_theme_content_news/oe_theme_content_news.info.yml b/modules/oe_theme_content_news/oe_theme_content_news.info.yml index 129f61903..2caecf758 100644 --- a/modules/oe_theme_content_news/oe_theme_content_news.info.yml +++ b/modules/oe_theme_content_news/oe_theme_content_news.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme News Content type: module description: Companion module for the OE Content News module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - extra_field:extra_field - oe_content_news:oe_content_news diff --git a/modules/oe_theme_content_organisation/oe_theme_content_organisation.info.yml b/modules/oe_theme_content_organisation/oe_theme_content_organisation.info.yml index ececf3f8a..bb4098306 100644 --- a/modules/oe_theme_content_organisation/oe_theme_content_organisation.info.yml +++ b/modules/oe_theme_content_organisation/oe_theme_content_organisation.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Organisation Content type: module description: Companion module for the OE Organisation Content module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - oe_content:oe_content_organisation - oe_content:oe_content_organisation_person_reference diff --git a/modules/oe_theme_content_organisation_reference/oe_theme_content_organisation_reference.info.yml b/modules/oe_theme_content_organisation_reference/oe_theme_content_organisation_reference.info.yml index 46ea7ccf3..509449f21 100644 --- a/modules/oe_theme_content_organisation_reference/oe_theme_content_organisation_reference.info.yml +++ b/modules/oe_theme_content_organisation_reference/oe_theme_content_organisation_reference.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Organisation Reference type: module description: Companion module for the OE Organisation Reference module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - oe_content:oe_content_organisation_reference diff --git a/modules/oe_theme_content_page/oe_theme_content_page.info.yml b/modules/oe_theme_content_page/oe_theme_content_page.info.yml index 66d62baef..b141fcdfd 100644 --- a/modules/oe_theme_content_page/oe_theme_content_page.info.yml +++ b/modules/oe_theme_content_page/oe_theme_content_page.info.yml @@ -2,6 +2,6 @@ name: OpenEuropa Theme Page Content type: module description: Companion module for the OE Content Page module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - oe_content_page:oe_content_page diff --git a/modules/oe_theme_content_person/oe_theme_content_person.info.yml b/modules/oe_theme_content_person/oe_theme_content_person.info.yml index 5777c8ecd..90712d874 100644 --- a/modules/oe_theme_content_person/oe_theme_content_person.info.yml +++ b/modules/oe_theme_content_person/oe_theme_content_person.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Person Content type: module description: Companion module for the OE Content Person module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - extra_field:extra_field diff --git a/modules/oe_theme_content_policy/oe_theme_content_policy.info.yml b/modules/oe_theme_content_policy/oe_theme_content_policy.info.yml index cb81c51a5..158888e08 100644 --- a/modules/oe_theme_content_policy/oe_theme_content_policy.info.yml +++ b/modules/oe_theme_content_policy/oe_theme_content_policy.info.yml @@ -2,6 +2,6 @@ name: OpenEuropa Theme Policy Content type: module description: Companion module for the OE Content Policy module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - oe_content:oe_content_policy diff --git a/modules/oe_theme_content_project/oe_theme_content_project.info.yml b/modules/oe_theme_content_project/oe_theme_content_project.info.yml index a037d60c8..22f1c9e05 100644 --- a/modules/oe_theme_content_project/oe_theme_content_project.info.yml +++ b/modules/oe_theme_content_project/oe_theme_content_project.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Project Content type: module description: Companion module for the OE Content Project module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - extra_field:extra_field - field_group:field_group diff --git a/modules/oe_theme_content_publication/oe_theme_content_publication.info.yml b/modules/oe_theme_content_publication/oe_theme_content_publication.info.yml index 181d0428c..1b00c021d 100644 --- a/modules/oe_theme_content_publication/oe_theme_content_publication.info.yml +++ b/modules/oe_theme_content_publication/oe_theme_content_publication.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Publication Content type: module description: Companion module for the OE Content Publication module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - extra_field:extra_field - oe_content:oe_content_publication diff --git a/modules/oe_theme_content_sub_entity_document_reference/oe_theme_content_sub_entity_document_reference.info.yml b/modules/oe_theme_content_sub_entity_document_reference/oe_theme_content_sub_entity_document_reference.info.yml index 88d19859f..d35d22aa4 100644 --- a/modules/oe_theme_content_sub_entity_document_reference/oe_theme_content_sub_entity_document_reference.info.yml +++ b/modules/oe_theme_content_sub_entity_document_reference/oe_theme_content_sub_entity_document_reference.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Document reference type: module description: Companion module for the OE Content Entity Document reference module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - oe_content:oe_content_sub_entity_document_reference - oe_theme:oe_theme_content_publication diff --git a/modules/oe_theme_demo/oe_theme_demo.info.yml b/modules/oe_theme_demo/oe_theme_demo.info.yml index a7d2f4f91..f0323e023 100644 --- a/modules/oe_theme_demo/oe_theme_demo.info.yml +++ b/modules/oe_theme_demo/oe_theme_demo.info.yml @@ -1,7 +1,7 @@ name: OpenEuropa Theme Demo description: OpenEuropa Theme Demo type: module -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 package: OpenEuropa dependencies: - drupal:block diff --git a/modules/oe_theme_helper/oe_theme_helper.info.yml b/modules/oe_theme_helper/oe_theme_helper.info.yml index 13091aa01..98ea5d105 100644 --- a/modules/oe_theme_helper/oe_theme_helper.info.yml +++ b/modules/oe_theme_helper/oe_theme_helper.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Helper type: module description: OpenEuropa theme helpers and tools. package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - drupal:node - ui_patterns:ui_patterns_library diff --git a/modules/oe_theme_helper/tests/modules/oe_theme_inpage_navigation_test/oe_theme_inpage_navigation_test.info.yml b/modules/oe_theme_helper/tests/modules/oe_theme_inpage_navigation_test/oe_theme_inpage_navigation_test.info.yml index c71da874a..5d27acc6d 100644 --- a/modules/oe_theme_helper/tests/modules/oe_theme_inpage_navigation_test/oe_theme_inpage_navigation_test.info.yml +++ b/modules/oe_theme_helper/tests/modules/oe_theme_inpage_navigation_test/oe_theme_inpage_navigation_test.info.yml @@ -2,6 +2,6 @@ name: 'OpenEuropa Theme In-page Navigation Test' type: module description: 'Module for testing in-page navigation functionality' package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - oe_theme:oe_theme_helper diff --git a/modules/oe_theme_helper/tests/modules/page_header_metadata_test/page_header_metadata_test.info.yml b/modules/oe_theme_helper/tests/modules/page_header_metadata_test/page_header_metadata_test.info.yml index 81377660a..6dd714ce1 100644 --- a/modules/oe_theme_helper/tests/modules/page_header_metadata_test/page_header_metadata_test.info.yml +++ b/modules/oe_theme_helper/tests/modules/page_header_metadata_test/page_header_metadata_test.info.yml @@ -3,4 +3,4 @@ type: module description: 'PageHeaderMetadata test module.' package: Testing version: VERSION -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 diff --git a/modules/oe_theme_helper/tests/src/Kernel/Plugin/Field/FieldFormatter/MediaGalleryFormatterTest.php b/modules/oe_theme_helper/tests/src/Kernel/Plugin/Field/FieldFormatter/MediaGalleryFormatterTest.php index 800e2a2ba..bfa1736b9 100644 --- a/modules/oe_theme_helper/tests/src/Kernel/Plugin/Field/FieldFormatter/MediaGalleryFormatterTest.php +++ b/modules/oe_theme_helper/tests/src/Kernel/Plugin/Field/FieldFormatter/MediaGalleryFormatterTest.php @@ -213,18 +213,10 @@ public function testFormatter(): void { $this->assertEmpty($caption->filter('.ecl-gallery__meta')->html()); // Test the second gallery item. - if (version_compare(\Drupal::VERSION, '10.1', '>=')) { - $this->assertStringStartsWith( - 'http://localhost/media/oembed?url=https%3A//www.youtube.com/watch%3Fv%3D1-g73ty9v04&max_width=0&max_height=0&hash=', - $items->eq(1)->filter('.ecl-gallery__item-link')->attr('data-ecl-gallery-item-embed-src') - ); - } - else { - $this->assertStringStartsWith( - '/media/oembed?url=https%3A//www.youtube.com/watch%3Fv%3D1-g73ty9v04&max_width=0&max_height=0&hash=', - $items->eq(1)->filter('.ecl-gallery__item-link')->attr('data-ecl-gallery-item-embed-src') - ); - } + $this->assertStringStartsWith( + 'http://localhost/media/oembed?url=https%3A//www.youtube.com/watch%3Fv%3D1-g73ty9v04&max_width=0&max_height=0&hash=', + $items->eq(1)->filter('.ecl-gallery__item-link')->attr('data-ecl-gallery-item-embed-src') + ); $expected_thumbnail_name = 'FRPRzhRHyt8zGp5-d-luvJDnIb03oXDJUp5LtL4UeDI.jpg'; @@ -320,18 +312,10 @@ public function testFormatter(): void { $this->assertStringContainsString($image_media->label(), $caption->html()); // Test the second gallery item. - if (version_compare(\Drupal::VERSION, '10.1', '>=')) { - $this->assertStringStartsWith( - 'http://localhost/media/oembed?url=https%3A//www.youtube.com/watch%3Fv%3D1-g73ty9v04&max_width=0&max_height=0&hash=', - $items->eq(1)->filter('.ecl-gallery__item-link')->attr('data-ecl-gallery-item-embed-src') - ); - } - else { - $this->assertStringStartsWith( - '/media/oembed?url=https%3A//www.youtube.com/watch%3Fv%3D1-g73ty9v04&max_width=0&max_height=0&hash=', - $items->eq(1)->filter('.ecl-gallery__item-link')->attr('data-ecl-gallery-item-embed-src') - ); - } + $this->assertStringStartsWith( + 'http://localhost/media/oembed?url=https%3A//www.youtube.com/watch%3Fv%3D1-g73ty9v04&max_width=0&max_height=0&hash=', + $items->eq(1)->filter('.ecl-gallery__item-link')->attr('data-ecl-gallery-item-embed-src') + ); $image_node = $items->eq(1)->filter('img'); $this->assertEquals('', $image_node->attr('alt')); $this->assertStringContainsString( diff --git a/modules/oe_theme_list_pages/oe_theme_list_pages.info.yml b/modules/oe_theme_list_pages/oe_theme_list_pages.info.yml index e9de24258..07cf8b59c 100644 --- a/modules/oe_theme_list_pages/oe_theme_list_pages.info.yml +++ b/modules/oe_theme_list_pages/oe_theme_list_pages.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme List Pages type: module description: Companion module for the OE List Pages module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - extra_field:extra_field - oe_list_pages:oe_list_page_content_type diff --git a/modules/oe_theme_paragraphs_banner/oe_theme_paragraphs_banner.info.yml b/modules/oe_theme_paragraphs_banner/oe_theme_paragraphs_banner.info.yml index 15d49a59b..3fe9d0b60 100644 --- a/modules/oe_theme_paragraphs_banner/oe_theme_paragraphs_banner.info.yml +++ b/modules/oe_theme_paragraphs_banner/oe_theme_paragraphs_banner.info.yml @@ -2,6 +2,6 @@ name: OpenEuropa Theme Paragraphs Banner type: module description: Companion module for the OE Paragraphs Banner module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - oe_paragraphs:oe_paragraphs_banner diff --git a/modules/oe_theme_paragraphs_contact/oe_theme_paragraphs_contact.info.yml b/modules/oe_theme_paragraphs_contact/oe_theme_paragraphs_contact.info.yml index 586855c8b..92e7e80a9 100644 --- a/modules/oe_theme_paragraphs_contact/oe_theme_paragraphs_contact.info.yml +++ b/modules/oe_theme_paragraphs_contact/oe_theme_paragraphs_contact.info.yml @@ -2,7 +2,7 @@ name: OpenEuropa Theme Paragraphs Contact type: module description: Companion module for the OE Paragraphs Contact module package: OpenEuropa -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 dependencies: - oe_paragraphs:oe_paragraphs_contact - oe_theme:oe_theme_content_entity_contact diff --git a/modules/oe_theme_test/oe_theme_test.info.yml b/modules/oe_theme_test/oe_theme_test.info.yml index beee7f8b3..864ecb145 100644 --- a/modules/oe_theme_test/oe_theme_test.info.yml +++ b/modules/oe_theme_test/oe_theme_test.info.yml @@ -4,7 +4,7 @@ description: 'OpenEuropa theme test module.' package: OpenEuropa hidden: true version: VERSION -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 config_devel: install: diff --git a/tests/modules/oe_theme_js_test/oe_theme_js_test.info.yml b/tests/modules/oe_theme_js_test/oe_theme_js_test.info.yml index 2d23ca040..97298ee4e 100644 --- a/tests/modules/oe_theme_js_test/oe_theme_js_test.info.yml +++ b/tests/modules/oe_theme_js_test/oe_theme_js_test.info.yml @@ -1,5 +1,5 @@ name: 'OpenEuropa Theme Javascript Test' description: 'Support module for Javascript related tests.' type: module -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 package: Testing diff --git a/tests/modules/oe_theme_patterns_render_test/oe_theme_patterns_render_test.info.yml b/tests/modules/oe_theme_patterns_render_test/oe_theme_patterns_render_test.info.yml index 5bcb20507..18f80644f 100644 --- a/tests/modules/oe_theme_patterns_render_test/oe_theme_patterns_render_test.info.yml +++ b/tests/modules/oe_theme_patterns_render_test/oe_theme_patterns_render_test.info.yml @@ -1,3 +1,3 @@ name: 'OpenEuropa Theme patterns render test' type: module -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 diff --git a/tests/src/Kernel/ContactRenderTest.php b/tests/src/Kernel/ContactRenderTest.php index e31ff7d95..7695a420f 100644 --- a/tests/src/Kernel/ContactRenderTest.php +++ b/tests/src/Kernel/ContactRenderTest.php @@ -14,6 +14,7 @@ * * @group batch2 */ +#[\AllowDynamicProperties] class ContactRenderTest extends ContentRenderTestBase { /** diff --git a/tests/themes/oe_theme_subtheme_test/oe_theme_subtheme_test.info.yml b/tests/themes/oe_theme_subtheme_test/oe_theme_subtheme_test.info.yml index 626612348..0a188a023 100755 --- a/tests/themes/oe_theme_subtheme_test/oe_theme_subtheme_test.info.yml +++ b/tests/themes/oe_theme_subtheme_test/oe_theme_subtheme_test.info.yml @@ -1,5 +1,5 @@ name: 'OpenEuropa Theme subtheme test' type: theme version: VERSION -core_version_requirement: ^9.4 || ^10 +core_version_requirement: ^10 base theme: oe_theme From f2e6cf19e3d52af3844a75e000aed79bed73e291 Mon Sep 17 00:00:00 2001 From: 22Alexandra Date: Wed, 13 Dec 2023 17:46:38 +0200 Subject: [PATCH 2/2] EWPP-3831: Replace unavailable youtube remote video. --- tests/src/Functional/ContentNewsRenderTest.php | 6 +++--- tests/src/Functional/ParagraphsTest.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/src/Functional/ContentNewsRenderTest.php b/tests/src/Functional/ContentNewsRenderTest.php index d50b64239..30a04b079 100644 --- a/tests/src/Functional/ContentNewsRenderTest.php +++ b/tests/src/Functional/ContentNewsRenderTest.php @@ -207,7 +207,7 @@ public function testNewsRendering(): void { $media = $this->getStorage('media')->create([ 'bundle' => 'remote_video', 'oe_media_oembed_video' => [ - 'value' => 'https://www.youtube.com/watch?v=1-g73ty9v04', + 'value' => 'https://www.youtube.com/watch?v=7gngmXxdmyI', ], ]); $media->save(); @@ -217,12 +217,12 @@ public function testNewsRendering(): void { $video = $this->assertSession()->elementExists('css', 'div.ecl-media-container__media iframe', $media_container); $partial_video_url = Url::fromRoute('media.oembed_iframe', [], [ 'query' => [ - 'url' => 'https://www.youtube.com/watch?v=1-g73ty9v04', + 'url' => 'https://www.youtube.com/watch?v=7gngmXxdmyI', ], ])->toString(); $this->assertStringContainsString($partial_video_url, $video->getAttribute('src')); $this->assertStringContainsString('200', $video->getAttribute('width')); - $this->assertStringContainsString('150', $video->getAttribute('height')); + $this->assertStringContainsString('113', $video->getAttribute('height')); // Unpublish the media and assert it is not rendered anymore. $media->set('status', 0); diff --git a/tests/src/Functional/ParagraphsTest.php b/tests/src/Functional/ParagraphsTest.php index 951626caf..c03909062 100644 --- a/tests/src/Functional/ParagraphsTest.php +++ b/tests/src/Functional/ParagraphsTest.php @@ -166,7 +166,7 @@ public function testMediaParagraphCaching(): void { $media = $media_storage->create([ 'bundle' => 'remote_video', 'oe_media_oembed_video' => [ - 'value' => 'https://www.youtube.com/watch?v=1-g73ty9v04', + 'value' => 'https://www.youtube.com/watch?v=7gngmXxdmyI', ], ]); $media->save(); @@ -176,7 +176,7 @@ public function testMediaParagraphCaching(): void { $this->getSession()->reload(); $partial_iframe_url = Url::fromRoute('media.oembed_iframe', [], [ 'query' => [ - 'url' => 'https://www.youtube.com/watch?v=1-g73ty9v04', + 'url' => 'https://www.youtube.com/watch?v=7gngmXxdmyI', ], ])->toString(); $this->assertSession()->elementAttributeContains('css', 'figure.ecl-media-container__figure div.ecl-media-container__media iframe', 'src', $partial_iframe_url);