From 1373244bd9265483b0ff9d450a5d6de251863672 Mon Sep 17 00:00:00 2001 From: ousid Date: Tue, 30 May 2023 15:51:29 +0000 Subject: [PATCH 01/21] Update CHANGELOG --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cbc9834..433af3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to `laravel-turnstile` will be documented in this file. +## v1.0.2 - 2023-05-30 + +### What's Changed + +- Component Prefix by @ousid in https://github.com/coderflexx/laravel-turnstile/pull/2 + +**Full Changelog**: https://github.com/coderflexx/laravel-turnstile/compare/v1.0.1...v1.0.2 + ## v1.0.1 - 2023-05-30 ### What's Changed From 6f9438bb02e099ecabb77330fd7f5c1c8c85fdcf Mon Sep 17 00:00:00 2001 From: ousid Date: Wed, 31 May 2023 00:25:22 +0100 Subject: [PATCH 02/21] refactoring --- resources/views/components/turnstile-widget.blade.php | 2 +- src/Rules/TurnstileCheck.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/views/components/turnstile-widget.blade.php b/resources/views/components/turnstile-widget.blade.php index c7f0c1a..52f2a61 100644 --- a/resources/views/components/turnstile-widget.blade.php +++ b/resources/views/components/turnstile-widget.blade.php @@ -16,4 +16,4 @@ 'data-size' => $size, ]) }}> - \ No newline at end of file + \ No newline at end of file diff --git a/src/Rules/TurnstileCheck.php b/src/Rules/TurnstileCheck.php index f5e2774..059aa5c 100644 --- a/src/Rules/TurnstileCheck.php +++ b/src/Rules/TurnstileCheck.php @@ -13,7 +13,7 @@ class TurnstileCheck implements ValidationRule */ public function validate(string $attribute, mixed $value, Closure $fail): void { - $response = LaravelTurnstile::validate(); + $response = LaravelTurnstile::validate($value); if (! $response['success']) { $fail(__(config('turnstile.error_messages.turnstile_check_message'))); From 773c2ed7515709959362cf4917cc61ee2d884b74 Mon Sep 17 00:00:00 2001 From: ousid Date: Tue, 30 May 2023 23:27:45 +0000 Subject: [PATCH 03/21] Update CHANGELOG --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 433af3a..34d3adb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to `laravel-turnstile` will be documented in this file. +## v1.0.3 - 2023-05-30 + +### What's Changed + +- Refactoring by @ousid in https://github.com/coderflexx/laravel-turnstile/pull/3 + +**Full Changelog**: https://github.com/coderflexx/laravel-turnstile/compare/v1.0.2...v1.0.3 + ## v1.0.2 - 2023-05-30 ### What's Changed From 285ae49c25054cda205d2ea4949dc5da5ce79bab Mon Sep 17 00:00:00 2001 From: Fabio Pontes Date: Sun, 11 Jun 2023 11:09:14 -0300 Subject: [PATCH 04/21] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a483696..9797f43 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/coderflexx/laravel-turnstile/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/coderflexx/laravel-turnstile/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) [![Total Downloads](https://img.shields.io/packagist/dt/coderflex/laravel-turnstile.svg?style=flat-square)](https://packagist.org/packages/coderflex/laravel-turnstile) -__Laravel Turnstile__, is a pacakge to help you implement [cloudflare turnstile](https://developers.cloudflare.com/turnstile/) eaisly, and with no time. +__Laravel Turnstile__, is a package to help you implement [cloudflare turnstile](https://developers.cloudflare.com/turnstile/) easily, and with no time. ## Installation @@ -62,7 +62,7 @@ return [ ``` -Optionally, you can publish the views using +Optionally, you can publish the views using: ```bash php artisan vendor:publish --tag="turnstile-views" @@ -84,7 +84,7 @@ If you want to test the widget, you can use the [Dummy site keys and secret keys ### Turnstile Widget Component -Since this package, it is so simple to use. Once you require it, you can use the turnstile widget in your form, like the following +Once you require this package, you can use the turnstile widget in your form, like the following ```blade Date: Sat, 30 Mar 2024 22:03:20 +0100 Subject: [PATCH 05/21] Laravel 11 Support (#9) Add Laravel `11.x` support --- .github/workflows/run-tests.yml | 10 ++++++++-- composer.json | 9 ++++----- src/LaravelTurnstile.php | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b5d6720..981e7af 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -13,13 +13,19 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.2, 8.1] - laravel: [10.*] + php: [8.1, 8.2, 8.3] + laravel: [10.*, 11.*] stability: [prefer-lowest, prefer-stable] include: - laravel: 10.* testbench: 8.* carbon: ^2.63 + - laravel: 11.* + testbench: 9.* + carbon: '*' + exclude: + - laravel: 11.* + php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index be957e5..dcfabf1 100644 --- a/composer.json +++ b/composer.json @@ -18,19 +18,18 @@ } ], "require": { - "php": "^8.1", + "php": "^8.1|^8.2", "guzzlehttp/guzzle": "^7.7", - "illuminate/contracts": "^10.0", + "illuminate/contracts": "^10.0|^11.0", "spatie/laravel-package-tools": "^1.14.0" }, "require-dev": { "laravel/pint": "^1.0", - "nunomaduro/collision": "^7.9", + "nunomaduro/collision": "^7.0|^8.0", "nunomaduro/larastan": "^2.0.1", - "orchestra/testbench": "^8.0", + "orchestra/testbench": "^8.0|^9.0", "pestphp/pest": "^2.0", "pestphp/pest-plugin-arch": "^2.0", - "pestphp/pest-plugin-laravel": "^2.0", "phpstan/extension-installer": "^1.1", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0" diff --git a/src/LaravelTurnstile.php b/src/LaravelTurnstile.php index 139084d..075b96d 100755 --- a/src/LaravelTurnstile.php +++ b/src/LaravelTurnstile.php @@ -10,7 +10,7 @@ class LaravelTurnstile { protected ?string $url = 'https://challenges.cloudflare.com/turnstile/v0/siteverify'; - public function validate(string $cfResponse = null): array + public function validate(?string $cfResponse = null): array { $turnstileResponse = is_null($cfResponse) ? request()->get('cf-turnstile-response') From da68d4401db3e2a08aacbb110a0de014653358d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 10:58:04 +0000 Subject: [PATCH 06/21] Bump ramsey/composer-install from 2 to 3 Bumps [ramsey/composer-install](https://github.com/ramsey/composer-install) from 2 to 3. - [Release notes](https://github.com/ramsey/composer-install/releases) - [Commits](https://github.com/ramsey/composer-install/compare/v2...v3) --- updated-dependencies: - dependency-name: ramsey/composer-install dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/phpstan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 9d41c0c..6ee75f8 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -20,7 +20,7 @@ jobs: coverage: none - name: Install composer dependencies - uses: ramsey/composer-install@v2 + uses: ramsey/composer-install@v3 - name: Run PHPStan run: ./vendor/bin/phpstan --error-format=github From 661575d3ebb795bc20c4d52e4df9e452382a836e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 10:58:08 +0000 Subject: [PATCH 07/21] Bump stefanzweifel/git-auto-commit-action from 4 to 5 Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4 to 5. - [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases) - [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/stefanzweifel/git-auto-commit-action/compare/v4...v5) --- updated-dependencies: - dependency-name: stefanzweifel/git-auto-commit-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/fix-php-code-style-issues.yml | 2 +- .github/workflows/update-changelog.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml index 7520a18..30a5fa8 100644 --- a/.github/workflows/fix-php-code-style-issues.yml +++ b/.github/workflows/fix-php-code-style-issues.yml @@ -22,6 +22,6 @@ jobs: uses: aglipanci/laravel-pint-action@2.3.0 - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: Fix styling diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index 8c12ba9..7bd2646 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -24,7 +24,7 @@ jobs: release-notes: ${{ github.event.release.body }} - name: Commit updated CHANGELOG - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: branch: main commit_message: Update CHANGELOG From 8c07556f5abff3d8edbdb13dfe6dd02cf7ca031a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 10:58:11 +0000 Subject: [PATCH 08/21] Bump aglipanci/laravel-pint-action from 2.3.0 to 2.3.1 Bumps [aglipanci/laravel-pint-action](https://github.com/aglipanci/laravel-pint-action) from 2.3.0 to 2.3.1. - [Release notes](https://github.com/aglipanci/laravel-pint-action/releases) - [Commits](https://github.com/aglipanci/laravel-pint-action/compare/2.3.0...2.3.1) --- updated-dependencies: - dependency-name: aglipanci/laravel-pint-action dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/fix-php-code-style-issues.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/fix-php-code-style-issues.yml b/.github/workflows/fix-php-code-style-issues.yml index 7520a18..c958238 100644 --- a/.github/workflows/fix-php-code-style-issues.yml +++ b/.github/workflows/fix-php-code-style-issues.yml @@ -19,7 +19,7 @@ jobs: ref: ${{ github.head_ref }} - name: Fix PHP code style issues - uses: aglipanci/laravel-pint-action@2.3.0 + uses: aglipanci/laravel-pint-action@2.3.1 - name: Commit changes uses: stefanzweifel/git-auto-commit-action@v4 From a7a334313f4138f2e49a59a113f7de03ca979691 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 10:58:16 +0000 Subject: [PATCH 09/21] Bump dependabot/fetch-metadata from 1.5.1 to 2.0.0 Bumps [dependabot/fetch-metadata](https://github.com/dependabot/fetch-metadata) from 1.5.1 to 2.0.0. - [Release notes](https://github.com/dependabot/fetch-metadata/releases) - [Commits](https://github.com/dependabot/fetch-metadata/compare/v1.5.1...v2.0.0) --- updated-dependencies: - dependency-name: dependabot/fetch-metadata dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/dependabot-auto-merge.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 4af8e6b..67e66c6 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -13,7 +13,7 @@ jobs: - name: Dependabot metadata id: metadata - uses: dependabot/fetch-metadata@v1.5.1 + uses: dependabot/fetch-metadata@v2.0.0 with: github-token: "${{ secrets.GITHUB_TOKEN }}" From c51e3bd5abce57d73edd26d60f0d0c2fbafb2b66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jefferson=20Gon=C3=A7alves?= Date: Wed, 29 Jan 2025 13:12:40 -0300 Subject: [PATCH 10/21] Delete configure.php --- configure.php | 266 -------------------------------------------------- 1 file changed, 266 deletions(-) delete mode 100644 configure.php diff --git a/configure.php b/configure.php deleted file mode 100644 index d7e0fcc..0000000 --- a/configure.php +++ /dev/null @@ -1,266 +0,0 @@ -#!/usr/bin/env php - $version) { - if (in_array($name, $names, true)) { - unset($data['require-dev'][$name]); - } - } - - file_put_contents(__DIR__.'/composer.json', json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)); -} - -function remove_composer_script($scriptName) -{ - $data = json_decode(file_get_contents(__DIR__.'/composer.json'), true); - - foreach ($data['scripts'] as $name => $script) { - if ($scriptName === $name) { - unset($data['scripts'][$name]); - break; - } - } - - file_put_contents(__DIR__.'/composer.json', json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)); -} - -function remove_readme_paragraphs(string $file): void -{ - $contents = file_get_contents($file); - - file_put_contents( - $file, - preg_replace('/.*/s', '', $contents) ?: $contents - ); -} - -function safeUnlink(string $filename) -{ - if (file_exists($filename) && is_file($filename)) { - unlink($filename); - } -} - -function determineSeparator(string $path): string -{ - return str_replace('/', DIRECTORY_SEPARATOR, $path); -} - -function replaceForWindows(): array -{ - return preg_split('/\\r\\n|\\r|\\n/', run('dir /S /B * | findstr /v /i .git\ | findstr /v /i vendor | findstr /v /i '.basename(__FILE__).' | findstr /r /i /M /F:/ ":author :vendor :package VendorName skeleton migration_table_name vendor_name vendor_slug author@domain.com"')); -} - -function replaceForAllOtherOSes(): array -{ - return explode(PHP_EOL, run('grep -E -r -l -i ":author|:vendor|:package|VendorName|skeleton|migration_table_name|vendor_name|vendor_slug|author@domain.com" --exclude-dir=vendor ./* ./.github/* | grep -v '.basename(__FILE__))); -} - -$gitName = run('git config user.name'); -$authorName = ask('Author name', $gitName); - -$gitEmail = run('git config user.email'); -$authorEmail = ask('Author email', $gitEmail); - -$usernameGuess = explode(':', run('git config remote.origin.url'))[1]; -$usernameGuess = dirname($usernameGuess); -$usernameGuess = basename($usernameGuess); -$authorUsername = ask('Author username', $usernameGuess); - -$vendorName = ask('Vendor name', $authorUsername); -$vendorSlug = slugify($vendorName); -$vendorNamespace = str_replace('-', '', ucwords($vendorName)); -$vendorNamespace = ask('Vendor namespace', $vendorNamespace); - -$currentDirectory = getcwd(); -$folderName = basename($currentDirectory); - -$packageName = ask('Package name', $folderName); -$packageSlug = slugify($packageName); -$packageSlugWithoutPrefix = remove_prefix('laravel-', $packageSlug); - -$className = title_case($packageName); -$className = ask('Class name', $className); -$variableName = lcfirst($className); -$description = ask('Package description', "This is my package {$packageSlug}"); - -$usePhpStan = confirm('Enable PhpStan?', true); -$useLaravelPint = confirm('Enable Laravel Pint?', true); -$useDependabot = confirm('Enable Dependabot?', true); -$useLaravelRay = confirm('Use Ray for debugging?', true); -$useUpdateChangelogWorkflow = confirm('Use automatic changelog updater workflow?', true); - -writeln('------'); -writeln("Author : {$authorName} ({$authorUsername}, {$authorEmail})"); -writeln("Vendor : {$vendorName} ({$vendorSlug})"); -writeln("Package : {$packageSlug} <{$description}>"); -writeln("Namespace : {$vendorNamespace}\\{$className}"); -writeln("Class name : {$className}"); -writeln('---'); -writeln('Packages & Utilities'); -writeln('Use Laravel/Pint : '.($useLaravelPint ? 'yes' : 'no')); -writeln('Use Larastan/PhpStan : '.($usePhpStan ? 'yes' : 'no')); -writeln('Use Dependabot : '.($useDependabot ? 'yes' : 'no')); -writeln('Use Ray App : '.($useLaravelRay ? 'yes' : 'no')); -writeln('Use Auto-Changelog : '.($useUpdateChangelogWorkflow ? 'yes' : 'no')); -writeln('------'); - -writeln('This script will replace the above values in all relevant files in the project directory.'); - -if (! confirm('Modify files?', true)) { - exit(1); -} - -$files = (str_starts_with(strtoupper(PHP_OS), 'WIN') ? replaceForWindows() : replaceForAllOtherOSes()); - -foreach ($files as $file) { - replace_in_file($file, [ - ':author_name' => $authorName, - ':author_username' => $authorUsername, - 'author@domain.com' => $authorEmail, - ':vendor_name' => $vendorName, - ':vendor_slug' => $vendorSlug, - 'VendorName' => $vendorNamespace, - ':package_name' => $packageName, - ':package_slug' => $packageSlug, - ':package_slug_without_prefix' => $packageSlugWithoutPrefix, - 'Skeleton' => $className, - 'skeleton' => $packageSlug, - 'migration_table_name' => title_snake($packageSlug), - 'variable' => $variableName, - ':package_description' => $description, - ]); - - match (true) { - str_contains($file, determineSeparator('src/Skeleton.php')) => rename($file, determineSeparator('./src/'.$className.'.php')), - str_contains($file, determineSeparator('src/SkeletonServiceProvider.php')) => rename($file, determineSeparator('./src/'.$className.'ServiceProvider.php')), - str_contains($file, determineSeparator('src/Facades/Skeleton.php')) => rename($file, determineSeparator('./src/Facades/'.$className.'.php')), - str_contains($file, determineSeparator('src/Commands/SkeletonCommand.php')) => rename($file, determineSeparator('./src/Commands/'.$className.'Command.php')), - str_contains($file, determineSeparator('database/migrations/create_skeleton_table.php.stub')) => rename($file, determineSeparator('./database/migrations/create_'.title_snake($packageSlugWithoutPrefix).'_table.php.stub')), - str_contains($file, determineSeparator('config/skeleton.php')) => rename($file, determineSeparator('./config/'.$packageSlugWithoutPrefix.'.php')), - str_contains($file, 'README.md') => remove_readme_paragraphs($file), - default => [], - }; -} - -if (! $useLaravelPint) { - safeUnlink(__DIR__.'/.github/workflows/fix-php-code-style-issues.yml'); - safeUnlink(__DIR__.'/pint.json'); -} - -if (! $usePhpStan) { - safeUnlink(__DIR__.'/phpstan.neon.dist'); - safeUnlink(__DIR__.'/phpstan-baseline.neon'); - safeUnlink(__DIR__.'/.github/workflows/phpstan.yml'); - - remove_composer_deps([ - 'phpstan/extension-installer', - 'phpstan/phpstan-deprecation-rules', - 'phpstan/phpstan-phpunit', - 'nunomaduro/larastan', - ]); - - remove_composer_script('phpstan'); -} - -if (! $useDependabot) { - safeUnlink(__DIR__.'/.github/dependabot.yml'); - safeUnlink(__DIR__.'/.github/workflows/dependabot-auto-merge.yml'); -} - -if (! $useLaravelRay) { - remove_composer_deps(['spatie/laravel-ray']); -} - -if (! $useUpdateChangelogWorkflow) { - safeUnlink(__DIR__.'/.github/workflows/update-changelog.yml'); -} - -confirm('Execute `composer install` and run tests?') && run('composer install && composer test'); - -confirm('Let this script delete itself?', true) && unlink(__FILE__); From b778d1e0d1e426f7f2ace01a8612ff8af98b42ef Mon Sep 17 00:00:00 2001 From: Shift Date: Wed, 19 Feb 2025 13:32:26 +0000 Subject: [PATCH 11/21] Bump dependencies for Laravel 12 --- composer.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index dcfabf1..e385dcc 100644 --- a/composer.json +++ b/composer.json @@ -20,19 +20,19 @@ "require": { "php": "^8.1|^8.2", "guzzlehttp/guzzle": "^7.7", - "illuminate/contracts": "^10.0|^11.0", + "illuminate/contracts": "^10.0|^11.0|^12.0", "spatie/laravel-package-tools": "^1.14.0" }, "require-dev": { "laravel/pint": "^1.0", "nunomaduro/collision": "^7.0|^8.0", "nunomaduro/larastan": "^2.0.1", - "orchestra/testbench": "^8.0|^9.0", - "pestphp/pest": "^2.0", - "pestphp/pest-plugin-arch": "^2.0", + "orchestra/testbench": "^8.0|^9.0|^10.0", + "pestphp/pest": "^2.0|^3.7", + "pestphp/pest-plugin-arch": "^2.0|^3.0", "phpstan/extension-installer": "^1.1", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0" + "phpstan/phpstan-deprecation-rules": "^1.0|^2.0", + "phpstan/phpstan-phpunit": "^1.0|^2.0" }, "autoload": { "psr-4": { From 5cc96d8dffa88576d546e5e8776e5c791e69d482 Mon Sep 17 00:00:00 2001 From: Shift Date: Wed, 19 Feb 2025 13:32:26 +0000 Subject: [PATCH 12/21] Update GitHub Actions for Laravel 12 --- .github/workflows/run-tests.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 981e7af..5fb9745 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -2,19 +2,22 @@ name: run-tests on: push: - branches: [main] + branches: + - main pull_request: - branches: [main] + branches: + - main jobs: test: runs-on: ${{ matrix.os }} + strategy: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] php: [8.1, 8.2, 8.3] - laravel: [10.*, 11.*] + laravel: ['10.*', '11.*', '12.*'] stability: [prefer-lowest, prefer-stable] include: - laravel: 10.* @@ -22,10 +25,12 @@ jobs: carbon: ^2.63 - laravel: 11.* testbench: 9.* - carbon: '*' + carbon: * exclude: - laravel: 11.* php: 8.1 + - laravel: 12.* + php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} From a15668f6034782706e8c8708e312a8cafa9a24cf Mon Sep 17 00:00:00 2001 From: ousid Date: Sat, 1 Mar 2025 15:44:15 +0400 Subject: [PATCH 13/21] fix yml unit test file --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5fb9745..b0f4765 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -25,7 +25,7 @@ jobs: carbon: ^2.63 - laravel: 11.* testbench: 9.* - carbon: * + carbon: '*' exclude: - laravel: 11.* php: 8.1 From 1132880d96bb1865784a145f326b98d9fa9139a4 Mon Sep 17 00:00:00 2001 From: ousid Date: Sat, 1 Mar 2025 16:23:16 +0400 Subject: [PATCH 14/21] wip --- .github/workflows/run-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index b0f4765..eabe966 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -26,6 +26,9 @@ jobs: - laravel: 11.* testbench: 9.* carbon: '*' + - laravel: 12.* + testbench: 10.* + carbon: '*' exclude: - laravel: 11.* php: 8.1 From 52daf63ded3a223d48bb1121a7f52b21d5b466c2 Mon Sep 17 00:00:00 2001 From: ousid Date: Sat, 1 Mar 2025 16:30:27 +0400 Subject: [PATCH 15/21] wip --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index e385dcc..2b68d06 100644 --- a/composer.json +++ b/composer.json @@ -26,8 +26,8 @@ "require-dev": { "laravel/pint": "^1.0", "nunomaduro/collision": "^7.0|^8.0", - "nunomaduro/larastan": "^2.0.1", - "orchestra/testbench": "^8.0|^9.0|^10.0", + "nunomaduro/larastan": "^2.8.0", + "orchestra/testbench": "^8.0|^9.0", "pestphp/pest": "^2.0|^3.7", "pestphp/pest-plugin-arch": "^2.0|^3.0", "phpstan/extension-installer": "^1.1", From cfc7b8ad26caa9d7cd5eccbb8323ee27c2c717e5 Mon Sep 17 00:00:00 2001 From: ousid Date: Sat, 1 Mar 2025 16:32:11 +0400 Subject: [PATCH 16/21] update run tests yml --- .github/workflows/run-tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index eabe966..4e461a2 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -27,7 +27,7 @@ jobs: testbench: 9.* carbon: '*' - laravel: 12.* - testbench: 10.* + testbench: 9.* carbon: '*' exclude: - laravel: 11.* @@ -56,7 +56,7 @@ jobs: - name: Install dependencies run: | composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction + composer update --${{ matrix.stability }} --prefer-dist --no-interaction --with-all-dependencies - name: List Installed Dependencies run: composer show -D From 41f992b18171482520fe85e7330df971d59c2aff Mon Sep 17 00:00:00 2001 From: ousid Date: Sat, 1 Mar 2025 16:36:03 +0400 Subject: [PATCH 17/21] wip --- .github/workflows/run-tests.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 4e461a2..a531f7d 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -16,19 +16,16 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.1, 8.2, 8.3] + php: [8.2, 8.3, 8.4] laravel: ['10.*', '11.*', '12.*'] stability: [prefer-lowest, prefer-stable] include: - laravel: 10.* - testbench: 8.* - carbon: ^2.63 + testbench: ^8.0 - laravel: 11.* - testbench: 9.* - carbon: '*' + testbench: ^9.0 - laravel: 12.* - testbench: 9.* - carbon: '*' + testbench: ^10.0 exclude: - laravel: 11.* php: 8.1 @@ -55,8 +52,8 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update - composer update --${{ matrix.stability }} --prefer-dist --no-interaction --with-all-dependencies + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update --no-scripts + composer update --${{ matrix.stability }} --prefer-dist --no-interaction - name: List Installed Dependencies run: composer show -D From 9304fb2afc95e243df71797f43334830868a2551 Mon Sep 17 00:00:00 2001 From: ousid Date: Sat, 1 Mar 2025 16:54:02 +0400 Subject: [PATCH 18/21] wip --- .github/workflows/run-tests.yml | 11 ++++++----- composer.json | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index a531f7d..237c45c 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -16,16 +16,17 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.2, 8.3, 8.4] + php: [8.1, 8.2, 8.3] laravel: ['10.*', '11.*', '12.*'] stability: [prefer-lowest, prefer-stable] include: - laravel: 10.* - testbench: ^8.0 + testbench: 8.* + carbon: ^2.63 - laravel: 11.* - testbench: ^9.0 + testbench: 9.* - laravel: 12.* - testbench: ^10.0 + testbench: 10.* exclude: - laravel: 11.* php: 8.1 @@ -52,7 +53,7 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update --no-scripts + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update composer update --${{ matrix.stability }} --prefer-dist --no-interaction - name: List Installed Dependencies diff --git a/composer.json b/composer.json index 2b68d06..2e38dd5 100644 --- a/composer.json +++ b/composer.json @@ -26,8 +26,8 @@ "require-dev": { "laravel/pint": "^1.0", "nunomaduro/collision": "^7.0|^8.0", - "nunomaduro/larastan": "^2.8.0", - "orchestra/testbench": "^8.0|^9.0", + "nunomaduro/larastan": "^2.8.0|^3.1.0", + "orchestra/testbench": "^8.0|^9.0|^10.0", "pestphp/pest": "^2.0|^3.7", "pestphp/pest-plugin-arch": "^2.0|^3.0", "phpstan/extension-installer": "^1.1", From b1707226672981f74c0173652912398c30f7308f Mon Sep 17 00:00:00 2001 From: ousid Date: Sat, 1 Mar 2025 16:55:11 +0400 Subject: [PATCH 19/21] wip --- .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 237c45c..eabe966 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -25,8 +25,10 @@ jobs: carbon: ^2.63 - laravel: 11.* testbench: 9.* + carbon: '*' - laravel: 12.* testbench: 10.* + carbon: '*' exclude: - laravel: 11.* php: 8.1 From f7480592865ebb51f7900a497bc18ec7fee096e6 Mon Sep 17 00:00:00 2001 From: ousid Date: Sat, 1 Mar 2025 16:57:19 +0400 Subject: [PATCH 20/21] wip --- .github/workflows/run-tests.yml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index eabe966..f4b5b23 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -16,8 +16,8 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.1, 8.2, 8.3] - laravel: ['10.*', '11.*', '12.*'] + php: [8.2, 8.3, 8.4] + laravel: ['11.*', '12.*'] stability: [prefer-lowest, prefer-stable] include: - laravel: 10.* @@ -29,11 +29,6 @@ jobs: - laravel: 12.* testbench: 10.* carbon: '*' - exclude: - - laravel: 11.* - php: 8.1 - - laravel: 12.* - php: 8.1 name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} From 7fb94abdba8db87a7728738f6852cf6a3c020516 Mon Sep 17 00:00:00 2001 From: ousid Date: Sat, 1 Mar 2025 17:02:22 +0400 Subject: [PATCH 21/21] wip --- .github/workflows/run-tests.yml | 5 +---- composer.json | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index f4b5b23..b256566 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -16,13 +16,10 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.2, 8.3, 8.4] + php: [8.2, 8.3] laravel: ['11.*', '12.*'] stability: [prefer-lowest, prefer-stable] include: - - laravel: 10.* - testbench: 8.* - carbon: ^2.63 - laravel: 11.* testbench: 9.* carbon: '*' diff --git a/composer.json b/composer.json index 2e38dd5..9141eb2 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,7 @@ } ], "require": { - "php": "^8.1|^8.2", + "php": "^8.2|^8.3", "guzzlehttp/guzzle": "^7.7", "illuminate/contracts": "^10.0|^11.0|^12.0", "spatie/laravel-package-tools": "^1.14.0"