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-3025: Drupal 10 compatibility. #1273

Merged
merged 23 commits into from
Jun 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3d43880
EWPP-3025: Add D10 to supported core versions.
brummbar May 24, 2023
2e83a78
EWPP-3025: Use D10 compatible dependency versions.
brummbar May 24, 2023
22dcfdf
EWPP-3025: Disable php-http/discovery plugin.
brummbar May 24, 2023
8da8f67
EWPP-3025: Class has been moved in new major.
brummbar May 24, 2023
87aba73
EWPP-3025: Limit parameter must be a number.
brummbar May 24, 2023
4e89bff
EWPP-3025: TEMP - lower deps will be dropped so execute only highest.
brummbar May 24, 2023
faee9df
EWPP-3025: Add deprecation for calling smart_trim with a null length.
brummbar May 25, 2023
ec2cc81
EWPP-3025: D10 deprecation fixes.
brummbar May 25, 2023
76cf3cc
EWPP-3025: More D10 deprecation fixes.
brummbar May 25, 2023
093989b
EWPP-3025: Remove unneeded dependencies added to fix lower deps tests.
brummbar May 25, 2023
e50a1ed
EWPP-3025: Drop lower dependencies tests, tests targeted core versions.
brummbar May 25, 2023
745b384
EWPP-3025: App root service has been removed.
brummbar May 25, 2023
991c6ba
EWPP-3025: Stable theme has been moved to contrib.
brummbar May 25, 2023
bcde7dd
EWPP-3025: Use D10 themes.
brummbar May 25, 2023
659e605
EWPP-3025: Spaceless filter handles better new line stripping.
brummbar May 25, 2023
03e20f1
EWPP-3025: File url generator is now mandatory in the signature of pa…
brummbar May 25, 2023
ff4dbda
EWPP-3025: Test theme missing core version requirements.
brummbar May 25, 2023
8f5ec13
EWPP-3025: Fix tests.
brummbar May 25, 2023
1cae634
EWPP-3025: Ckeditor module has been moved to contrib.
brummbar May 25, 2023
1f0aa95
EWPP-3025: entity_reference was removed from D10.
brummbar May 25, 2023
d90e8b6
EWPP-3025: Data attribute was removed in D10.
brummbar May 25, 2023
6655ce9
EWPP-3025: Hook was renamed in D10.
brummbar May 25, 2023
20ac2c2
EWPP-3025: Alternative, backwards compatible approach.
brummbar May 25, 2023
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
56 changes: 17 additions & 39 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,31 +47,14 @@ pipeline:
- npm install --unsafe-perm
- NODE_ENV=production npm run build

composer-install-highest:
composer-install:
group: post-prepare
image: registry.fpfis.eu/fpfis/httpd-php:${PHP_VERSION}-ci
volumes:
- /cache:/cache
commands:
- composer self-update --2
- composer install --ansi --no-progress
when:
matrix:
COMPOSER_BOUNDARY: highest

composer-update-lowest:
group: post-prepare
image: registry.fpfis.eu/fpfis/httpd-php:${PHP_VERSION}-ci
volumes:
- /cache:/cache
commands:
- composer self-update --2
- composer update --prefer-lowest --ansi --no-progress
when:
event:
exclude: tag
matrix:
COMPOSER_BOUNDARY: lowest
- composer require drupal/core:~${CORE_VERSION} drupal/core-composer-scaffold:~${CORE_VERSION} --update-with-all-dependencies --ansi --no-progress --no-interaction

site-install:
image: registry.fpfis.eu/fpfis/httpd-php:${PHP_VERSION}-ci
Expand All @@ -92,8 +75,6 @@ pipeline:
when:
event:
exclude: tag
matrix:
COMPOSER_BOUNDARY: highest

phpunit:
group: test
Expand Down Expand Up @@ -130,7 +111,7 @@ pipeline:
event:
include: tag
matrix:
COMPOSER_BOUNDARY: highest
CORE_VERSION: "9.4.0"
PHP_VERSION: "8.0"

github-release:
Expand All @@ -143,25 +124,22 @@ pipeline:
event:
include: tag
matrix:
COMPOSER_BOUNDARY: highest
CORE_VERSION: "9.4.0"
PHP_VERSION: "8.0"

