diff --git a/layoutcomponents.module b/layoutcomponents.module
index a3c67ca..3180b5c 100755
--- a/layoutcomponents.module
+++ b/layoutcomponents.module
@@ -4,7 +4,7 @@
  * @file
  * Contains layoutcomponents.module.
  */
-
+use Drupal\Core\Asset\AttachedAssetsInterface;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
 use Drupal\Core\Entity\EntityInterface;
@@ -133,7 +133,7 @@ function layoutcomponents_entity_type_alter(array &$entity_types) {
 /**
  * Implements hook_css_alter().
  */
-function layoutcomponents_css_alter(&$css, \Drupal\Core\Asset\AttachedAssetsInterface $assets) {
+function layoutcomponents_css_alter(&$css, AttachedAssetsInterface $assets) {
   $route = \Drupal::routeMatch()->getRouteObject();
   $parameters = $route->getOption('parameters');
   if (isset($parameters)) {
diff --git a/modules/sliderwidget/tests/src/Functional/LoadTest.php b/modules/sliderwidget/tests/src/Functional/LoadTest.php
index e0056a8..61c41f9 100755
--- a/modules/sliderwidget/tests/src/Functional/LoadTest.php
+++ b/modules/sliderwidget/tests/src/Functional/LoadTest.php
@@ -17,7 +17,7 @@ class LoadTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['sliderwidget'];
+  protected static $modules = ['sliderwidget'];
 
   /**
    * A user with permission to administer site configuration.
@@ -29,7 +29,7 @@ class LoadTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->user = $this->drupalCreateUser(['administer site configuration']);
     $this->drupalLogin($this->user);
@@ -40,7 +40,7 @@ class LoadTest extends BrowserTestBase {
    */
   public function testLoad() {
     $this->drupalGet(Url::fromRoute('<front>'));
-    $this->assertResponse(200);
+    $this->assertSession()->statusCodeEquals(200);
   }
 
 }
diff --git a/src/LcLayoutRender.php b/src/LcLayoutRender.php
index 2406d15..24dc272 100644
--- a/src/LcLayoutRender.php
+++ b/src/LcLayoutRender.php
@@ -449,7 +449,7 @@ class LcLayoutRender {
         if ($media->bundle() == 'image') {
           $background_image_fid = $media->getSource()->getSourceFieldValue($media);
           $file = File::load($background_image_fid);
-          $url = Url::fromUri(file_create_url($file->getFileUri()))->getUri();
+          $url = \Drupal::service('file_url_generator')->generate($file->getFileUri())->getUri();
           if (!empty($url)) {
             if (boolval($background_image_full)) {
               // Background as normal image.
@@ -771,7 +771,7 @@ class LcLayoutRender {
         if ($media->bundle() == 'image') {
           $background_image_fid = $media->getSource()->getSourceFieldValue($media);
           $file = File::load($background_image_fid);
-          $url = Url::fromUri(file_create_url($file->getFileUri()))->getUri();
+          $url = \Drupal::service('file_url_generator')->generate($file->getFileUri())->getUri();
           if (!empty($url)) {
             if (boolval($background_image_full)) {
               // Background as normal image.
diff --git a/src/LcTheme.php b/src/LcTheme.php
index dd6f3cb..6a66e86 100755
--- a/src/LcTheme.php
+++ b/src/LcTheme.php
@@ -293,7 +293,7 @@ class LcTheme implements ContainerInjectionInterface {
         str_contains($theme_registry[$theme_hook]['template'], 'layout--layoutcomponents-base--')
       ) {
         // Include file.
-        $theme_registry[$theme_hook]['includes'][] = drupal_get_path('module', 'layoutcomponents') . '/layoutcomponents.theme.inc';
+        $theme_registry[$theme_hook]['includes'][] = \Drupal::service('extension.list.module')->getPath('layoutcomponents') . '/layoutcomponents.theme.inc';
         // Set new preprocess function.
         $theme_registry[$theme_hook]['preprocess functions'][] = '_layoutcomponents_preprocess_layout';
         $theme_registry[$theme_hook]['base hook'] = 'layout__layoutcomponents_base';
diff --git a/src/LcUpdateManager.php b/src/LcUpdateManager.php
index 53bd468..dc89642 100755
--- a/src/LcUpdateManager.php
+++ b/src/LcUpdateManager.php
@@ -58,7 +58,7 @@ class LcUpdateManager {
    *   The name of module.
    */
   public function updateConfig(array $config_names, $module) {
-    $config_path = drupal_get_path('module', $module) . '/config/install';
+    $config_path = \Drupal::service('extension.list.module')->getPath($module) . '/config/install';
     $source = new FileStorage($config_path);
 
     foreach ($config_names as $name) {
