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

EWPP-2903: Update to PHP8.1 and D9.4. #1233

Merged
merged 9 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 10 additions & 10 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pipeline:
include: tag
matrix:
COMPOSER_BOUNDARY: highest
PHP_VERSION: 7.4
PHP_VERSION: "8.0"
sergepavle marked this conversation as resolved.
Show resolved Hide resolved

github-release:
image: registry.fpfis.eu/drone-plugins/github-release
Expand All @@ -144,24 +144,24 @@ pipeline:
include: tag
matrix:
COMPOSER_BOUNDARY: highest
PHP_VERSION: 7.4
PHP_VERSION: "8.0"
sergepavle marked this conversation as resolved.
Show resolved Hide resolved

matrix:
include:
- { PHP_VERSION: 7.4, COMPOSER_BOUNDARY: lowest, TYPE: behat }
- { PHP_VERSION: 7.4, COMPOSER_BOUNDARY: lowest, TYPE: phpunit, BATCH: batch1 }
- { PHP_VERSION: 7.4, COMPOSER_BOUNDARY: lowest, TYPE: phpunit, BATCH: batch2 }
- { PHP_VERSION: 7.4, COMPOSER_BOUNDARY: lowest, TYPE: phpunit, BATCH: batch3 }
- { PHP_VERSION: 8.0, COMPOSER_BOUNDARY: lowest, TYPE: behat }
- { PHP_VERSION: 8.0, COMPOSER_BOUNDARY: lowest, TYPE: phpunit, BATCH: batch1 }
- { PHP_VERSION: 8.0, COMPOSER_BOUNDARY: lowest, TYPE: phpunit, BATCH: batch2 }
- { PHP_VERSION: 8.0, COMPOSER_BOUNDARY: lowest, TYPE: phpunit, BATCH: batch3 }
- { PHP_VERSION: 8.1, COMPOSER_BOUNDARY: lowest, TYPE: behat }
- { PHP_VERSION: 8.1, COMPOSER_BOUNDARY: lowest, TYPE: phpunit, BATCH: batch1 }
- { PHP_VERSION: 8.1, COMPOSER_BOUNDARY: lowest, TYPE: phpunit, BATCH: batch2 }
- { PHP_VERSION: 8.1, COMPOSER_BOUNDARY: lowest, TYPE: phpunit, BATCH: batch3 }

- { PHP_VERSION: 7.4, COMPOSER_BOUNDARY: highest, TYPE: behat }
- { PHP_VERSION: 7.4, COMPOSER_BOUNDARY: highest, TYPE: phpunit, BATCH: batch1 }
- { PHP_VERSION: 7.4, COMPOSER_BOUNDARY: highest, TYPE: phpunit, BATCH: batch2 }
- { PHP_VERSION: 7.4, COMPOSER_BOUNDARY: highest, TYPE: phpunit, BATCH: batch3 }
- { PHP_VERSION: 8.0, COMPOSER_BOUNDARY: highest, TYPE: behat }
- { PHP_VERSION: 8.0, COMPOSER_BOUNDARY: highest, TYPE: phpunit, BATCH: batch1 }
- { PHP_VERSION: 8.0, COMPOSER_BOUNDARY: highest, TYPE: phpunit, BATCH: batch2 }
- { PHP_VERSION: 8.0, COMPOSER_BOUNDARY: highest, TYPE: phpunit, BATCH: batch3 }
- { PHP_VERSION: 8.1, COMPOSER_BOUNDARY: highest, TYPE: behat }
- { PHP_VERSION: 8.1, COMPOSER_BOUNDARY: highest, TYPE: phpunit, BATCH: batch1 }
- { PHP_VERSION: 8.1, COMPOSER_BOUNDARY: highest, TYPE: phpunit, BATCH: batch2 }
- { PHP_VERSION: 8.1, COMPOSER_BOUNDARY: highest, TYPE: phpunit, BATCH: batch3 }
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Drupal 8 and 9 theme based on the [Europa Component Library][1] (ECL).

This depends on the following software:

