From 406c3c0b0c29c9bdd9d65ed1291bc6c43808b80f Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Wed, 16 Oct 2024 10:11:41 +0200 Subject: [PATCH 1/3] ITKDev: Updated drush version to match d10 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8e1325b..939da7e 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ "require": { "ext-curl": "*", "php": "^8.1", - "drush/drush": "^11.6" + "drush/drush": "^12.5" }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1", From 9021e98445a4c1242cf151b732d9e5727f557ecc Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Wed, 16 Oct 2024 10:28:57 +0200 Subject: [PATCH 2/3] ITKDev: Tried to update actions to use d10 --- scripts/code-analysis | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/code-analysis b/scripts/code-analysis index f3544cd..5d99444 100755 --- a/scripts/code-analysis +++ b/scripts/code-analysis @@ -12,9 +12,9 @@ drupal_composer() { composer --working-dir="$drupal_dir" --no-interaction "$@" } -# Create new Drupal 9 project +# Create new Drupal 10 project if [ ! -f "$drupal_dir/composer.json" ]; then - composer --no-interaction create-project drupal/recommended-project:^9 "$drupal_dir" + composer --no-interaction create-project drupal/recommended-project:^10 "$drupal_dir" fi # Copy our code into the modules folder mkdir -p "$drupal_dir/$module_path" From 446e1c79472448f26de87973a1445f0b91182871 Mon Sep 17 00:00:00 2001 From: Jesper Kristensen Date: Wed, 16 Oct 2024 10:33:47 +0200 Subject: [PATCH 3/3] ITKDev: Updated code style to match d10 --- CHANGELOG.md | 4 ++++ src/Controller/LocalTasksController.php | 2 +- src/Exception/AuditException.php | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97aed49..09df06f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +- Upgraded to support Drupal 10.x + +## [0.0.1] - 2024-08-20 + - First version of the module - Added submodule to log user CUD events. diff --git a/src/Controller/LocalTasksController.php b/src/Controller/LocalTasksController.php index 46a1dbf..c05dcee 100644 --- a/src/Controller/LocalTasksController.php +++ b/src/Controller/LocalTasksController.php @@ -47,7 +47,7 @@ public static function create(ContainerInterface $container): LocalTasksControll * @return array * An array containing the form definition. */ - public function dynamicTasks(string $type = NULL): array { + public function dynamicTasks(?string $type = NULL): array { if (empty($type)) { return $this->formBuilder->getForm('\Drupal\os2web_audit\Form\SettingsForm'); } diff --git a/src/Exception/AuditException.php b/src/Exception/AuditException.php index 1ebd9ee..b5344d4 100644 --- a/src/Exception/AuditException.php +++ b/src/Exception/AuditException.php @@ -16,7 +16,7 @@ class AuditException extends \Exception { */ private string $pluginName = 'Unknown plugin'; - public function __construct(string $message = "", int $code = 0, \Throwable $previous = NULL, ?string $pluginName = NULL) { + public function __construct(string $message = "", int $code = 0, ?\Throwable $previous = NULL, ?string $pluginName = NULL) { parent::__construct($message, $code, $previous); if (isset($pluginName)) {