diff --git a/composer.json b/composer.json
index 7ebf1c7..204af5a 100644
--- a/composer.json
+++ b/composer.json
@@ -23,6 +23,6 @@
     "source": "http://cgit.drupalcode.org/contribute"
   },
   "require": {
-    "drupal/core": "^8.7.7 || ^9.0"
+    "drupal/core": "^9.3 || ^10"
   }
 }
diff --git a/contribute.info.yml b/contribute.info.yml
index 6de30bf..a2ca324 100644
--- a/contribute.info.yml
+++ b/contribute.info.yml
@@ -3,6 +3,6 @@ description: Encourages people to join and contribute to the Drupal community.
 package: Community
 
 type: module
-core_version_requirement: ^8.7.7 || ^9.0
+core_version_requirement: ^9.3 || ^10
 
 configure: contribute.settings
diff --git a/contribute.module b/contribute.module
index b63e697..878b619 100644
--- a/contribute.module
+++ b/contribute.module
@@ -30,7 +30,7 @@ function contribute_page_attachments(&$page) {
 
   $contribution = $contribute_manager->getContribution();
   if ($contribution  && !empty($contribution['status'])) {
-    $url = base_path() . drupal_get_path('module', 'contribute') . '/images/icons/drupal.svg';
+    $url = base_path() . \Drupal::service('extension.list.module')->getPath('contribute') . '/images/icons/drupal.svg';
     $value .= '#contribute-info-contribution:before {background-image: url(' . $url . ')}';
   }
   $page['#attached']['html_head'][] = [
diff --git a/tests/src/Functional/ContributeFunctionalTest.php b/tests/src/Functional/ContributeFunctionalTest.php
index f04bfac..f3d4689 100644
--- a/tests/src/Functional/ContributeFunctionalTest.php
+++ b/tests/src/Functional/ContributeFunctionalTest.php
@@ -40,20 +40,23 @@ class ContributeFunctionalTest extends BrowserTestBase {
       'account_type' => 'user',
       'user_id' => 'jrockowitz',
     ];
-    $this->drupalPostForm('/admin/reports/status/contribute/configure', $edit, $this->t('Save'));
+    $this->drupalGet('/admin/reports/status/contribute/configure');
+    $this->submitForm($edit, $this->t('Save'));
     $this->assertSession()->responseContains('Community information has been saved.');
     $this->assertSession()->responseContains('Community information');
     $this->assertSession()->responseNotContains('When you <a href="https://register.drupal.org/user/register">create a Drupal.org account</a>, you gain access to a whole ecosystem of Drupal.org sites and services.');
     $this->assertSession()->responseContains('<strong><a href="https://www.drupal.org/u/jrockowitz">Jacob Rockowitz</a></strong>');
+    $this->drupalGet('/admin/reports/status/contribute/configure');
 
     // Check that 'Community information' can be cleared.
-    $this->drupalPostForm('/admin/reports/status/contribute/configure', [], $this->t('Clear'));
+    $this->submitForm([], $this->t('Clear'));
     $this->assertSession()->responseContains('Community information has been cleared.');
     $this->assertSession()->responseNotContains('<strong><a href="https://www.drupal.org/u/jrockowitz">Jacob Rockowitz</a></strong>');
 
     // Check that 'Community information' can be disabled.
     $edit = ['disable' => TRUE];
-    $this->drupalPostForm('/admin/reports/status/contribute/configure', $edit, $this->t('Save'));
+    $this->drupalGet('/admin/reports/status/contribute/configure');
+    $this->submitForm($edit, $this->t('Save'));
     $this->assertSession()->responseContains('Community information has been disabled.');
 
     // Check that 'Community information' can be remove.
