diff --git a/php.info.yml b/php.info.yml
index 2f1800961dc560340f3c07184d1f3f3795f9b0e3..3834e48e96ec85af415f351410d973b0f634cd74 100644
--- a/php.info.yml
+++ b/php.info.yml
@@ -1,8 +1,7 @@
 name: PHP Filter
 type: module
 description: Allows embedded PHP code/snippets to be evaluated. Enabling this can cause security and performance issues as it allows users to execute PHP code on your site.
-core: 8.x
-core_version_requirement: ^8 || ^9
+core_version_requirement: ^9 || ^10
 package: 'Filters'
 configure: filter.admin_overview
 dependencies:
diff --git a/src/Tests/Condition/PhpConditionTest.php b/src/Tests/Condition/PhpConditionTest.php
index 96ad52b4ad7665524d7cb9101d6ac25e31774899..09a782733df4f7bfd766dfd69105734de1c0b4b9 100644
--- a/src/Tests/Condition/PhpConditionTest.php
+++ b/src/Tests/Condition/PhpConditionTest.php
@@ -23,12 +23,12 @@ class PhpConditionTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'system', 'php'];
+  protected static $modules = ['filter', 'system', 'php'];
 
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->manager = $this->container->get('plugin.manager.condition');
diff --git a/src/Tests/Functional/PhpAccessTest.php b/src/Tests/Functional/PhpAccessTest.php
index 7fd9618168e4c82ca8183f6d0167f38a33cfa23d..2c7bab4911b2439d337d02a46086d2463172033b 100644
--- a/src/Tests/Functional/PhpAccessTest.php
+++ b/src/Tests/Functional/PhpAccessTest.php
@@ -25,11 +25,11 @@ class PhpAccessTest extends PhpTestBase {
 
     // Make sure that the PHP code shows up as text.
     $this->drupalGet('node/' . $node->id());
-    $this->assertText('print', 'PHP code was not evaluated.');
+    $this->assertSession()->pageTextContains('print');
 
     // Make sure that user doesn't have access to filter.
     $this->drupalGet('node/' . $node->id() . '/edit');
-    $this->assertNoRaw('<option value="' . $this->phpCodeFormat->id() . '">', 'PHP code format not available.');
+    $this->assertSession()->responseNotContains('<option value="' . $this->phpCodeFormat->id() . '">');
   }
 
 }
diff --git a/src/Tests/Functional/PhpFilterTest.php b/src/Tests/Functional/PhpFilterTest.php
index 069f6dd2eea0295620d21baf097ad237a7db93dd..86b0e3be3508d7b2a56ab6b674ec1d708c69d14c 100644
--- a/src/Tests/Functional/PhpFilterTest.php
+++ b/src/Tests/Functional/PhpFilterTest.php
@@ -29,23 +29,24 @@ class PhpFilterTest extends PhpTestBase {
 
     // Make sure that the PHP code shows up as text.
     $this->drupalGet('node/' . $node->id());
-    $this->assertText('php print');
+    $this->assertSession()->pageTextContains('php print');
 
     // Change filter to PHP filter and see that PHP code is evaluated.
     $edit = [];
     $edit['body[0][format]'] = $this->phpCodeFormat->id();
-    $this->drupalPostForm('node/' . $node->id() . '/edit', $edit, t('Save'));
-    $this->assertRaw(t('@type %title has been updated.', ['@type' => 'Basic page', '%title' => $node->toLink($node->getTitle())->toString()]), 'PHP code filter turned on.');
+    $this->drupalGet('node/' . $node->id() . '/edit');
+    $this->submitForm($edit, t('Save'));
+    $this->assertSession()->responseContains(t('@type %title has been updated.', ['@type' => 'Basic page', '%title' => $node->toLink($node->getTitle())->toString()]));
 
     // Make sure that the PHP code shows up as text.
-    $this->assertNoText('print "SimpleTest PHP was executed!"', "PHP code isn't displayed.");
-    $this->assertText('SimpleTest PHP was executed!', 'PHP code has been evaluated.');
+    $this->assertSession()->pageTextNotContains('print "SimpleTest PHP was executed!"');
+    $this->assertSession()->pageTextContains('SimpleTest PHP was executed!');
 
     // Verify that cache is disabled for PHP evaluates.
-    $this->assertText('Current state is empty', 'PHP code has been evaluated once.');
+    $this->assertSession()->pageTextContains('Current state is empty');
     \Drupal::state()->set('php_state_test', 'not empty');
     $this->drupalGet('node/' . $node->id());
-    $this->assertText('Current state is not empty', 'PHP code has been evaluated again.');
+    $this->assertSession()->pageTextContains('Current state is not empty');
   }
 
 }
