Skip to content

Commit d5556f4

Browse files
authored
Add PHP 8.2 <strike>and Drupal 10.2</strike> to testing matrix (#987)
* Add PHP 8.2 and Drupal 10.2 to testing matrix * Use `name` key when creating test content type. * Remove `gemini_url` from schema. * Remove gemini_url from islandora.settings.yml * Update OcrTextFormatter.php * Remove Drupal 10.2 from matrix, known fail.
1 parent 572ffcf commit d5556f4

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

.github/workflows/build-2.x.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
php-versions: ["8.1"]
26+
php-versions: ["8.1", "8.2"]
2727
# test-suite functional-javascript will appear to pass but will skip tests; missing chromedriver.
2828
test-suite: ["kernel", "functional", "functional-javascript"]
29-
drupal-version: ["9.5.x", "10.0.x", "10.1.x"]
29+
drupal-version: ["10.0.x", "10.1.x"] # Fails on 10.2 until https://github.com/Islandora/islandora/issues/989 is resolved.
3030
mysql: ["8.0"]
3131
allowed_failure: [false]
3232

config/install/islandora.settings.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
broker_url: 'tcp://localhost:61613'
22
jwt_expiry: '+2 hour'
3-
gemini_url: ''
43
delete_media_and_files: TRUE
54
gemini_pseudo_bundles: []

config/schema/islandora.schema.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ islandora.settings:
2626
upload_form_allowed_mimetypes:
2727
type: string
2828
label: 'Upload Form Allowed Extensions'
29-
gemini_url:
30-
type: uri
31-
label: 'Url to Gemini microservice'
3229
gemini_pseudo_bundles:
3330
type: sequence
3431
label: 'List of node, media and taxonomy terms that should include the linked Fedora URI'

modules/islandora_text_extraction/src/Plugin/Field/FieldFormatter/OcrTextFormatter.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ protected function viewValue(FieldItemInterface $item) {
132132
$fileItem = $item->getValue();
133133
$file = $this->entityTypeManager->getStorage('file')->load($fileItem['target_id']);
134134
$contents = file_get_contents($file->getFileUri());
135-
if (mb_detect_encoding($contents) != 'UTF-8') {
136-
$contents = utf8_encode($contents);
135+
$detected_encoding = mb_detect_encoding($contents);
136+
if ($detected_encoding != 'UTF-8') {
137+
$contents = mb_convert_encoding($contents, 'UTF-8', $detected_encoding);
137138
}
138139
$contents = nl2br($contents);
139140
return $contents;

tests/src/Kernel/EventGeneratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function setUp(): void {
4949

5050
$test_type = NodeType::create([
5151
'type' => 'test_type',
52-
'label' => 'Test Type',
52+
'name' => 'Test Type',
5353
]);
5454
$test_type->save();
5555

0 commit comments

Comments
 (0)