diff --git a/composer.json b/composer.json index a676dee..2d5fbba 100644 --- a/composer.json +++ b/composer.json @@ -7,8 +7,8 @@ "prefer-stable": true, "require": { "drupal/entity": "^1.0", - "drupal/filelog": "^2.1", "drupal/health_check": "^3.0", + "drupal/raven": "^4.0 || ^5.0", "firebase/php-jwt": "^6.5", "php": "^8.1", "t4web/composer-lock-parser": "^1.0", diff --git a/helfi_api_base.info.yml b/helfi_api_base.info.yml index 6d67590..16daa20 100644 --- a/helfi_api_base.info.yml +++ b/helfi_api_base.info.yml @@ -1,8 +1,9 @@ name: HELfi api base module type: module package: Custom -core_version_requirement: ^9 || ^10 +core_version_requirement: ^9 || ^10 || ^11 dependencies: - drupal:migrate - entity:entity - health_check:health_check + - raven:raven diff --git a/helfi_api_base.install b/helfi_api_base.install index 7241317..372815f 100644 --- a/helfi_api_base.install +++ b/helfi_api_base.install @@ -218,3 +218,19 @@ function helfi_api_base_update_9015() : void { catch (\InvalidArgumentException) { } } + +/** + * Install raven module. + */ +function helfi_api_base_update_9016() : void { + Drupal::service('module_installer')->install([ + 'raven', + ]); + Drupal::configFactory()->getEditable('raven.settings') + ->set('drush_error_handler', TRUE) + ->set('request_tracing', TRUE) + ->set('traces_sample_rate', 0.2) + ->set('database_tracing', TRUE) + ->set('twig_tracing', TRUE) + ->save(); +} diff --git a/helfi_api_base.services.yml b/helfi_api_base.services.yml index b367294..299333c 100644 --- a/helfi_api_base.services.yml +++ b/helfi_api_base.services.yml @@ -28,6 +28,7 @@ services: Drupal\helfi_api_base\EventSubscriber\DisableUserPasswordSubscriber: ~ Drupal\helfi_api_base\Features\FeatureManager: ~ + Drupal\helfi_api_base\Environment\EnvironmentResolverInterface: '@helfi_api_base.environment_resolver' Drupal\helfi_api_base\Environment\EnvironmentResolver: '@helfi_api_base.environment_resolver' helfi_api_base.environment_resolver: class: Drupal\helfi_api_base\Environment\EnvironmentResolver