* [PHP 7.4 or 8.0](http://php.net/)
* [PHP 8.0 or 8.1](http://php.net/)

## Installation

Expand Down
2 changes: 1 addition & 1 deletion behat.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ default:
home: "/en"
extensions:
Drupal\MinkExtension:
goutte: ~
browserkit_http: ~
ajax_timeout: 10
browser_name: 'chrome'
javascript_session: 'selenium2'
Expand Down
81 changes: 52 additions & 29 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,60 +6,74 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": ">=7.4",
"php": ">=8.0",
"cweagans/composer-patches": "~1.4",
"drupal/core": "^9.3",
"drupal/core": "^9.4",
"drupal/smart_trim": "^1.2",
"drupal/twig_field_value": "^2.0",
"drupal/ui_patterns": "^1.0",
"drupal/ui_patterns": "^1.4",
"openeuropa/ecl-twig-loader": "^3.1",
"openeuropa/oe_time_caching": "~1.0"
"openeuropa/oe_time_caching": "dev-master"
},
"require-dev": {
"behat/behat": "^3.10",
"behat/mink-extension": "^2.3.1",
"behat/mink-selenium2-driver": "^1.5",
"composer/installers": "~1.5",
"drupal/address": "~1.9",
"doctrine/collections": "^1.8",
sergepavle marked this conversation as resolved.
Show resolved Hide resolved
"drupal/address": "~1.11",
"drupal/composite_reference": "^2.1",
"drupal/config_devel": "~1.2",
"drupal/core-composer-scaffold": "^9.3",
"drupal/core-dev": "^9.3",
"drupal/core-composer-scaffold": "^9.4",
"drupal/core-utility": "^9.4",
"drupal/ctools": "^3.7",
"drupal/datetime_range_timezone": "~1.0.0-alpha2",
"drupal/datetime_testing": "^1.0",
"drupal/description_list_field": "^1.0",
"drupal/drupal-driver": "^2.1.1",
"drupal/drupal-extension": "~4.0",
"drupal/drupal-extension": "dev-master as 4.0",
"drupal/emr": "~1.0-beta9",
"drupal/entity_browser": "^2.5",
"drupal/entity_reference_revisions": "~1.3",
"drupal/extra_field": "^2.1",
"drupal/field_group": "~3.2",
"drupal/inline_entity_form": "~1.0-rc12",
"drupal/json_field": "1.0-rc4",
"drupal/json_field": "^1.2",
"drupal/renderviz": "^1.0@alpha",
"drupal/styleguide": "~1.0@beta",
"drupal/token": "^1.10",
"drupal/typed_link": "^2.0",
"drush/drush": "~10.3",
"fabpot/goutte": "^3.3",
"drush/drush": "~11.1",
"friends-of-behat/service-container-extension": "^1.0",
"guzzlehttp/guzzle": "^7.0",
"instaclick/php-webdriver": "^1.4.7",
"masterminds/html5": "^2.7.6",
"mikey179/vfsstream": "^1.6.10",
"nikic/php-parser": "^4.12.0",
"openeuropa/behat-transformation-context": "~0.1",
"openeuropa/code-review": "^2.0",
"openeuropa/oe_contact_forms": "^1.5",
"openeuropa/oe_content": "^3.0.0-alpha6",
"openeuropa/oe_corporate_blocks": "^4.11",
"openeuropa/oe_corporate_countries": "~2.0",
"openeuropa/oe_media": "^1.19",
"openeuropa/oe_multilingual": "^1.10",
"openeuropa/oe_paragraphs": "^1.14",
"openeuropa/behat-transformation-context": "dev-master",
"openeuropa/code-review": "2.x-dev",
"openeuropa/oe_contact_forms": "dev-master",
"openeuropa/oe_content": "3.x-dev",
"openeuropa/oe_corporate_blocks": "4.x-dev",
"openeuropa/oe_corporate_countries": "2.x-dev",
"openeuropa/oe_media": "dev-master",
"openeuropa/oe_multilingual": "dev-master",
"openeuropa/oe_paragraphs": "dev-master",
"openeuropa/oe_search": "^1.9",
"openeuropa/oe_webtools": "^1.15",
"openeuropa/rdf_skos": "^1.0",
"openeuropa/task-runner-drupal-project-symlink": "^1.0-beta5",
"openeuropa/oe_webtools": "dev-master",
"openeuropa/rdf_skos": "1.x-dev",
"openeuropa/task-runner-drupal-project-symlink": "1.x-dev",
"phpspec/prophecy-phpunit": "^2",
"symfony/dom-crawler": "^4.4.12"
"symfony/browser-kit": "^4.4.37",
"symfony/console": "^4.4.30",
"symfony/css-selector": "^4.4.24",
"symfony/dom-crawler": "^4.4.44",
"symfony/finder": "^4.4.30",
"symfony/http-foundation": "^4.4.30",
"symfony/phpunit-bridge": "^6.0",
"symfony/process": "^4.4.30",
"symfony/routing": "^4.4.30",
"symfony/validator": "^4.4.30",
"symfony/yaml": "^4.4.29"
},
"scripts": {
"post-install-cmd": "./vendor/bin/run drupal:site-setup",
Expand All @@ -81,6 +95,10 @@
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
},
"media_avportal": {
"type": "git",
"url": "https://github.com/openeuropa/media_avportal"
}
},
"extra": {
Expand Down Expand Up @@ -109,11 +127,16 @@
}
},
"_readme": [
"Explicit minimum version requirement of drupal/ctools module due to D9.3 compatability.",
"Explicit minimum version requirement of drupal/ctools module due to D9.4 compatability.",
"Explicit minimum version requirement of behat library due to PHP compatibility.",
"Explicit minimum version requirement of fabpot/goutte due to Drupal 9.3 compatability.",
"Explicit minimum version requirement for symfony/dom-crawler due to its lower versions using the deprecated function libxml_disable_entity_loader() in PHP8.",
"Locking json_field until https://www.drupal.org/project/json_field/issues/3314641 is fixed and released."
"Explicit minimum version requirement of symfony packages due to lower versions missing return type on various methods being incompatible with PHP 8.1 parent methods.",
"Use master branch of drupal/drupal-extension to replace fabpot/goutte with behat/mink-browserkit-driver and the rest of the behat required dependencies.",
"Explicit minimum version requirement of symfony/phpunit-bridge to replace drupal/core-dev testing classes and traits.",
"Explicit minimum version requirement of mikey179/vfsstream due to lower versions missing return type on vfsStreamDirectory::getIterator() method.",
"Explicit minimum version requirement of masterminds/html5 due to lower versions passing NULL parameters instead of string when calling DOMImplementation::createDocument() method.",
"Explicit minimum version requirement of guzzlehttp/guzzle due to lower versions missing return type on CookieJar::getIterator() and CookieJar::count() methods.",
"Explicit minimum version requirement of doctrine/collections due to lower versions missing return type on ArrayCollection::count() methods.",
"Explicit requirement of token module due to lower versions declaring optional parameters before the require one on token_tokens() function."
]
},
"config": {
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.0
image: fpfis/httpd-php-dev:8.1
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.3
core_version_requirement: ^9.4
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.3
core_version_requirement: ^9.4
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.3
core_version_requirement: ^9.4
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.3
core_version_requirement: ^9.4

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.3
core_version_requirement: ^9.4

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.3
core_version_requirement: ^9.4

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.3
core_version_requirement: ^9.4

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.3
core_version_requirement: ^9.4
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.3
core_version_requirement: ^9.4
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.3
core_version_requirement: ^9.4
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.3
core_version_requirement: ^9.4
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.3
core_version_requirement: ^9.4
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.3
core_version_requirement: ^9.4

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.3
core_version_requirement: ^9.4
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.3
core_version_requirement: ^9.4
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.3
core_version_requirement: ^9.4
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.3
core_version_requirement: ^9.4
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.3
core_version_requirement: ^9.4
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.3
core_version_requirement: ^9.4
dependencies:
- drupal:node
- ui_patterns:ui_patterns_library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ protected function viewElement(AddressInterface $address, $langcode) {
*/
protected function extractAddressItems(string $string, array $replacements): array {
// Make sure the replacements don't have any unneeded newlines.
$replacements = array_map('trim', $replacements);
array_walk($replacements, function (&$value) {
$value = trim($value ?? '');
});
$string = strtr($string, $replacements);
// Remove noise caused by empty placeholders.
$lines = explode("\n", $string);
Expand All @@ -147,9 +149,7 @@ protected function extractAddressItems(string $string, array $replacements): arr
$lines[$index] = $line;
}
// Remove empty lines.
$lines = array_filter($lines);

return $lines;
return array_filter($lines);
}

}
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.3
core_version_requirement: ^9.4
dependencies:
- oe_theme:oe_theme_helper
Loading