From 5d16b530f117b9b619e3bc1db28d9472ffa64a2f Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Sat, 30 Mar 2024 18:51:10 +0000 Subject: [PATCH 1/7] Apply fixes from StyleCI --- src/CaptchaServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CaptchaServiceProvider.php b/src/CaptchaServiceProvider.php index badb26d..375703f 100644 --- a/src/CaptchaServiceProvider.php +++ b/src/CaptchaServiceProvider.php @@ -17,7 +17,7 @@ class CaptchaServiceProvider extends ServiceProvider { public function register(): void { - if(! app()->configurationIsCached()) { + if (! app()->configurationIsCached()) { $this->mergeConfigFrom(__DIR__.'/../config/captcha.php', 'captcha'); } From 979ed144bffcd6ade0f3c96a9f5b71a7b911bc16 Mon Sep 17 00:00:00 2001 From: Rahul Dey Date: Sun, 31 Mar 2024 00:21:26 +0530 Subject: [PATCH 2/7] added laravel 11 support --- .github/workflows/run-tests.yml | 4 +++- composer.json | 8 ++++---- src/CaptchaServiceProvider.php | 4 +++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f580b8e..2b9ce5c 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -14,10 +14,12 @@ jobs: fail-fast: true matrix: php: ['8.0', 8.1, 8.2, 8.3] - laravel: [8, 9, 10] + laravel: [8, 9, 10, 11] exclude: - php: 8.0 laravel: 10 + - php: 8.1 + laravel: 11 name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} diff --git a/composer.json b/composer.json index 78055d6..c2bd895 100644 --- a/composer.json +++ b/composer.json @@ -19,10 +19,10 @@ "require": { "php": "^8.0", "guzzlehttp/guzzle": "^6.5.5|^7.0.1", - "illuminate/http": "^8.0|^9.0|^10.0", - "illuminate/support": "^8.0|^9.0|^10.0", - "illuminate/validation": "^8.0|^9.0|^10.0", - "illuminate/view": "^8.0|^9.0|^10.0" + "illuminate/http": "^8.0|^9.0|^10.0|^11.0", + "illuminate/support": "^8.0|^9.0|^10.0|^11.0", + "illuminate/validation": "^8.0|^9.0|^10.0|^11.0", + "illuminate/view": "^8.0|^9.0|^10.0|^11.0" }, "require-dev": { "laravel/pint": "^1.5.0", diff --git a/src/CaptchaServiceProvider.php b/src/CaptchaServiceProvider.php index 34e95f4..badb26d 100644 --- a/src/CaptchaServiceProvider.php +++ b/src/CaptchaServiceProvider.php @@ -17,7 +17,9 @@ class CaptchaServiceProvider extends ServiceProvider { public function register(): void { - $this->mergeConfigFrom(__DIR__.'/../config/captcha.php', 'captcha'); + if(! app()->configurationIsCached()) { + $this->mergeConfigFrom(__DIR__.'/../config/captcha.php', 'captcha'); + } $this->app->singleton(CaptchaContract::class, fn ($app): CaptchaManager => new CaptchaManager($app)); From ba891138ca342af6de0cc3ea39411b932ecf1c2d Mon Sep 17 00:00:00 2001 From: Rahul Dey Date: Sun, 31 Mar 2024 00:25:53 +0530 Subject: [PATCH 3/7] removed php 8.0 laravel 11 --- .github/workflows/run-tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 2b9ce5c..aacb68c 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -18,6 +18,8 @@ jobs: exclude: - php: 8.0 laravel: 10 + - php: 8.0 + laravel: 11 - php: 8.1 laravel: 11 From c59d3a24c7afedba2bf4e6887dc94db453fe5aee Mon Sep 17 00:00:00 2001 From: Rahul Dey Date: Sun, 31 Mar 2024 00:56:56 +0530 Subject: [PATCH 4/7] removed lagacy laravel supports --- .github/workflows/run-tests.yml | 8 +-- .phpunit.cache/test-results | 1 + composer.json | 23 ++++---- phpunit.xml.dist | 58 +++++++------------ rector.php | 2 +- src/Views/Components/Js.php | 5 +- .../it_can_give_fake_captcha_javascript.snap} | 0 7 files changed, 36 insertions(+), 61 deletions(-) create mode 100644 .phpunit.cache/test-results rename tests/{__snapshots__/FakeCaptchaTest__it_can_give_fake_captcha_javascript__1.txt => .pest/snapshots/FakeCaptchaTest/it_can_give_fake_captcha_javascript.snap} (100%) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index aacb68c..c43bd9e 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,13 +13,9 @@ jobs: strategy: fail-fast: true matrix: - php: ['8.0', 8.1, 8.2, 8.3] - laravel: [8, 9, 10, 11] + php: [8.1, 8.2, 8.3] + laravel: [10, 11] exclude: - - php: 8.0 - laravel: 10 - - php: 8.0 - laravel: 11 - php: 8.1 laravel: 11 diff --git a/.phpunit.cache/test-results b/.phpunit.cache/test-results new file mode 100644 index 0000000..2653f28 --- /dev/null +++ b/.phpunit.cache/test-results @@ -0,0 +1 @@ +{"version":"pest_2.34.6","defects":[],"times":{"P\\Tests\\TurnstileCaptchaTest::__pest_evaluable_it_has_correct_response_name":0,"P\\Tests\\TurnstileCaptchaTest::__pest_evaluable_it_can_give_captcha_class":0,"P\\Tests\\TurnstileCaptchaTest::__pest_evaluable_it_can_be_failed":0.008,"P\\Tests\\TurnstileCaptchaTest::__pest_evaluable_it_can_be_succeed":0,"P\\Tests\\TurnstileCaptchaTest::__pest_evaluable_it_can_give_captcha_javascript":0,"P\\Tests\\HCaptchaTest::__pest_evaluable_it_can_give_captcha_class":0,"P\\Tests\\HCaptchaTest::__pest_evaluable_it_can_be_failed":0.001,"P\\Tests\\HCaptchaTest::__pest_evaluable_it_can_give_captcha_javascript#('fr', '