diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 58371ea..6606896 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,9 +14,11 @@ jobs: fail-fast: true matrix: php: [8.3, 8.2, 8.1, 8.0] - laravel: [10.*, 9.*] + laravel: [11.*, 10.*, 9.*] dependency-version: [prefer-lowest, prefer-stable] include: + - laravel: 11.* + testbench: ^9.0 - laravel: 10.* testbench: ^8.0 - laravel: 9.* @@ -26,8 +28,12 @@ jobs: php: 8.3 - 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 }} + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} steps: - name: Checkout code diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results new file mode 100644 index 0000000..72ac2cc --- /dev/null +++ b/.phpunit.cache/test-results @@ -0,0 +1 @@ +{"version":1,"defects":[],"times":{"Mchev\\Banhammer\\Tests\\Unit\\IPBannedMiddlewareTest::it_blocks_the_banned_ip":0.002,"Mchev\\Banhammer\\Tests\\Unit\\IPBanTest::test_ip_ban_with_metas":0.003,"Mchev\\Banhammer\\Tests\\Unit\\IPBanTest::test_ip_is_unbanned":0.003,"Mchev\\Banhammer\\Tests\\Unit\\IPBanTest::test_ip_is_banned":0.003,"Mchev\\Banhammer\\Tests\\Unit\\IPBanTest::test_multiple_ip_are_banned":0.002,"Mchev\\Banhammer\\Tests\\Unit\\IPBanTest::test_ip_ban_can_be_created":0.05,"Mchev\\Banhammer\\Tests\\Unit\\BlockByCountryMiddlewareTest::it_allows_request_from_non_blocked_country":0.001,"Mchev\\Banhammer\\Tests\\Unit\\BlockByCountryMiddlewareTest::it_blocks_request_from_blocked_country":0.001,"Mchev\\Banhammer\\Tests\\Unit\\BlockByCountryMiddlewareTest::it_allows_request_when_cache_is_present":0.007,"Mchev\\Banhammer\\Tests\\Unit\\BlockByCountryMiddlewareTest::it_allows_request_when_country_check_fails":0.023}} \ No newline at end of file diff --git a/README.md b/README.md index 07286ee..809f660 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ Banned models can have an expiration date and will be automatically unbanned usi :---------------------|:---------- ^9.0 | 1.x, 2.x ^10.0 | 1.x, 2.x + ^11.0 | 1.x, 2.x ## Installation diff --git a/composer.json b/composer.json index d0f43bb..c5b3fd2 100644 --- a/composer.json +++ b/composer.json @@ -23,8 +23,8 @@ "php": "^8.0" }, "require-dev": { - "orchestra/testbench": "^7.0|^8.0", - "phpunit/phpunit": "^9.5" + "orchestra/testbench": "^7.0|^8.0|^9.0", + "phpunit/phpunit": "^9.5|^10.5|^11.0" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index c7b5079..0bc1b47 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,48 +1,25 @@ - - - - tests - - - - - ./src - - - - - - - - - - - - - - - - - - - + + + + tests + + + + + + + + + + + + + + + + + ./src + + diff --git a/phpunit.xml.dist.bak b/phpunit.xml.dist.bak new file mode 100644 index 0000000..c7b5079 --- /dev/null +++ b/phpunit.xml.dist.bak @@ -0,0 +1,48 @@ + + + + + tests + + + + + ./src + + + + + + + + + + + + + + + + + + + + diff --git a/src/BanhammerServiceProvider.php b/src/BanhammerServiceProvider.php index f0bfa19..6bda4c1 100644 --- a/src/BanhammerServiceProvider.php +++ b/src/BanhammerServiceProvider.php @@ -40,6 +40,11 @@ public function boot(): void __DIR__.'/../config/config.php' => config_path('ban.php'), ], 'banhammer-config'); + // Publishing migrations + // $this->publishes([ + // __DIR__.'/../database/migrations' => database_path('migrations'), + // ], 'banhammer-migrations'); + // Registering package commands. $this->commands([ ClearBans::class,