Skip to content

Commit

Permalink
Use Drupal 10. (#105)
Browse files Browse the repository at this point in the history
* Use Drupal 10.
* Test only on PHP 8.1.
* Matomo patch.
* Update openseadragon.
* PHP 8.2.
* Use drupal namespace for islandora modules.
  • Loading branch information
rosiel authored Jul 28, 2023
1 parent 4061aa8 commit 768cfc4
Show file tree
Hide file tree
Showing 4 changed files with 2,478 additions and 2,378 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: [ 7.4, 8.1 ] # 8.2 may not be possible until we upgrade to D10. https://www.drupal.org/docs/system-requirements/php-requirements
php-versions: [ 8.1, 8.2 ]

name: PHP ${{ matrix.php-versions }}

Expand Down
50 changes: 50 additions & 0 deletions assets/patches/matomo-3363521-7.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
From da80d90705ca385addf6e68d16459d6433a2b8b0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ignacio=20D=C3=ADaz-Roncero?=
<17740-idiaz.roncero@users.noreply.drupalcode.org>
Date: Tue, 30 May 2023 10:49:24 +0000
Subject: [PATCH] Add check for Role

---
matomo.install | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/matomo.install b/matomo.install
index 021b86b..a2ef178 100644
--- a/matomo.install
+++ b/matomo.install
@@ -9,6 +9,7 @@ declare(strict_types = 1);

use Drupal\Core\Url;
use Drupal\user\Entity\Role;
+use Drupal\user\RoleInterface;

/**
* Implements hook_install().
@@ -16,14 +17,16 @@ use Drupal\user\Entity\Role;
function matomo_install(): void {
// Make the default install more user and GDPR friendly.
$role = Role::load('authenticated');
- $role->grantPermission('opt-in or out of matomo tracking');
- $success = $role->save();
- if ($success) {
- $messenger = \Drupal::messenger();
- $messenger->addMessage(t('Module %module granted %permission permission to authenticated users.', [
- '%module' => 'Matomo Analytics',
- '%permission' => t('Opt-in or out of tracking'),
- ]), 'status');
+ if ($role instanceof RoleInterface) {
+ $role->grantPermission('opt-in or out of matomo tracking');
+ $success = $role->save();
+ if ($success) {
+ $messenger = \Drupal::messenger();
+ $messenger->addMessage(t('Module %module granted %permission permission to authenticated users.', [
+ '%module' => 'Matomo Analytics',
+ '%permission' => t('Opt-in or out of tracking'),
+ ]), 'status');
+ }
}

if (\Drupal::moduleHandler()->moduleExists('views')) {
--
GitLab

40 changes: 15 additions & 25 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,31 @@
"type": "zip"
}
}
},
{
"type": "package",
"package": {
"name": "islandora/advanced_search",
"version": "2.0.0-beta3",
"type": "drupal-module",
"source": {
"url": "https://github.com/digitalutsc/advanced_search",
"type": "git",
"reference":"2.0.0-beta3"
}
}
}
],
"require": {
"php": "^7.4 || ^8",
"composer/installers": "^1.9",
"cweagans/composer-patches": "^1.7",
"drupal/admin_toolbar": "^3.1",
"drupal/advanced_search": "^2.0.0@beta",
"drupal/better_exposed_filters": "^6.0",
"drupal/bibcite": "^2.0@beta",
"drupal/citation_select": "^1.0@beta",
"drupal/core-composer-scaffold": "^9.4",
"drupal/core-recommended": "^9.4",
"drupal/config_update": "^2.0@alpha",
"drupal/context": "^5@RC",
"drupal/controlled_access_terms": "^2",
"drupal/core-composer-scaffold": "^10.1",
"drupal/core-recommended": "^10.1",
"drupal/facets": "^2",
"drupal/field_group": "^3",
"drupal/field_permissions": "^1",
"drupal/field_report": "^2.1",
"drupal/flysystem": "^2.0@alpha",
"drupal/hal": "^1.0||^2.0",
"drupal/islandora": "^2.8.1",
"drupal/matomo": "^1.19",
"drupal/openseadragon": "^2",
"drupal/pdf": "^1.1",
"drupal/rest_oai_pmh": "^2.0@beta",
"drupal/search_api_solr": "^4.2",
Expand All @@ -65,12 +58,8 @@
"drupal/twig_tweak": "^3.2",
"drupal/views_data_export": "^1.2",
"drupal/views_field_view": "^1.0@beta",
"drush/drush": "^10.3",
"drush/drush": "^12",
"islandora-rdm/islandora_fits": "dev-8.x-1.x as 1.x-dev",
"islandora/advanced_search": "^2.0.0@beta",
"islandora/controlled_access_terms": "^2",
"islandora/islandora": "^2.8.1",
"islandora/openseadragon": "^2",
"islandora/views_nested_details": "^1.0",
"library/pdf.js": "^2.4",
"mjordan/islandora_workbench_integration": "dev-main"
Expand All @@ -89,10 +78,7 @@
"drupal/core-composer-scaffold": true,
"dealerdirect/phpcodesniffer-composer-installer": true
},
"sort-packages": true,
"platform": {
"php": "7.4"
}
"sort-packages": true
},
"extra": {
"drupal-scaffold": {
Expand Down Expand Up @@ -136,7 +122,11 @@
"type:drupal-custom-theme"
]
},
"patches": {}
"patches": {
"drupal/matomo": {
"Allow install from existing config": "assets/patches/matomo-3363521-7.patch"
}
}
},
"scripts": {
"post-root-package-install": ["Islandora\\StarterSite::rootPackageInstall"]
Expand Down
Loading

0 comments on commit 768cfc4

Please sign in to comment.