matrix:
include:
- { 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: 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.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 }
- { 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 }
80 changes: 26 additions & 54 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,72 +8,55 @@
"require": {
"php": ">=8.0",
"cweagans/composer-patches": "~1.4",
"drupal/core": "^9.4",
"drupal/smart_trim": "^1.2",
"drupal/core": "^9.4 || ^10",
"drupal/smart_trim": "^2",
"drupal/stable": "^2.0",
"drupal/twig_field_value": "^2.0",
"drupal/ui_patterns": "^1.5",
"openeuropa/ecl-twig-loader": "^3.1",
"openeuropa/oe_time_caching": "^1.4"
"openeuropa/oe_time_caching": "^1.5"
},
"require-dev": {
"behat/behat": "^3.10",
"behat/mink-selenium2-driver": "^1.5",
"composer/installers": "~1.5",
"doctrine/collections": "^1.8",
"drupal/address": "~1.11",
"drupal/ckeditor": "^1.0",
"drupal/composite_reference": "^2.1",
"drupal/config_devel": "~1.2",
"drupal/core-composer-scaffold": "^9.4",
"drupal/core-utility": "^9.4",
"drupal/ctools": "^3.7",
"drupal/datetime_range_timezone": "~1.0.0-alpha2",
"drupal/config_devel": "^1.9",
"drupal/core-composer-scaffold": "^9.4 || ^10",
"drupal/core-utility": "^9.4 || ^10",
"drupal/datetime_range_timezone": "^1.0.0-alpha4",
"drupal/datetime_testing": "^1.0",
"drupal/description_list_field": "^1.0",
"drupal/drupal-driver": "^2.1.1",
"drupal/drupal-extension": "dev-master as 4.0",
"drupal/emr": "~1.0-beta9",
"drupal/drupal-extension": "^5.0",
"drupal/emr": "^1.3",
"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-rc15",
"drupal/json_field": "^1.2",
"drupal/renderviz": "^1.0@alpha",
"drupal/styleguide": "~1.0@beta",
"drupal/token": "^1.10",
"drupal/styleguide": "^2.1.1",
"drupal/typed_link": "^2.0",
"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.2",
"openeuropa/code-review": "^2.0.0-alpha6",
"openeuropa/oe_contact_forms": "^1.10",
"openeuropa/oe_content": "^3.0.0-alpha9",
"openeuropa/oe_corporate_blocks": "^4.11",
"openeuropa/oe_corporate_countries": "^2.0.0-alpha6",
"openeuropa/oe_media": "^1.22",
"openeuropa/oe_multilingual": "dev-master",
"openeuropa/oe_paragraphs": "^1.17",
"openeuropa/oe_search": "^1.9",
"openeuropa/oe_webtools": "^1.21",
"openeuropa/rdf_skos": "^1.0.0-alpha9",
"openeuropa/oe_contact_forms": "^1.11",
"openeuropa/oe_content": "^3.0.0-alpha11",
"openeuropa/oe_corporate_blocks": "^4.13",
"openeuropa/oe_corporate_countries": "^2.0.0-alpha8",
"openeuropa/oe_media": "^1.23.1",
"openeuropa/oe_multilingual": "^1.13",
"openeuropa/oe_paragraphs": "^1.19",
"openeuropa/oe_search": "^2.0@beta",
"openeuropa/oe_webtools": "^1.23",
"openeuropa/rdf_skos": "^1.0.0-alpha10",
"openeuropa/task-runner-drupal-project-symlink": "^1.0.0-beta6",
"phpspec/prophecy-phpunit": "^2",
"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"
"symfony/phpunit-bridge": "^6.0"
},
"scripts": {
"post-install-cmd": "./vendor/bin/run drupal:site-setup",
Expand Down Expand Up @@ -125,19 +108,7 @@
"locations": {
"web-root": "./build"
}
},
"_readme": [
"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 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": {
"sort-packages": true,
Expand All @@ -146,7 +117,8 @@
"drupal/core-composer-scaffold": true,
"cweagans/composer-patches": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpro/grumphp": true
"phpro/grumphp": true,
"php-http/discovery": false
}
}
}
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
core_version_requirement: ^9.4 || ^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
core_version_requirement: ^9.4 || ^10
dependencies:
- extra_field:extra_field
- field_group:field_group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Updates the teaser view display.
*/
function oe_theme_content_call_proposals_post_update_00001(): void {
$storage = new FileStorage(drupal_get_path('module', 'oe_theme_content_call_proposals') . '/config/post_updates/00001_update_teaser_view_display');
$storage = new FileStorage(\Drupal::service('extension.list.module')->getPath('oe_theme_content_call_proposals') . '/config/post_updates/00001_update_teaser_view_display');

$display_values = $storage->read('core.entity_view_display.node.oe_call_proposals.teaser');
$storage = \Drupal::entityTypeManager()->getStorage('entity_view_display');
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
core_version_requirement: ^9.4 || ^10
dependencies:
- extra_field:extra_field
- field_group:field_group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Create the 'full' entity view display on the call for tenders CT.
*/
function oe_theme_content_call_tenders_post_update_00001() {
$storage = new FileStorage(drupal_get_path('module', 'oe_theme_content_call_tenders') . '/config/post_updates/00001_create_full_view_display');
$storage = new FileStorage(\Drupal::service('extension.list.module')->getPath('oe_theme_content_call_tenders') . '/config/post_updates/00001_create_full_view_display');

$entity_type_manager = \Drupal::entityTypeManager();
$config = $storage->read('core.entity_view_display.node.oe_call_tenders.full');
Expand All @@ -39,7 +39,7 @@ function oe_theme_content_call_tenders_post_update_00001() {
* Updates the teaser view display.
*/
function oe_theme_content_call_tenders_post_update_00002(): void {
$storage = new FileStorage(drupal_get_path('module', 'oe_theme_content_call_tenders') . '/config/post_updates/00002_update_teaser_view_display');
$storage = new FileStorage(\Drupal::service('extension.list.module')->getPath('oe_theme_content_call_tenders') . '/config/post_updates/00002_update_teaser_view_display');

$display_values = $storage->read('core.entity_view_display.node.oe_call_tenders.teaser');
$storage = \Drupal::entityTypeManager()->getStorage('entity_view_display');
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
core_version_requirement: ^9.4 || ^10

dependencies:
- drupal:datetime
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Updates the teaser view display.
*/
function oe_theme_content_consultation_post_update_00001(): void {
$storage = new FileStorage(drupal_get_path('module', 'oe_theme_content_consultation') . '/config/post_updates/00001_update_teaser_view_display');
$storage = new FileStorage(\Drupal::service('extension.list.module')->getPath('oe_theme_content_consultation') . '/config/post_updates/00001_update_teaser_view_display');

$display_values = $storage->read('core.entity_view_display.node.oe_consultation.teaser');
$storage = \Drupal::entityTypeManager()->getStorage('entity_view_display');
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
core_version_requirement: ^9.4 || ^10

dependencies:
- oe_theme:oe_theme_helper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Update "Default" and "Details" Contact entity view displays.
*/
function oe_theme_content_entity_contact_post_update_00001(): void {
$storage = new FileStorage(drupal_get_path('module', 'oe_theme_content_entity_contact') . '/config/post_updates/00001_update_view_display');
$storage = new FileStorage(\Drupal::service('extension.list.module')->getPath('oe_theme_content_entity_contact') . '/config/post_updates/00001_update_view_display');

// View display configurations to update.
$displays = [
Expand All @@ -40,7 +40,7 @@ function oe_theme_content_entity_contact_post_update_00001(): void {
* Create the oe_contact 'full' view mode.
*/
function oe_theme_content_entity_contact_post_update_00002(): void {
$storage = new FileStorage(drupal_get_path('module', 'oe_theme_content_entity_contact') . '/config/post_updates/00002_create_full_view_display');
$storage = new FileStorage(\Drupal::service('extension.list.module')->getPath('oe_theme_content_entity_contact') . '/config/post_updates/00002_create_full_view_display');

$config_manager = \Drupal::service('config.manager');
$entity_type_manager = \Drupal::entityTypeManager();
Expand Down Expand Up @@ -70,7 +70,7 @@ function oe_theme_content_entity_contact_post_update_00002(): void {
* Add Link field to the "Full" and "Details" Contact entity view displays.
*/
function oe_theme_content_entity_contact_post_update_00003(): void {
$storage = new FileStorage(drupal_get_path('module', 'oe_theme_content_entity_contact') . '/config/post_updates/00003_full_view_display_link_field');
$storage = new FileStorage(\Drupal::service('extension.list.module')->getPath('oe_theme_content_entity_contact') . '/config/post_updates/00003_full_view_display_link_field');

// View display configurations to update.
$displays = [
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
core_version_requirement: ^9.4 || ^10

dependencies:
- oe_theme:oe_theme_helper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Create the oe_organisation 'full' view mode.
*/
function oe_theme_content_entity_organisation_post_update_00001(): void {
$storage = new FileStorage(drupal_get_path('module', 'oe_theme_content_entity_organisation') . '/config/post_updates/00001_create_full_view_display');
$storage = new FileStorage(\Drupal::service('extension.list.module')->getPath('oe_theme_content_entity_organisation') . '/config/post_updates/00001_create_full_view_display');

$config_manager = \Drupal::service('config.manager');
$entity_type_manager = \Drupal::entityTypeManager();
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
core_version_requirement: ^9.4 || ^10

dependencies:
- oe_theme:oe_theme_helper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Create the oe_venue 'full' view mode.
*/
function oe_theme_content_entity_venue_post_update_00001(): void {
$storage = new FileStorage(drupal_get_path('module', 'oe_theme_content_entity_venue') . '/config/post_updates/00001_create_full_view_display');
$storage = new FileStorage(\Drupal::service('extension.list.module')->getPath('oe_theme_content_entity_venue') . '/config/post_updates/00001_create_full_view_display');

$config_manager = \Drupal::service('config.manager');
$entity_type_manager = \Drupal::entityTypeManager();
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
core_version_requirement: ^9.4 || ^10
dependencies:
- extra_field:extra_field
- oe_content:oe_content_event
Expand Down
Loading