From dcb2c097fdc3339dbcb5897bf78aebafd53d8df9 Mon Sep 17 00:00:00 2001 From: Alessio Vertemati Date: Tue, 14 Apr 2026 09:52:40 +0200 Subject: [PATCH 1/3] Test request macro registered --- tests/Http/RequestMacrosTest.php | 19 +++++++++++++++++++ tests/TestCase.php | 6 ------ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 tests/Http/RequestMacrosTest.php diff --git a/tests/Http/RequestMacrosTest.php b/tests/Http/RequestMacrosTest.php new file mode 100644 index 0000000..35388e0 --- /dev/null +++ b/tests/Http/RequestMacrosTest.php @@ -0,0 +1,19 @@ +toBeTrue(); +}); + +it('registers the expectsMarkdown macro on Request', function () { + expect(Request::hasMacro('expectsMarkdown'))->toBeTrue(); +}); + +it('registers the isAgent macro on Request', function () { + expect(Request::hasMacro('isAgent'))->toBeTrue(); +}); + +it('registers the isAiAssistant macro on Request', function () { + expect(Request::hasMacro('isAiAssistant'))->toBeTrue(); +}); diff --git a/tests/TestCase.php b/tests/TestCase.php index d74c8d6..8d034fe 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -27,11 +27,5 @@ protected function getPackageProviders($app) public function getEnvironmentSetUp($app) { config()->set('database.default', 'testing'); - - /* - foreach (\Illuminate\Support\Facades\File::allFiles(__DIR__ . '/../database/migrations') as $migration) { - (include $migration->getRealPath())->up(); - } - */ } } From 4d202ae0e170b996d763a3eee7328f62f3ee4f16 Mon Sep 17 00:00:00 2001 From: Alessio Vertemati Date: Tue, 14 Apr 2026 09:52:53 +0200 Subject: [PATCH 2/3] Laravel 13 compatibility --- .github/workflows/run-tests.yml | 6 ++++-- composer.json | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5a32153..b132a24 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -21,14 +21,16 @@ jobs: fail-fast: true matrix: os: [ubuntu-latest, windows-latest] - php: [8.4, 8.3] - laravel: [12.*, 11.*] + php: [8.5, 8.4, 8.3] + laravel: [13.*, 12.*, 11.*] stability: [prefer-lowest, prefer-stable] include: - laravel: 12.* testbench: 10.* - laravel: 11.* testbench: 9.* + - laravel: 13.* + testbench: 11.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index 609fde8..c92208a 100644 --- a/composer.json +++ b/composer.json @@ -19,15 +19,15 @@ "require": { "php": "^8.3", "spatie/laravel-package-tools": "^1.16", - "illuminate/contracts": "^11.0||^12.0", - "illuminate/http": "^11.0||^12.0", - "illuminate/support": "^11.0||^12.0" + "illuminate/contracts": "^11.0||^12.0||^13.0", + "illuminate/http": "^11.0||^12.0||^13.0", + "illuminate/support": "^11.0||^12.0||^13.0" }, "require-dev": { "laravel/pint": "^1.14", "nunomaduro/collision": "^8.8", "larastan/larastan": "^3.0", - "orchestra/testbench": "^10.0.0||^9.0.0", + "orchestra/testbench": "^11.0.0||^10.0.0||^9.0.0", "pestphp/pest": "^4.0", "pestphp/pest-plugin-arch": "^4.0", "pestphp/pest-plugin-laravel": "^4.0", From 27190d636c50fc6093e90911ce474570a7a1af66 Mon Sep 17 00:00:00 2001 From: Alessio Vertemati Date: Tue, 14 Apr 2026 09:58:53 +0200 Subject: [PATCH 3/3] Update --- CLAUDE.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 6f61e6b..5f2fa91 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,14 +27,11 @@ This is a Laravel package built on [spatie/laravel-package-tools](https://github **Package registration** is handled entirely in `src/LaravelAgentRequestServiceProvider.php` via `configurePackage()`, which wires up: - Config file: `config/agent-request.php` → published as `laravel-agent-request` -- Views: `resources/views/` -- Migration stub: `database/migrations/create_agent_request_table.php.stub` (registered as `create_laravel_agent_request_table`) - Artisan command: `src/Commands/LaravelAgentRequestCommand.php` - -**Facade** (`src/Facades/LaravelAgentRequest.php`) resolves to the main `LaravelAgentRequest` class. +- Request macros **Testing** uses Pest with Orchestra Testbench. `tests/TestCase.php` bootstraps the service provider. Migrations in `getEnvironmentSetUp()` are commented out by default — uncomment and adapt when tests need DB access. The arch test in `tests/ArchTest.php` enforces no `dd`, `dump`, or `ray` in source. -**Compatibility matrix:** PHP 8.3/8.4, Laravel 11.*/12.*, tested on both Ubuntu and Windows. +**Compatibility matrix:** PHP 8.3/8.4/8.5, Laravel 11.*/12.*/13.*, tested on both Ubuntu and Windows. **PHPStan** runs at level 5 over `src/`, `config/`, and `database/`.