diff --git a/floating_block.info.yml b/floating_block.info.yml index bd1f85872bb6edabab39405542528e63e3fe7dad..54f2876f5f602cbc0e578ca945c2174c19962928 100755 --- a/floating_block.info.yml +++ b/floating_block.info.yml @@ -1,8 +1,7 @@ name: Floating Block type: module description: Allows regions of the site to float. -core: 8.x -core_version_requirement: ^8 || ^9 +core_version_requirement: ^9.3 || ^10 dependencies: - drupal:block configure: admin/config/user-interface/floating-block diff --git a/floating_block.module b/floating_block.module index bedf16d522705f03f2023835302ac4020d035e72..b7e8bc176033baa44633a4c1f4317d1e91f802c9 100755 --- a/floating_block.module +++ b/floating_block.module @@ -60,7 +60,7 @@ function floating_block_library_info() { 'title' => 'Floating Block', 'version' => 0.1, 'js' => [ - drupal_get_path('module', 'floating_block') . '/floating_block.js' => [], + \Drupal::service('extension.list.module')->getPath('floating_block') . '/floating_block.js' => [], ], 'dependencies' => [ ['system', 'jquery'], diff --git a/src/Helper.php b/src/Helper.php index 8ee3864c2edff68e741bb843ff94749827458d7c..0fe17ef115cd54093099e5fcd946c493641ca6d1 100644 --- a/src/Helper.php +++ b/src/Helper.php @@ -16,7 +16,7 @@ class Helper implements HelperInterface { return []; } - $floating_blocks = preg_split("/(\r\n|\n)/", $floating_block_data, NULL, PREG_SPLIT_NO_EMPTY); + $floating_blocks = preg_split("/(\r\n|\n)/", $floating_block_data, -1, PREG_SPLIT_NO_EMPTY); $output = []; foreach ($floating_blocks as $floating_block) { diff --git a/tests/src/Functional/Form/SettingsFormTest.php b/tests/src/Functional/Form/SettingsFormTest.php index cdae2c652671e7516201408b191d215d31cee674..f93ec8191c15c55606325b79347f873deecaa315 100644 --- a/tests/src/Functional/Form/SettingsFormTest.php +++ b/tests/src/Functional/Form/SettingsFormTest.php @@ -30,7 +30,7 @@ class SettingsFormTest extends BrowserTestBase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); // Create an user with admin privileges. diff --git a/tests/src/Functional/InstallTest.php b/tests/src/Functional/InstallTest.php index 43d2574b5090b0f9577836caf7cff68bbd0fcc77..8b61d936ce219448057946dcbbfec94ff21ed068 100644 --- a/tests/src/Functional/InstallTest.php +++ b/tests/src/Functional/InstallTest.php @@ -38,7 +38,7 @@ class InstallTest extends BrowserTestBase { /** * {@inheritdoc} */ - public function setUp() { + public function setUp(): void { parent::setUp(); $this->moduleInstaller = $this->container->get('module_installer'); $this->moduleHandler = $this->container->get('module_handler'); @@ -60,7 +60,7 @@ class InstallTest extends BrowserTestBase { // Make sure that by default the config page is not accessible. $this->drupalGet('admin/config/user-interface/floating-block'); - $this->assertResponse(403, 'No access to the Floating Block settings form.'); + $this->assertSession()->statusCodeEquals(403, 'No access to the Floating Block settings form.'); } } diff --git a/tests/src/Unit/HelperTest.php b/tests/src/Unit/HelperTest.php index 26d7d4e34cc27fde777be8ede2ed5d62865d59c0..1a0bb0d308bc1a7e86fef3bcd8e94969eeb7678a 100644 --- a/tests/src/Unit/HelperTest.php +++ b/tests/src/Unit/HelperTest.php @@ -21,7 +21,7 @@ class HelperTest extends UnitTestCase { /** * {@inheritdoc} */ - protected function setUp() { + protected function setUp(): void { parent::setUp(); $this->helper = new Helper();