Skip to content

Commit 768cfc4

Browse files
authored
Use Drupal 10. (#105)
* Use Drupal 10. * Test only on PHP 8.1. * Matomo patch. * Update openseadragon. * PHP 8.2. * Use drupal namespace for islandora modules.
1 parent 4061aa8 commit 768cfc4

File tree

4 files changed

+2478
-2378
lines changed

4 files changed

+2478
-2378
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
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
15+
php-versions: [ 8.1, 8.2 ]
1616

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

assets/patches/matomo-3363521-7.patch

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
From da80d90705ca385addf6e68d16459d6433a2b8b0 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Ignacio=20D=C3=ADaz-Roncero?=
3+
4+
Date: Tue, 30 May 2023 10:49:24 +0000
5+
Subject: [PATCH] Add check for Role
6+
7+
---
8+
matomo.install | 19 +++++++++++--------
9+
1 file changed, 11 insertions(+), 8 deletions(-)
10+
11+
diff --git a/matomo.install b/matomo.install
12+
index 021b86b..a2ef178 100644
13+
--- a/matomo.install
14+
+++ b/matomo.install
15+
@@ -9,6 +9,7 @@ declare(strict_types = 1);
16+
17+
use Drupal\Core\Url;
18+
use Drupal\user\Entity\Role;
19+
+use Drupal\user\RoleInterface;
20+
21+
/**
22+
* Implements hook_install().
23+
@@ -16,14 +17,16 @@ use Drupal\user\Entity\Role;
24+
function matomo_install(): void {
25+
// Make the default install more user and GDPR friendly.
26+
$role = Role::load('authenticated');
27+
- $role->grantPermission('opt-in or out of matomo tracking');
28+
- $success = $role->save();
29+
- if ($success) {
30+
- $messenger = \Drupal::messenger();
31+
- $messenger->addMessage(t('Module %module granted %permission permission to authenticated users.', [
32+
- '%module' => 'Matomo Analytics',
33+
- '%permission' => t('Opt-in or out of tracking'),
34+
- ]), 'status');
35+
+ if ($role instanceof RoleInterface) {
36+
+ $role->grantPermission('opt-in or out of matomo tracking');
37+
+ $success = $role->save();
38+
+ if ($success) {
39+
+ $messenger = \Drupal::messenger();
40+
+ $messenger->addMessage(t('Module %module granted %permission permission to authenticated users.', [
41+
+ '%module' => 'Matomo Analytics',
42+
+ '%permission' => t('Opt-in or out of tracking'),
43+
+ ]), 'status');
44+
+ }
45+
}
46+
47+
if (\Drupal::moduleHandler()->moduleExists('views')) {
48+
--
49+
GitLab
50+

composer.json

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,38 +24,31 @@
2424
"type": "zip"
2525
}
2626
}
27-
},
28-
{
29-
"type": "package",
30-
"package": {
31-
"name": "islandora/advanced_search",
32-
"version": "2.0.0-beta3",
33-
"type": "drupal-module",
34-
"source": {
35-
"url": "https://github.com/digitalutsc/advanced_search",
36-
"type": "git",
37-
"reference":"2.0.0-beta3"
38-
}
39-
}
4027
}
4128
],
4229
"require": {
4330
"php": "^7.4 || ^8",
4431
"composer/installers": "^1.9",
4532
"cweagans/composer-patches": "^1.7",
4633
"drupal/admin_toolbar": "^3.1",
34+
"drupal/advanced_search": "^2.0.0@beta",
4735
"drupal/better_exposed_filters": "^6.0",
4836
"drupal/bibcite": "^2.0@beta",
4937
"drupal/citation_select": "^1.0@beta",
50-
"drupal/core-composer-scaffold": "^9.4",
51-
"drupal/core-recommended": "^9.4",
38+
"drupal/config_update": "^2.0@alpha",
39+
"drupal/context": "^5@RC",
40+
"drupal/controlled_access_terms": "^2",
41+
"drupal/core-composer-scaffold": "^10.1",
42+
"drupal/core-recommended": "^10.1",
5243
"drupal/facets": "^2",
5344
"drupal/field_group": "^3",
5445
"drupal/field_permissions": "^1",
5546
"drupal/field_report": "^2.1",
5647
"drupal/flysystem": "^2.0@alpha",
5748
"drupal/hal": "^1.0||^2.0",
49+
"drupal/islandora": "^2.8.1",
5850
"drupal/matomo": "^1.19",
51+
"drupal/openseadragon": "^2",
5952
"drupal/pdf": "^1.1",
6053
"drupal/rest_oai_pmh": "^2.0@beta",
6154
"drupal/search_api_solr": "^4.2",
@@ -65,12 +58,8 @@
6558
"drupal/twig_tweak": "^3.2",
6659
"drupal/views_data_export": "^1.2",
6760
"drupal/views_field_view": "^1.0@beta",
68-
"drush/drush": "^10.3",
61+
"drush/drush": "^12",
6962
"islandora-rdm/islandora_fits": "dev-8.x-1.x as 1.x-dev",
70-
"islandora/advanced_search": "^2.0.0@beta",
71-
"islandora/controlled_access_terms": "^2",
72-
"islandora/islandora": "^2.8.1",
73-
"islandora/openseadragon": "^2",
7463
"islandora/views_nested_details": "^1.0",
7564
"library/pdf.js": "^2.4",
7665
"mjordan/islandora_workbench_integration": "dev-main"
@@ -89,10 +78,7 @@
8978
"drupal/core-composer-scaffold": true,
9079
"dealerdirect/phpcodesniffer-composer-installer": true
9180
},
92-
"sort-packages": true,
93-
"platform": {
94-
"php": "7.4"
95-
}
81+
"sort-packages": true
9682
},
9783
"extra": {
9884
"drupal-scaffold": {
@@ -136,7 +122,11 @@
136122
"type:drupal-custom-theme"
137123
]
138124
},
139-
"patches": {}
125+
"patches": {
126+
"drupal/matomo": {
127+
"Allow install from existing config": "assets/patches/matomo-3363521-7.patch"
128+
}
129+
}
140130
},
141131
"scripts": {
142132
"post-root-package-install": ["Islandora\\StarterSite::rootPackageInstall"]

0 commit comments

Comments
 (0)