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/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", 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" 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)) {