diff --git a/composer.json b/composer.json index 6c0bc6e..f65fb38 100644 --- a/composer.json +++ b/composer.json @@ -13,11 +13,11 @@ } ], "require": { - "ml/json-ld": "^1.1", + "ml/json-ld": "^1.2", "mtdowling/jmespath.php":"^2.5", "strawberryfield/strawberryfield":"dev-8.x-1.0-beta3", "strawberryfield/format_strawberryfield":"dev-8.x-1.0-beta3", - "drupal/webform": "^5.9", + "drupal/webform": "^5.19", "drupal/webform_views": "^5.0" } } diff --git a/webform_strawberryfield.info.yml b/webform_strawberryfield.info.yml index 3cd7998..a124b51 100644 --- a/webform_strawberryfield.info.yml +++ b/webform_strawberryfield.info.yml @@ -2,12 +2,11 @@ name: Strawberry Field Webform Integration description: Provides Webform integrations to feed a field of Strawberries. package: Archipelago type: module -core: 8.x +core_version_requirement: ^8.8 || ^9 php: 7.1 dependencies: - 'drupal:field' - 'drupal:file' - - 'drupal:system (>= 8.7)' - 'drupal:user' - 'strawberryfield' - - 'webform:webform (>= 8.x-5.3)' + - 'webform:webform (>= 8.x-5.19)' diff --git a/webform_strawberryfield.module b/webform_strawberryfield.module index 6784ec9..6248bd2 100644 --- a/webform_strawberryfield.module +++ b/webform_strawberryfield.module @@ -340,20 +340,12 @@ function webform_strawberryfield_preprocess_webform_element_image_file( $iiifserversettings->get('pub_server_url'), $iiifserversettings->get('int_server_url') ); - // Deal with Drupal 8.8.x v/s 8.7 - if (method_exists( - \Drupal::service('stream_wrapper_manager'), - 'getTarget' - )) { - $iiifidentifier = urlencode( - \Drupal::service('stream_wrapper_manager')->getTarget( + // Deal with Drupal 8.8.x only now + $iiifidentifier = urlencode( + \Drupal::service('stream_wrapper_manager')->getTarget( $file->getFileUri() - ) - ); - } - else { - $iiifidentifier = urlencode(file_uri_target($file->getFileUri())); - } + ) + ); if ($iiifidentifier == NULL || empty($iiifidentifier)) { // Nothing to do, lets leave this untouched.