diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 4aa0f7b..87bb7c7 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -15,9 +15,11 @@ jobs: fail-fast: true matrix: php: [8.1] - laravel: [9.*, 8.*,] + laravel: [10.*, 9.*, 8.*,] dependency-version: [prefer-lowest, prefer-stable] include: + - laravel: 10.* + testbench: 8.* - laravel: 9.* testbench: 7.* - laravel: 8.* diff --git a/composer.json b/composer.json index 0ea7fed..fe33c5f 100644 --- a/composer.json +++ b/composer.json @@ -20,15 +20,15 @@ ], "require": { "php": "^8.0|^8.1", - "illuminate/database": "^8.0|^9.0", - "illuminate/support": "^8.0|^9.0", + "illuminate/database": "^8.0|^9.0|^10.0", + "illuminate/support": "^8.0|^9.0|^10.0", "spatie/laravel-package-tools": "^1.2|^1.13" }, "require-dev": { "doctrine/dbal": "^3.5", "laravel/pint": "^1.2", "mockery/mockery": "^1.4.2", - "orchestra/testbench": "^6.5|^7.0", + "orchestra/testbench": "^6.5|^7.0|^8.0", "pestphp/pest": "^1.22", "pestphp/pest-plugin-laravel": "^1.3", "pestphp/pest-plugin-parallel": "^1.0|^1.2", diff --git a/tests/Feature/SettingsTest.php b/tests/Feature/SettingsTest.php index 74ffe03..3d3cb1f 100644 --- a/tests/Feature/SettingsTest.php +++ b/tests/Feature/SettingsTest.php @@ -13,6 +13,16 @@ 'settings.cache' => false, 'settings.encryption' => false, ]); + + // The Database driver doesn't seem to be using the same Sqlite connection the tests are using, so + // we'll force it to here. This should fix issues with the settings table not existing when the + // driver queries it. + $driver = Settings::getDriver(); + $reflection = new ReflectionClass($driver); + + $property = $reflection->getProperty('connection'); + $property->setAccessible(true); + $property->setValue($driver, DB::connection()); }); it('can determine if a setting has been persisted', function () { @@ -283,7 +293,6 @@ function resetQueryCount(): void * @see https://developer.wordpress.org/reference/functions/is_serialized/ * * @param string|mixed $data - * @return bool */ function isSerialized(mixed $data): bool {