From 41d5c1534964e6110d6e597cf8f382b0e44f7069 Mon Sep 17 00:00:00 2001 From: andrew farquharson Date: Sat, 27 May 2023 11:54:10 +0100 Subject: [PATCH 1/3] drupal 10 compatibility fixes --- dicefield.info.yml | 4 +--- src/AverageRoll.php | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/dicefield.info.yml b/dicefield.info.yml index 874244c..392f088 100644 --- a/dicefield.info.yml +++ b/dicefield.info.yml @@ -2,8 +2,6 @@ name: Dice field type: module description: A way of specifying a dice value such as 1d6 or 2d8+3. package: Field types -version: 1.0 -core: 8.x - +core_version_requirement: ^9.4 || ^10 dependencies: - field diff --git a/src/AverageRoll.php b/src/AverageRoll.php index e2d3ed6..df1cbb7 100644 --- a/src/AverageRoll.php +++ b/src/AverageRoll.php @@ -7,7 +7,6 @@ namespace Drupal\dicefield; use Drupal\Component\Utility\SafeMarkup; -use Drupal\Component\Utility\String; use Drupal\Core\TypedData\DataDefinitionInterface; use Drupal\Core\TypedData\TypedDataInterface; use Drupal\Core\TypedData\TypedData; From 7b98b4dc07784f3761b15b3f49873a029c422e3d Mon Sep 17 00:00:00 2001 From: andrew farquharson Date: Sat, 27 May 2023 12:13:27 +0100 Subject: [PATCH 2/3] add version --- dicefield.info.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/dicefield.info.yml b/dicefield.info.yml index 392f088..9d00cd5 100644 --- a/dicefield.info.yml +++ b/dicefield.info.yml @@ -2,6 +2,7 @@ name: Dice field type: module description: A way of specifying a dice value such as 1d6 or 2d8+3. package: Field types +version: 2.x core_version_requirement: ^9.4 || ^10 dependencies: - field From cc19a7d8fe5746c9665ac2a2528431850318d2fe Mon Sep 17 00:00:00 2001 From: andrew farquharson Date: Sat, 27 May 2023 12:28:15 +0100 Subject: [PATCH 3/3] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 86b6fb3..19af7e7 100644 --- a/README.md +++ b/README.md @@ -2,3 +2,5 @@ An example Drupal 8 module to provide a custom "dice" field as a way of specifying a dice value such as 1d6 or 2d8+3. See http://www.ixis.co.uk/blog/drupal-8-creating-field-types-multiple-values + +The 10.1.x-dev branch has been tested on Drupal version 10.1.x-dev