diff --git a/src/Tests/Functional/PhpTestBase.php b/src/Tests/Functional/PhpTestBase.php
index da256e39f0842a0d4184fe861c6dccaa35c0faec..1fde3c8d95f16791ab78abebbf24e3aa53753f89 100644
--- a/src/Tests/Functional/PhpTestBase.php
+++ b/src/Tests/Functional/PhpTestBase.php
@@ -17,14 +17,14 @@ abstract class PhpTestBase extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['node', 'php'];
+  protected static $modules = ['node', 'php'];
 
   protected $phpCodeFormat;
 
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     // Create Basic page node type.
@@ -38,7 +38,7 @@ abstract class PhpTestBase extends BrowserTestBase {
     $php_format_id = 'php_code';
     $this->phpCodeFormat = \Drupal::entityTypeManager()->getStorage('filter_format')->load($php_format_id);
 
-    $this->assertEqual($this->phpCodeFormat->label(), 'PHP code', 'PHP code text format was created.');
+    $this->assertEquals($this->phpCodeFormat->label(), 'PHP code', 'PHP code text format was created.');
 
     // Verify that the format has the PHP code filter enabled.
     $filters = $this->phpCodeFormat->filters();
@@ -46,12 +46,12 @@ abstract class PhpTestBase extends BrowserTestBase {
 
     // Verify that the format exists on the administration page.
     $this->drupalGet('admin/config/content/formats');
-    $this->assertText('PHP code', 'PHP code text format was created.');
+    $this->assertSession()->pageTextContains('PHP code');
 
     // Verify that anonymous and authenticated user roles do not have access.
     $this->drupalGet('admin/config/content/formats/manage/' . $php_format_id);
-    $this->assertFieldByName('roles[' . RoleInterface::ANONYMOUS_ID . ']', FALSE, 'Anonymous users do not have access to PHP code format.');
-    $this->assertFieldByName('roles[' . RoleInterface::AUTHENTICATED_ID . ']', FALSE, 'Authenticated users do not have access to PHP code format.');
+    $this->assertSession()->fieldValueEquals('roles[' . RoleInterface::ANONYMOUS_ID . ']', FALSE);
+    $this->assertSession()->fieldValueEquals('roles[' . RoleInterface::AUTHENTICATED_ID . ']', FALSE);
   }
 
   /**
diff --git a/src/Tests/Functional/PhpUninstallTest.php b/src/Tests/Functional/PhpUninstallTest.php
index 589271decb574c7685724cf597350248d7991285..8ffe3794a04934f41869b9cb7c5474944e73502f 100644
--- a/src/Tests/Functional/PhpUninstallTest.php
+++ b/src/Tests/Functional/PhpUninstallTest.php
@@ -16,12 +16,12 @@ class PhpUninstallTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['php'];
+  protected static $modules = ['php'];
 
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $permissions = [
@@ -46,10 +46,11 @@ class PhpUninstallTest extends BrowserTestBase {
     // Uninstall the module.
     $edit = [];
     $edit['uninstall[php]'] = TRUE;
-    $this->drupalPostForm('admin/modules/uninstall', $edit, t('Uninstall'));
-    $this->assertText(t('Would you like to continue with uninstalling the above?'));
-    $this->drupalPostForm(NULL, [], t('Uninstall'));
-    $this->assertText(t('The selected modules have been uninstalled.'));
+    $this->drupalGet('admin/modules/uninstall');
+    $this->submitForm($edit, t('Uninstall'));
+    $this->assertSession()->pageTextContains(t('Would you like to continue with uninstalling the above?'));
+    $this->submitForm([], t('Uninstall'));
+    $this->assertSession()->pageTextContains(t('The selected modules have been uninstalled.'));
   }
 
 }
diff --git a/src/Tests/Plugin/views/PhpArgumentValidatorTest.php b/src/Tests/Plugin/views/PhpArgumentValidatorTest.php
index c31fa6ca6e18355a14c2dad15bcc4e4c6df13cd9..70da2a675219d92d0700ac2f3db2d52029529b08 100644
--- a/src/Tests/Plugin/views/PhpArgumentValidatorTest.php
+++ b/src/Tests/Plugin/views/PhpArgumentValidatorTest.php
@@ -27,12 +27,12 @@ class PhpArgumentValidatorTest extends ViewsKernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['filter', 'php', 'php_views_test_config'];
+  protected static $modules = ['filter', 'php', 'php_views_test_config'];
 
   /**
    * {@inheritdoc}
    */
-  protected function setUp($import_test_views = TRUE) {
+  protected function setUp($import_test_views = TRUE): void {
     parent::setUp();
     if ($import_test_views) {
       ViewTestData::createTestViews(get_class($this), ['php_views_test_config']);