Skip to content

Commit

Permalink
Merge pull request #1353 from openeuropa/EWPP-3831
Browse files Browse the repository at this point in the history
EWPP-3831: Update to PHP 8.2 and drop support for D9.4.
  • Loading branch information
22Alexandra authored Dec 14, 2023
2 parents eb83445 + f2e6cf1 commit 77ab92b
Show file tree
Hide file tree
Showing 35 changed files with 67 additions and 77 deletions.
33 changes: 19 additions & 14 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/oe_theme_demo/oe_theme_demo.info.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/oe_theme_helper/oe_theme_helper.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ type: module
description: 'PageHeaderMetadata test module.'
package: Testing
version: VERSION
core_version_requirement: ^9.4 || ^10
core_version_requirement: ^10
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion modules/oe_theme_list_pages/oe_theme_list_pages.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion modules/oe_theme_test/oe_theme_test.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion tests/modules/oe_theme_js_test/oe_theme_js_test.info.yml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: 'OpenEuropa Theme patterns render test'
type: module
core_version_requirement: ^9.4 || ^10
core_version_requirement: ^10
6 changes: 3 additions & 3 deletions tests/src/Functional/ContentNewsRenderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down
Loading

0 comments on commit 77ab92b

Please sign in to comment.