diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5994bfb..bfa85a5 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,16 +10,22 @@ jobs: matrix: os: [ubuntu-latest, windows-latest] php: [8.0, 8.1, 8.2] - laravel: [10.*, 9.*] + laravel: [11.*, 10.*, 9.*] stability: [prefer-lowest, prefer-stable] include: - laravel: 9.* testbench: 7.* - laravel: 10.* testbench: 8.* + - laravel: 11.* + testbench: 9.* exclude: - laravel: 10.* php: 8.0 + - laravel: 11.* + php: 8.0 + - laravel: 11.* + php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} @@ -41,7 +47,7 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:^2.64.1" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:^2.72.2" --no-interaction --no-update composer update --${{ matrix.stability }} --prefer-dist --no-interaction - name: Execute tests diff --git a/composer.json b/composer.json index f9035af..b586185 100644 --- a/composer.json +++ b/composer.json @@ -20,10 +20,10 @@ }, "require-dev": { "mockery/mockery": "^1.5", - "orchestra/testbench": "^7.7|^8.0", - "pestphp/pest": "^1.22", - "phpunit/phpunit": "^9.5.24", - "spatie/pest-plugin-test-time": "^1.1" + "orchestra/testbench": "^7.7|^8.0|^9.0", + "pestphp/pest": "^1.22|^2", + "phpunit/phpunit": "^9.5.24|^10.5", + "spatie/pest-plugin-test-time": "^1.1|^2.2" }, "autoload": { "psr-4": { diff --git a/tests/PackageServiceProviderTests/InstallCommandTests/CopyAndRegisterServiceProviderInAppTest.php b/tests/PackageServiceProviderTests/InstallCommandTests/CopyAndRegisterServiceProviderInAppTest.php index d7c6869..ee6f305 100644 --- a/tests/PackageServiceProviderTests/InstallCommandTests/CopyAndRegisterServiceProviderInAppTest.php +++ b/tests/PackageServiceProviderTests/InstallCommandTests/CopyAndRegisterServiceProviderInAppTest.php @@ -1,6 +1,7 @@ artisan('package-tools:install') ->assertSuccessful(); - assertStringContainsString( - "App\Providers\MyPackageServiceProvider::class", - file_get_contents(base_path('config/app.php')) - ); + if (intval(app()->version()) >= 11) { + // This does not happen in L11 because of the different framework skeleton + assertStringNotContainsString( + "App\Providers\MyPackageServiceProvider::class", + file_get_contents(base_path('config/app.php')) + ); + } else { + assertStringContainsString( + "App\Providers\MyPackageServiceProvider::class", + file_get_contents(base_path('config/app.php')) + ); + } restoreAppConfigFile(); });