Skip to content

Commit

Permalink
Add PHP 8.2 <strike>and Drupal 10.2</strike> to testing matrix (#987)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
rosiel authored Nov 1, 2023
1 parent 572ffcf commit d5556f4
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-2.x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ["8.1"]
php-versions: ["8.1", "8.2"]
# test-suite functional-javascript will appear to pass but will skip tests; missing chromedriver.
test-suite: ["kernel", "functional", "functional-javascript"]
drupal-version: ["9.5.x", "10.0.x", "10.1.x"]
drupal-version: ["10.0.x", "10.1.x"] # Fails on 10.2 until https://github.com/Islandora/islandora/issues/989 is resolved.
mysql: ["8.0"]
allowed_failure: [false]

Expand Down
1 change: 0 additions & 1 deletion config/install/islandora.settings.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
broker_url: 'tcp://localhost:61613'
jwt_expiry: '+2 hour'
gemini_url: ''
delete_media_and_files: TRUE
gemini_pseudo_bundles: []
3 changes: 0 additions & 3 deletions config/schema/islandora.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ islandora.settings:
upload_form_allowed_mimetypes:
type: string
label: 'Upload Form Allowed Extensions'
gemini_url:
type: uri
label: 'Url to Gemini microservice'
gemini_pseudo_bundles:
type: sequence
label: 'List of node, media and taxonomy terms that should include the linked Fedora URI'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,9 @@ protected function viewValue(FieldItemInterface $item) {
$fileItem = $item->getValue();
$file = $this->entityTypeManager->getStorage('file')->load($fileItem['target_id']);
$contents = file_get_contents($file->getFileUri());
if (mb_detect_encoding($contents) != 'UTF-8') {
$contents = utf8_encode($contents);
$detected_encoding = mb_detect_encoding($contents);
if ($detected_encoding != 'UTF-8') {
$contents = mb_convert_encoding($contents, 'UTF-8', $detected_encoding);
}
$contents = nl2br($contents);
return $contents;
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/EventGeneratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function setUp(): void {

$test_type = NodeType::create([
'type' => 'test_type',
'label' => 'Test Type',
'name' => 'Test Type',
]);
$test_type->save();

Expand Down

0 comments on commit d5556f4

Please sign in to comment.