diff --git a/src/Form/MicroThemeFormSettings.php b/src/Form/MicroThemeFormSettings.php
index 5db974d..d1f128f 100644
--- a/src/Form/MicroThemeFormSettings.php
+++ b/src/Form/MicroThemeFormSettings.php
@@ -184,7 +184,7 @@ class MicroThemeFormSettings extends ConfigFormBase {
       '#description' => $this->t('You could select below some fonts available on <a href="@url" target="_blank">Google Font</a>', ['@url' => 'https://fonts.google.com/'])
     ];
 
-    $example_file_fonts = drupal_get_path('module', 'micro_theme') . '/css/example_fonts.css';
+    $example_file_fonts = \Drupal::service('extension.list.module')->getPath('micro_theme') . '/css/example_fonts.css';
     $form['font']['file_font'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Fonts file css'),
@@ -243,7 +243,7 @@ class MicroThemeFormSettings extends ConfigFormBase {
       '#default_value' => $this->settings['color']['override_color'],
     ];
 
-    $example_file_colors = drupal_get_path('module', 'micro_theme') . '/css/example_colors.css';
+    $example_file_colors = \Drupal::service('extension.list.module')->getPath('micro_theme') . '/css/example_colors.css';
     $form['color']['file_color'] = [
       '#type' => 'textfield',
       '#title' => $this->t('Colors file css'),
@@ -348,8 +348,8 @@ class MicroThemeFormSettings extends ConfigFormBase {
     $config = $this->config('system.theme');
     $default_theme = $this->config('system.theme')->get('default');
     $path = theme_get_setting('logo.path', $default_theme);
-    $logo_path = file_create_url(theme_get_setting('logo.path', $default_theme));
-    $relative_logo_path = file_url_transform_relative($logo_path);
+    $logo_path = \Drupal::service('file_url_generator')->generateAbsoluteString(theme_get_setting('logo.path', $default_theme));
+    $relative_logo_path = \Drupal::service('file_url_generator')->transformRelative($logo_path);
     return  $relative_logo_path;
   }
 
diff --git a/src/MicroLibrariesService.php b/src/MicroLibrariesService.php
index 43a6a79..5642092 100644
--- a/src/MicroLibrariesService.php
+++ b/src/MicroLibrariesService.php
@@ -185,7 +185,7 @@ class MicroLibrariesService implements MicroLibrariesServiceInterface {
    * @return mixed
    */
   public function getDefaultColors() {
-    $yaml_default_color_path = \Drupal::root() . '/' . drupal_get_path('module', 'micro_theme') . '/micro_theme.default_color.yml';
+    $yaml_default_color_path = \Drupal::root() . '/' . \Drupal::service('extension.list.module')->getPath('micro_theme') . '/micro_theme.default_color.yml';
     $file_content = file_get_contents($yaml_default_color_path);
     $yaml_default_color = Yaml::decode($file_content);
     $this->moduleHandler->alter('micro_theme_default_color', $yaml_default_color);
diff --git a/tests/src/Functional/LoadTest.php b/tests/src/Functional/LoadTest.php
index b4fe03c..b2cd1d0 100644
--- a/tests/src/Functional/LoadTest.php
+++ b/tests/src/Functional/LoadTest.php
@@ -29,7 +29,7 @@ class LoadTest extends MicroSiteBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->user = $this->drupalCreateUser(['administer site configuration']);
     $this->drupalLogin($this->user);
