From 974c3e4f86de564444cf60c627250cf4797f7d73 Mon Sep 17 00:00:00 2001 From: Steve McDougall Date: Tue, 20 Oct 2026 10:17:56 +0100 Subject: [PATCH 01/10] chore: upgrade to Laravel 13 Laravel 13.30 is the floor api-toolbox needs. Scribe moves to 5.11 for Laravel 13 support, larastan comes off 3.x-dev now a stable release covers it, and minimum-stability goes back to stable. The package is renamed from laravel/laravel to juststeveking/kit. --- .scribe/.filehashes | 2 +- .scribe/endpoints.cache/00.yaml | 8 +- .scribe/endpoints/00.yaml | 8 +- .scribe/intro.md | 2 +- composer.json | 17 +- composer.lock | 3234 ++++++++++------- public/docs/collection.json | 14 +- public/docs/index.html | 66 +- ...fault-5.7.0.js => theme-default-5.11.0.js} | 0 .../{tryitout-5.7.0.js => tryitout-5.11.0.js} | 0 public/docs/openapi.yaml | 16 +- 11 files changed, 2071 insertions(+), 1296 deletions(-) rename public/docs/js/{theme-default-5.7.0.js => theme-default-5.11.0.js} (100%) rename public/docs/js/{tryitout-5.7.0.js => tryitout-5.11.0.js} (100%) diff --git a/.scribe/.filehashes b/.scribe/.filehashes index 3c40980..6b26fd1 100644 --- a/.scribe/.filehashes +++ b/.scribe/.filehashes @@ -1,4 +1,4 @@ # GENERATED. YOU SHOULDN'T MODIFY OR DELETE THIS FILE. # Scribe uses this file to know when you change something manually in your docs. -.scribe/intro.md=8bb0d194a44763d2475790ad762146f6 +.scribe/intro.md=4bf90470e636417926ae5d9227747d45 .scribe/auth.md=746f48b79e90fe18e6fa4af62e30b2fe \ No newline at end of file diff --git a/.scribe/endpoints.cache/00.yaml b/.scribe/endpoints.cache/00.yaml index ac31904..2f6ff97 100644 --- a/.scribe/endpoints.cache/00.yaml +++ b/.scribe/endpoints.cache/00.yaml @@ -80,7 +80,7 @@ endpoints: - custom: [] status: 201 - content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-02-23T19:05:13+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:17:41+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Registration succeeded.' - @@ -159,7 +159,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-02-23T19:05:13+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:17:41+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Login succeeded.' - @@ -448,7 +448,7 @@ endpoints: id: custom: [] name: id - description: 'The id of an existing record in the users table.' + description: 'Must match an existing stored value.' required: true example: architecto type: string @@ -519,7 +519,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"","type":"users","attributes":{"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-02-23T19:05:13+00:00","created_at":null,"updated_at":null}}}' + content: '{"data":{"id":"","type":"users","attributes":{"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:17:41+00:00","created_at":null,"updated_at":null}}}' headers: [] description: 'Authenticated user profile.' - diff --git a/.scribe/endpoints/00.yaml b/.scribe/endpoints/00.yaml index d228749..77e630f 100644 --- a/.scribe/endpoints/00.yaml +++ b/.scribe/endpoints/00.yaml @@ -78,7 +78,7 @@ endpoints: - custom: [] status: 201 - content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-02-23T19:05:13+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:17:41+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Registration succeeded.' - @@ -157,7 +157,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-02-23T19:05:13+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:17:41+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Login succeeded.' - @@ -446,7 +446,7 @@ endpoints: id: custom: [] name: id - description: 'The id of an existing record in the users table.' + description: 'Must match an existing stored value.' required: true example: architecto type: string @@ -517,7 +517,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"","type":"users","attributes":{"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-02-23T19:05:13+00:00","created_at":null,"updated_at":null}}}' + content: '{"data":{"id":"","type":"users","attributes":{"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:17:41+00:00","created_at":null,"updated_at":null}}}' headers: [] description: 'Authenticated user profile.' - diff --git a/.scribe/intro.md b/.scribe/intro.md index fe09058..95f6bdf 100644 --- a/.scribe/intro.md +++ b/.scribe/intro.md @@ -3,7 +3,7 @@ This documentation aims to provide all the information you need to work with our API. diff --git a/composer.json b/composer.json index a23f2f3..13806b6 100644 --- a/composer.json +++ b/composer.json @@ -1,16 +1,19 @@ { "$schema": "https://getcomposer.org/schema.json", - "name": "laravel/laravel", + "name": "juststeveking/kit", "type": "project", - "description": "The skeleton application for the Laravel framework.", + "description": "Opinionated Laravel API starter kit: token authentication, standards-compliant HTTP via api-toolbox, and contract-tested OpenAPI docs.", "keywords": [ "laravel", - "framework" + "api", + "starter-kit", + "sanctum", + "rfc9457" ], "license": "MIT", "require": { "php": "^8.5", - "laravel/framework": "^12.0", + "laravel/framework": "^13.30", "laravel/sanctum": "^4.3", "laravel/tinker": "^3.0", "readalizer/readalizer": "^1.0" @@ -18,8 +21,8 @@ "require-dev": { "driftingly/rector-laravel": "^2.1", "fakerphp/faker": "^1.23", - "knuckleswtf/scribe": "^5.7", - "larastan/larastan": "3.x-dev", + "knuckleswtf/scribe": "^5.11", + "larastan/larastan": "^3.9", "laravel/boost": "^2.4", "laravel/pail": "^1.2.5", "laravel/pint": "^1.27", @@ -102,6 +105,6 @@ "php-http/discovery": true } }, - "minimum-stability": "dev", + "minimum-stability": "stable", "prefer-stable": true } diff --git a/composer.lock b/composer.lock index 032c514..c60cf71 100644 --- a/composer.lock +++ b/composer.lock @@ -4,28 +4,28 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e2927981b2bb969c5fe0eef78a192e08", + "content-hash": "85e3b9cc1da14fcd4cab4bed78df373f", "packages": [ { "name": "brick/math", - "version": "0.14.8", + "version": "1.0.0", "source": { "type": "git", "url": "https://github.com/brick/math.git", - "reference": "63422359a44b7f06cae63c3b429b59e8efcc0629" + "reference": "2effe05d2177c451b86c6a073196a4034c02f211" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/63422359a44b7f06cae63c3b429b59e8efcc0629", - "reference": "63422359a44b7f06cae63c3b429b59e8efcc0629", + "url": "https://api.github.com/repos/brick/math/zipball/2effe05d2177c451b86c6a073196a4034c02f211", + "reference": "2effe05d2177c451b86c6a073196a4034c02f211", "shasum": "" }, "require": { "php": "^8.2" }, "require-dev": { - "php-coveralls/php-coveralls": "^2.2", - "phpstan/phpstan": "2.1.22", + "phpstan/phpstan": "2.2.13", + "phpstan/phpstan-phpunit": "2.0.18", "phpunit/phpunit": "^11.5" }, "type": "library", @@ -56,7 +56,7 @@ ], "support": { "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.14.8" + "source": "https://github.com/brick/math/tree/1.0.0" }, "funding": [ { @@ -64,20 +64,20 @@ "type": "github" } ], - "time": "2026-02-10T14:33:43+00:00" + "time": "2026-09-12T10:28:18+00:00" }, { "name": "carbonphp/carbon-doctrine-types", - "version": "3.2.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", - "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d" + "reference": "5fa5eacafd9ef47c8c6ab9143fc901ba0194d3dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/18ba5ddfec8976260ead6e866180bd5d2f71aa1d", - "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d", + "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/5fa5eacafd9ef47c8c6ab9143fc901ba0194d3dc", + "reference": "5fa5eacafd9ef47c8c6ab9143fc901ba0194d3dc", "shasum": "" }, "require": { @@ -92,6 +92,11 @@ "phpunit/phpunit": "^10.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, "autoload": { "psr-4": { "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" @@ -117,7 +122,7 @@ ], "support": { "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", - "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0" + "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.1" }, "funding": [ { @@ -133,7 +138,7 @@ "type": "tidelift" } ], - "time": "2024-02-09T16:56:22+00:00" + "time": "2026-09-06T14:11:38+00:00" }, { "name": "dflydev/dot-access-data", @@ -302,27 +307,25 @@ }, { "name": "doctrine/lexer", - "version": "3.0.1", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/doctrine/lexer.git", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd" + "reference": "71d305eaa6480d3d3460c7d053d1da7749fa9cca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/lexer/zipball/31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", - "reference": "31ad66abc0fc9e1a1f2d9bc6a42668d2fbbcd6dd", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/71d305eaa6480d3d3460c7d053d1da7749fa9cca", + "reference": "71d305eaa6480d3d3460c7d053d1da7749fa9cca", "shasum": "" }, "require": { "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^12", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.5", - "psalm/plugin-phpunit": "^0.18.3", - "vimeo/psalm": "^5.21" + "doctrine/coding-standard": "^14", + "phpstan/phpstan": "^2", + "phpunit/phpunit": "^10.5.58 || ^12.5.4" }, "type": "library", "autoload": { @@ -359,7 +362,7 @@ ], "support": { "issues": "https://github.com/doctrine/lexer/issues", - "source": "https://github.com/doctrine/lexer/tree/3.0.1" + "source": "https://github.com/doctrine/lexer/tree/3.0.3" }, "funding": [ { @@ -375,20 +378,20 @@ "type": "tidelift" } ], - "time": "2024-02-05T11:56:58+00:00" + "time": "2026-10-01T06:59:29+00:00" }, { "name": "dragonmantank/cron-expression", - "version": "v3.6.0", + "version": "v3.6.1", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "d61a8a9604ec1f8c3d150d09db6ce98b32675013" + "reference": "4189372ffeff09bf14f731f67a9de90c7b413ebe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/d61a8a9604ec1f8c3d150d09db6ce98b32675013", - "reference": "d61a8a9604ec1f8c3d150d09db6ce98b32675013", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/4189372ffeff09bf14f731f67a9de90c7b413ebe", + "reference": "4189372ffeff09bf14f731f67a9de90c7b413ebe", "shasum": "" }, "require": { @@ -399,8 +402,8 @@ }, "require-dev": { "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan": "^1.12.32|^2.1.31", - "phpunit/phpunit": "^8.5.48|^9.0" + "phpstan/phpstan": "^2.1.31", + "phpunit/phpunit": "^11.5.43 || ^12.4" }, "type": "library", "extra": { @@ -431,7 +434,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.6.0" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.6.1" }, "funding": [ { @@ -439,7 +442,7 @@ "type": "github" } ], - "time": "2025-10-31T18:51:33+00:00" + "time": "2026-10-19T17:53:57+00:00" }, { "name": "egulias/email-validator", @@ -581,24 +584,24 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.1.4", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "e01f4a821471308ba86aa202fed6698b6b695e3b" + "reference": "adccca3324eece92ca35463648c12b9e6293c05b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/e01f4a821471308ba86aa202fed6698b6b695e3b", - "reference": "e01f4a821471308ba86aa202fed6698b6b695e3b", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/adccca3324eece92ca35463648c12b9e6293c05b", + "reference": "adccca3324eece92ca35463648c12b9e6293c05b", "shasum": "" }, "require": { "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.5" + "phpoption/phpoption": "^1.10" }, "require-dev": { - "phpunit/phpunit": "^8.5.41 || ^9.6.22 || ^10.5.45 || ^11.5.7" + "phpunit/phpunit": "^8.5.52 || ^9.6.34 || ^10.5.63 || ^11.5.55 || ^12.5.14" }, "type": "library", "autoload": { @@ -627,7 +630,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.4" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.2.0" }, "funding": [ { @@ -639,29 +642,31 @@ "type": "tidelift" } ], - "time": "2025-12-27T19:43:20+00:00" + "time": "2026-08-24T09:06:52+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.10.0", + "version": "8.3.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4" + "reference": "b920e5fcaf81d761b8fabe600ca90999beaefdb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b51ac707cfa420b7bfd4e4d5e510ba8008e822b4", - "reference": "b51ac707cfa420b7bfd4e4d5e510ba8008e822b4", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b920e5fcaf81d761b8fabe600ca90999beaefdb7", + "reference": "b920e5fcaf81d761b8fabe600ca90999beaefdb7", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^2.3", - "guzzlehttp/psr7": "^2.8", - "php": "^7.2.5 || ^8.0", + "guzzlehttp/promises": "^3.1", + "guzzlehttp/psr7": "^3.2", + "php": "^7.4 || ^8.0", "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" + "psr/http-factory": "^1.0", + "symfony/polyfill-php80": "^1.25", + "symfony/polyfill-php82": "^1.27" }, "provide": { "psr/http-client-implementation": "1.0" @@ -669,9 +674,10 @@ "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", - "guzzle/client-integration-tests": "3.0.2", + "guzzle/client-integration-tests": "4.0.1", + "guzzlehttp/test-server": "^1.1", "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.39 || ^9.6.20", + "phpunit/phpunit": "^9.6.34", "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { @@ -687,9 +693,6 @@ } }, "autoload": { - "files": [ - "src/functions_include.php" - ], "psr-4": { "GuzzleHttp\\": "src/" } @@ -749,7 +752,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.10.0" + "source": "https://github.com/guzzle/guzzle/tree/8.3.0" }, "funding": [ { @@ -765,28 +768,29 @@ "type": "tidelift" } ], - "time": "2025-08-23T22:36:01+00:00" + "time": "2026-10-18T13:38:43+00:00" }, { "name": "guzzlehttp/promises", - "version": "2.3.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "481557b130ef3790cf82b713667b43030dc9c957" + "reference": "094d0ec418eb3b1411ea271a180ec95cae6ae933" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/481557b130ef3790cf82b713667b43030dc9c957", - "reference": "481557b130ef3790cf82b713667b43030dc9c957", + "url": "https://api.github.com/repos/guzzle/promises/zipball/094d0ec418eb3b1411ea271a180ec95cae6ae933", + "reference": "094d0ec418eb3b1411ea271a180ec95cae6ae933", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0" + "php": "^7.4 || ^8.0", + "symfony/deprecation-contracts": "^2.5 || ^3.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.44 || ^9.6.25" + "phpunit/phpunit": "^9.6.34" }, "type": "library", "extra": { @@ -832,7 +836,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.3.0" + "source": "https://github.com/guzzle/promises/tree/3.1.0" }, "funding": [ { @@ -848,36 +852,39 @@ "type": "tidelift" } ], - "time": "2025-08-22T14:34:08+00:00" + "time": "2026-10-18T12:48:16+00:00" }, { "name": "guzzlehttp/psr7", - "version": "2.8.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "21dc724a0583619cd1652f673303492272778051" + "reference": "cdc139396207a5eba10c242d241fb014cb098390" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/21dc724a0583619cd1652f673303492272778051", - "reference": "21dc724a0583619cd1652f673303492272778051", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/cdc139396207a5eba10c242d241fb014cb098390", + "reference": "cdc139396207a5eba10c242d241fb014cb098390", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "ralouphie/getallheaders": "^3.0" + "php": "^7.4 || ^8.0", + "psr/http-factory": "^1.1", + "psr/http-message": "^2.0", + "symfony/polyfill-php80": "^1.25", + "symfony/polyfill-php82": "^1.27" }, "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" + "psr/http-factory-implementation": "1.1", + "psr/http-message-implementation": "2.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "0.9.0", - "phpunit/phpunit": "^8.5.44 || ^9.6.25" + "http-interop/http-factory-tests": "1.1.0", + "jshttp/mime-db": "1.54.0.1", + "php-http/psr7-integration-tests": "^1.5.1", + "phpunit/phpunit": "^9.6.34" }, "suggest": { "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" @@ -948,7 +955,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.8.0" + "source": "https://github.com/guzzle/psr7/tree/3.2.0" }, "funding": [ { @@ -964,30 +971,30 @@ "type": "tidelift" } ], - "time": "2025-08-23T21:21:41+00:00" + "time": "2026-10-17T23:57:19+00:00" }, { "name": "guzzlehttp/uri-template", - "version": "v1.0.5", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/guzzle/uri-template.git", - "reference": "4f4bbd4e7172148801e76e3decc1e559bdee34e1" + "reference": "7a466ad606491eb6528c717482f7cca77f1851f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/uri-template/zipball/4f4bbd4e7172148801e76e3decc1e559bdee34e1", - "reference": "4f4bbd4e7172148801e76e3decc1e559bdee34e1", + "url": "https://api.github.com/repos/guzzle/uri-template/zipball/7a466ad606491eb6528c717482f7cca77f1851f3", + "reference": "7a466ad606491eb6528c717482f7cca77f1851f3", "shasum": "" }, "require": { - "php": "^7.2.5 || ^8.0", - "symfony/polyfill-php80": "^1.24" + "php": "^7.4 || ^8.0", + "symfony/polyfill-php80": "^1.25" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.44 || ^9.6.25", - "uri-template/tests": "1.0.0" + "phpunit/phpunit": "^9.6.34", + "uri-template/tests": "1.0.2" }, "type": "library", "extra": { @@ -1034,7 +1041,7 @@ ], "support": { "issues": "https://github.com/guzzle/uri-template/issues", - "source": "https://github.com/guzzle/uri-template/tree/v1.0.5" + "source": "https://github.com/guzzle/uri-template/tree/v2.0.1" }, "funding": [ { @@ -1050,28 +1057,28 @@ "type": "tidelift" } ], - "time": "2025-08-22T14:27:06+00:00" + "time": "2026-08-24T17:13:02+00:00" }, { "name": "laravel/framework", - "version": "v12.52.0", + "version": "v13.37.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "d5511fa74f4608dbb99864198b1954042aa8d5a7" + "reference": "685f8d6c2ab4547287500bc80ccdf2ca12635109" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/d5511fa74f4608dbb99864198b1954042aa8d5a7", - "reference": "d5511fa74f4608dbb99864198b1954042aa8d5a7", + "url": "https://api.github.com/repos/laravel/framework/zipball/685f8d6c2ab4547287500bc80ccdf2ca12635109", + "reference": "685f8d6c2ab4547287500bc80ccdf2ca12635109", "shasum": "" }, "require": { - "brick/math": "^0.11|^0.12|^0.13|^0.14", + "brick/math": "^0.14.2 || ^0.15 || ^0.16 || ^0.17 || ^0.18 || ^0.19 || ^0.20 || ^1.0", "composer-runtime-api": "^2.2", "doctrine/inflector": "^2.0.5", "dragonmantank/cron-expression": "^3.4", - "egulias/email-validator": "^3.2.1|^4.0", + "egulias/email-validator": "^4.0", "ext-ctype": "*", "ext-filter": "*", "ext-hash": "*", @@ -1080,36 +1087,39 @@ "ext-session": "*", "ext-tokenizer": "*", "fruitcake/php-cors": "^1.3", - "guzzlehttp/guzzle": "^7.8.2", - "guzzlehttp/uri-template": "^1.0", - "laravel/prompts": "^0.3.0", - "laravel/serializable-closure": "^1.3|^2.0", - "league/commonmark": "^2.7", + "guzzlehttp/guzzle": "^7.8.2 || ^8.0", + "guzzlehttp/promises": "^2.0.3 || ^3.0", + "guzzlehttp/psr7": "^2.9 || ^3.0", + "guzzlehttp/uri-template": "^1.0 || ^2.0", + "laravel/prompts": "^0.3.25", + "laravel/serializable-closure": "^2.0.10", + "league/commonmark": "^2.8.1", "league/flysystem": "^3.25.1", "league/flysystem-local": "^3.25.1", "league/uri": "^7.5.1", - "monolog/monolog": "^3.0", + "monolog/monolog": "^3.10", "nesbot/carbon": "^3.8.4", "nunomaduro/termwind": "^2.0", - "php": "^8.2", - "psr/container": "^1.1.1|^2.0.1", - "psr/log": "^1.0|^2.0|^3.0", - "psr/simple-cache": "^1.0|^2.0|^3.0", + "php": "^8.3", + "psr/container": "^1.1.1 || ^2.0.1", + "psr/http-message": "^1.0 || ^2.0", + "psr/log": "^1.0 || ^2.0 || ^3.0", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0", "ramsey/uuid": "^4.7", - "symfony/console": "^7.2.0", - "symfony/error-handler": "^7.2.0", - "symfony/finder": "^7.2.0", - "symfony/http-foundation": "^7.2.0", - "symfony/http-kernel": "^7.2.0", - "symfony/mailer": "^7.2.0", - "symfony/mime": "^7.2.0", - "symfony/polyfill-php83": "^1.33", - "symfony/polyfill-php84": "^1.33", - "symfony/polyfill-php85": "^1.33", - "symfony/process": "^7.2.0", - "symfony/routing": "^7.2.0", - "symfony/uid": "^7.2.0", - "symfony/var-dumper": "^7.2.0", + "symfony/console": "^7.4.0 || ^8.0.0", + "symfony/error-handler": "^7.4.0 || ^8.0.0", + "symfony/finder": "^7.4.0 || ^8.0.0", + "symfony/http-foundation": "^7.4.0 || ^8.0.0", + "symfony/http-kernel": "^7.4.0 || ^8.0.0", + "symfony/mailer": "^7.4.0 || ^8.0.0", + "symfony/mime": "^7.4.0 || ^8.0.0", + "symfony/polyfill-php84": "^1.36", + "symfony/polyfill-php85": "^1.36", + "symfony/polyfill-php86": "^1.36", + "symfony/process": "^7.4.5 || ^8.0.5", + "symfony/routing": "^7.4.0 || ^8.0.0", + "symfony/uid": "^7.4.0 || ^8.0.0", + "symfony/var-dumper": "^7.4.0 || ^8.0.0", "tijsverkoyen/css-to-inline-styles": "^2.2.5", "vlucas/phpdotenv": "^5.6.1", "voku/portable-ascii": "^2.0.2" @@ -1118,9 +1128,9 @@ "tightenco/collect": "<5.5.33" }, "provide": { - "psr/container-implementation": "1.1|2.0", - "psr/log-implementation": "1.0|2.0|3.0", - "psr/simple-cache-implementation": "1.0|2.0|3.0" + "psr/container-implementation": "1.1 || 2.0", + "psr/log-implementation": "1.0 || 2.0 || 3.0", + "psr/simple-cache-implementation": "1.0 || 2.0 || 3.0" }, "replace": { "illuminate/auth": "self.version", @@ -1141,6 +1151,7 @@ "illuminate/filesystem": "self.version", "illuminate/hashing": "self.version", "illuminate/http": "self.version", + "illuminate/image": "self.version", "illuminate/json-schema": "self.version", "illuminate/log": "self.version", "illuminate/macroable": "self.version", @@ -1166,8 +1177,7 @@ "aws/aws-sdk-php": "^3.322.9", "ext-gmp": "*", "fakerphp/faker": "^1.24", - "guzzlehttp/promises": "^2.0.3", - "guzzlehttp/psr7": "^2.4", + "intervention/image": "^4.2", "laravel/pint": "^1.18", "league/flysystem-aws-s3-v3": "^3.25.1", "league/flysystem-ftp": "^3.25.1", @@ -1176,22 +1186,25 @@ "league/flysystem-sftp-v3": "^3.25.1", "mockery/mockery": "^1.6.10", "opis/json-schema": "^2.4.1", - "orchestra/testbench-core": "^10.9.0", - "pda/pheanstalk": "^5.0.6|^7.0.0", + "orchestra/testbench-core": "^11.6.0", + "pda/pheanstalk": "^7.0.0 || ^8.0.0", "php-http/discovery": "^1.15", - "phpstan/phpstan": "^2.0", - "phpunit/phpunit": "^10.5.35|^11.5.3|^12.0.1", - "predis/predis": "^2.3|^3.0", - "resend/resend-php": "^0.10.0|^1.0", - "symfony/cache": "^7.2.0", - "symfony/http-client": "^7.2.0", - "symfony/psr-http-message-bridge": "^7.2.0", - "symfony/translation": "^7.2.0" + "phpstan/phpstan": "2.3.1", + "phpunit/phpunit": "^11.5.50 || ^12.5.8 || ^13.0.3", + "predis/predis": "^2.3 || ^3.0", + "rector/rector": "2.6.3", + "resend/resend-php": "^1.0", + "symfony/cache": "^7.4.0 || ^8.0.0", + "symfony/http-client": "^7.4.0 || ^8.0.0", + "symfony/mercure": "^0.8.0", + "symfony/psr-http-message-bridge": "^7.4.0 || ^8.0.0", + "symfony/translation": "^7.4.0 || ^8.0.0", + "web-token/jwt-library": "^4.1" }, "suggest": { "ably/ably-php": "Required to use the Ably broadcast driver (^1.0).", "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage, and SES mail driver (^3.322.9).", - "brianium/paratest": "Required to run tests in parallel (^7.0|^8.0).", + "brianium/paratest": "Required to run tests in parallel (^7.0 || ^8.0).", "ext-apcu": "Required to use the APC cache driver.", "ext-fileinfo": "Required to use the Filesystem class.", "ext-ftp": "Required to use the Flysystem FTP driver.", @@ -1200,9 +1213,10 @@ "ext-pcntl": "Required to use all features of the queue worker and console signal trapping.", "ext-pdo": "Required to use all database features.", "ext-posix": "Required to use all features of the queue worker.", - "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0|^6.0).", + "ext-redis": "Required to use the Redis cache and queue drivers (^4.0 || ^5.0 || ^6.0).", "fakerphp/faker": "Required to generate fake data using the fake() helper (^1.23).", "filp/whoops": "Required for friendly error pages in development (^2.14.3).", + "intervention/image": "Required to use the image processing features (^4.2).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.25.1).", "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.25.1).", @@ -1210,24 +1224,26 @@ "league/flysystem-read-only": "Required to use read-only disks (^3.25.1)", "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.25.1).", "mockery/mockery": "Required to use mocking (^1.6).", - "pda/pheanstalk": "Required to use the beanstalk queue driver (^5.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (^7.0 || ^8.0).", "php-http/discovery": "Required to use PSR-7 bridging features (^1.15).", - "phpunit/phpunit": "Required to use assertions and run tests (^10.5.35|^11.5.3|^12.0.1).", - "predis/predis": "Required to use the predis connector (^2.3|^3.0).", - "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0|^7.0).", - "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0|^1.0).", - "symfony/cache": "Required to PSR-6 cache bridge (^7.2).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^7.2).", - "symfony/http-client": "Required to enable support for the Symfony API mail transports (^7.2).", - "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^7.2).", - "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^7.2).", - "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^7.2)." + "phpunit/phpunit": "Required to use assertions and run tests (^11.5.50 || ^12.5.8 || ^13.0.3).", + "predis/predis": "Required to use the predis connector (^2.3 || ^3.0).", + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^6.0 || ^7.0).", + "resend/resend-php": "Required to enable support for the Resend mail transport (^0.10.0 || ^1.0).", + "spatie/fork": "Required to use the 'fork' concurrency driver (^1.2).", + "symfony/cache": "Required to PSR-6 cache bridge (^7.4 || ^8.0).", + "symfony/filesystem": "Required to enable support for relative symbolic links (^7.4 || ^8.0).", + "symfony/http-client": "Required to enable support for the Symfony API mail transports (^7.4 || ^8.0).", + "symfony/mailgun-mailer": "Required to enable support for the Mailgun mail transport (^7.4 || ^8.0).", + "symfony/mercure": "Required to use the Mercure broadcast driver (^0.8).", + "symfony/postmark-mailer": "Required to enable support for the Postmark mail transport (^7.4 || ^8.0).", + "symfony/psr-http-message-bridge": "Required to use PSR-7 bridging features (^7.4 || ^8.0).", + "web-token/jwt-library": "Required to sign Mercure JWTs and use end-to-end encrypted channels (^4.1)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "12.x-dev" + "dev-master": "13.0.x-dev" } }, "autoload": { @@ -1272,20 +1288,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2026-02-17T17:07:04+00:00" + "time": "2026-10-16T04:59:27+00:00" }, { "name": "laravel/prompts", - "version": "v0.3.13", + "version": "v0.3.26", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "ed8c466571b37e977532fb2fd3c272c784d7050d" + "reference": "2d1e9bf6bab8d3f383c254db7f2b4ea8816d55e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/ed8c466571b37e977532fb2fd3c272c784d7050d", - "reference": "ed8c466571b37e977532fb2fd3c272c784d7050d", + "url": "https://api.github.com/repos/laravel/prompts/zipball/2d1e9bf6bab8d3f383c254db7f2b4ea8816d55e0", + "reference": "2d1e9bf6bab8d3f383c254db7f2b4ea8816d55e0", "shasum": "" }, "require": { @@ -1328,23 +1344,22 @@ ], "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { - "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.3.13" + "source": "https://github.com/laravel/prompts/tree/v0.3.26" }, - "time": "2026-02-06T12:17:10+00:00" + "time": "2026-10-09T14:45:13+00:00" }, { "name": "laravel/sanctum", - "version": "v4.3.1", + "version": "v4.3.3", "source": { "type": "git", "url": "https://github.com/laravel/sanctum.git", - "reference": "e3b85d6e36ad00e5db2d1dcc27c81ffdf15cbf76" + "reference": "fee27a573d1a013af3721d86153a65e0b11927e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sanctum/zipball/e3b85d6e36ad00e5db2d1dcc27c81ffdf15cbf76", - "reference": "e3b85d6e36ad00e5db2d1dcc27c81ffdf15cbf76", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/fee27a573d1a013af3721d86153a65e0b11927e6", + "reference": "fee27a573d1a013af3721d86153a65e0b11927e6", "shasum": "" }, "require": { @@ -1394,20 +1409,20 @@ "issues": "https://github.com/laravel/sanctum/issues", "source": "https://github.com/laravel/sanctum" }, - "time": "2026-02-07T17:19:31+00:00" + "time": "2026-06-23T18:26:55+00:00" }, { "name": "laravel/serializable-closure", - "version": "v2.0.9", + "version": "v2.1.0", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "8f631589ab07b7b52fead814965f5a800459cb3e" + "reference": "2d5869a838bbcf37e0d8b0568fc41914e81374b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/8f631589ab07b7b52fead814965f5a800459cb3e", - "reference": "8f631589ab07b7b52fead814965f5a800459cb3e", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/2d5869a838bbcf37e0d8b0568fc41914e81374b5", + "reference": "2d5869a838bbcf37e0d8b0568fc41914e81374b5", "shasum": "" }, "require": { @@ -1455,20 +1470,20 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2026-02-03T06:55:34+00:00" + "time": "2026-09-22T14:32:34+00:00" }, { "name": "laravel/tinker", - "version": "dev-master", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/laravel/tinker.git", - "reference": "c0bf371713fc6d54860cc599e52b4bfa654c2a30" + "reference": "4faba77764bd33411735936acdf30446d058c78b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/c0bf371713fc6d54860cc599e52b4bfa654c2a30", - "reference": "c0bf371713fc6d54860cc599e52b4bfa654c2a30", + "url": "https://api.github.com/repos/laravel/tinker/zipball/4faba77764bd33411735936acdf30446d058c78b", + "reference": "4faba77764bd33411735936acdf30446d058c78b", "shasum": "" }, "require": { @@ -1522,22 +1537,22 @@ ], "support": { "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/master" + "source": "https://github.com/laravel/tinker/tree/v3.0.2" }, - "time": "2026-02-04T15:25:55+00:00" + "time": "2026-03-17T14:54:13+00:00" }, { "name": "league/commonmark", - "version": "2.8.0", + "version": "2.10.4", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "4efa10c1e56488e658d10adf7b7b7dcd19940bfb" + "reference": "40821b7606d8d946bac57dbd2290076c722e3a65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/4efa10c1e56488e658d10adf7b7b7dcd19940bfb", - "reference": "4efa10c1e56488e658d10adf7b7b7dcd19940bfb", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/40821b7606d8d946bac57dbd2290076c722e3a65", + "reference": "40821b7606d8d946bac57dbd2290076c722e3a65", "shasum": "" }, "require": { @@ -1559,12 +1574,12 @@ "github/gfm": "0.29.0", "michelf/php-markdown": "^1.4 || ^2.0", "nyholm/psr7": "^1.5", - "phpstan/phpstan": "^1.8.2", - "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0", + "phpstan/phpstan": "^2.0.0", + "phpunit/phpunit": "^9.5.21 || ^10.5.9 || ^11.0.0 || ^12.0.0 || ^13.0.0", "scrutinizer/ocular": "^1.8.1", - "symfony/finder": "^5.3 | ^6.0 | ^7.0", - "symfony/process": "^5.4 | ^6.0 | ^7.0", - "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0", + "symfony/finder": "^5.3 | ^6.0 | ^7.0 || ^8.0", + "symfony/process": "^5.4 | ^6.0 | ^7.0 || ^8.0", + "symfony/yaml": "^2.3 | ^3.0 | ^4.0 | ^5.0 | ^6.0 | ^7.0 || ^8.0", "unleashedtech/php-coding-standard": "^3.1.1", "vimeo/psalm": "^4.24.0 || ^5.0.0 || ^6.0.0" }, @@ -1574,7 +1589,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.9-dev" + "dev-main": "2.11-dev" } }, "autoload": { @@ -1631,7 +1646,7 @@ "type": "tidelift" } ], - "time": "2025-11-26T21:48:24+00:00" + "time": "2026-10-17T19:59:50+00:00" }, { "name": "league/config", @@ -1717,16 +1732,16 @@ }, { "name": "league/flysystem", - "version": "3.31.0", + "version": "3.36.0", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "1717e0b3642b0df65ecb0cc89cdd99fa840672ff" + "reference": "f7fb152932f30072d573510cbd4dd657d6475b25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/1717e0b3642b0df65ecb0cc89cdd99fa840672ff", - "reference": "1717e0b3642b0df65ecb0cc89cdd99fa840672ff", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f7fb152932f30072d573510cbd4dd657d6475b25", + "reference": "f7fb152932f30072d573510cbd4dd657d6475b25", "shasum": "" }, "require": { @@ -1794,22 +1809,22 @@ ], "support": { "issues": "https://github.com/thephpleague/flysystem/issues", - "source": "https://github.com/thephpleague/flysystem/tree/3.31.0" + "source": "https://github.com/thephpleague/flysystem/tree/3.36.0" }, - "time": "2026-01-23T15:38:47+00:00" + "time": "2026-09-02T08:00:27+00:00" }, { "name": "league/flysystem-local", - "version": "3.31.0", + "version": "3.35.3", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem-local.git", - "reference": "2f669db18a4c20c755c2bb7d3a7b0b2340488079" + "reference": "a099b24dce160f3b2239043d13d47c4a1a214ea4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/2f669db18a4c20c755c2bb7d3a7b0b2340488079", - "reference": "2f669db18a4c20c755c2bb7d3a7b0b2340488079", + "url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/a099b24dce160f3b2239043d13d47c4a1a214ea4", + "reference": "a099b24dce160f3b2239043d13d47c4a1a214ea4", "shasum": "" }, "require": { @@ -1843,22 +1858,22 @@ "local" ], "support": { - "source": "https://github.com/thephpleague/flysystem-local/tree/3.31.0" + "source": "https://github.com/thephpleague/flysystem-local/tree/3.35.3" }, - "time": "2026-01-23T15:30:45+00:00" + "time": "2026-08-12T13:29:21+00:00" }, { "name": "league/mime-type-detection", - "version": "1.16.0", + "version": "1.17.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9" + "reference": "f5f47eff7c48ed1003069a2ca67f316fb4021c76" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/2d6702ff215bf922936ccc1ad31007edc76451b9", - "reference": "2d6702ff215bf922936ccc1ad31007edc76451b9", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/f5f47eff7c48ed1003069a2ca67f316fb4021c76", + "reference": "f5f47eff7c48ed1003069a2ca67f316fb4021c76", "shasum": "" }, "require": { @@ -1868,7 +1883,7 @@ "require-dev": { "friendsofphp/php-cs-fixer": "^3.2", "phpstan/phpstan": "^0.12.68", - "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0" + "phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0 || ^11.0 || ^12.0" }, "type": "library", "autoload": { @@ -1889,7 +1904,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.16.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.17.0" }, "funding": [ { @@ -1901,24 +1916,25 @@ "type": "tidelift" } ], - "time": "2024-09-21T08:32:55+00:00" + "time": "2026-07-09T11:49:27+00:00" }, { "name": "league/uri", - "version": "7.8.0", + "version": "7.9.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "4436c6ec8d458e4244448b069cc572d088230b76" + "reference": "fcc872a3d872aa13f935e0cd1887b9abb06da07f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/4436c6ec8d458e4244448b069cc572d088230b76", - "reference": "4436c6ec8d458e4244448b069cc572d088230b76", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/fcc872a3d872aa13f935e0cd1887b9abb06da07f", + "reference": "fcc872a3d872aa13f935e0cd1887b9abb06da07f", "shasum": "" }, "require": { - "league/uri-interfaces": "^7.8", + "ext-mbstring": "*", + "league/uri-interfaces": "^7.9.0", "php": "^8.1", "psr/http-factory": "^1" }, @@ -1991,7 +2007,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.8.0" + "source": "https://github.com/thephpleague/uri/tree/7.9.0" }, "funding": [ { @@ -1999,20 +2015,20 @@ "type": "github" } ], - "time": "2026-01-14T17:24:56+00:00" + "time": "2026-10-16T15:19:33+00:00" }, { "name": "league/uri-interfaces", - "version": "7.8.0", + "version": "7.9.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "c5c5cd056110fc8afaba29fa6b72a43ced42acd4" + "reference": "eb5f6d24e6a4fe0a8e9c78ded4eb1dfff1404f58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/c5c5cd056110fc8afaba29fa6b72a43ced42acd4", - "reference": "c5c5cd056110fc8afaba29fa6b72a43ced42acd4", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/eb5f6d24e6a4fe0a8e9c78ded4eb1dfff1404f58", + "reference": "eb5f6d24e6a4fe0a8e9c78ded4eb1dfff1404f58", "shasum": "" }, "require": { @@ -2075,7 +2091,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.8.0" + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.9.0" }, "funding": [ { @@ -2083,20 +2099,20 @@ "type": "github" } ], - "time": "2026-01-15T06:54:53+00:00" + "time": "2026-10-16T15:19:33+00:00" }, { "name": "monolog/monolog", - "version": "3.10.0", + "version": "3.12.1", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0" + "reference": "d7059e4c691d05ea1222b5124bed0f961be46e15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/b321dd6749f0bf7189444158a3ce785cc16d69b0", - "reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/d7059e4c691d05ea1222b5124bed0f961be46e15", + "reference": "d7059e4c691d05ea1222b5124bed0f961be46e15", "shasum": "" }, "require": { @@ -2122,6 +2138,7 @@ "phpstan/phpstan-strict-rules": "^2", "phpunit/phpunit": "^10.5.17 || ^11.0.7", "predis/predis": "^1.1 || ^2", + "psr/clock": "^1.0", "rollbar/rollbar": "^4.0", "ruflin/elastica": "^7 || ^8", "symfony/mailer": "^5.4 || ^6", @@ -2140,6 +2157,7 @@ "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "psr/clock": "Required to pass a clock to the Logger and control the timestamp of log records", "rollbar/rollbar": "Allow sending log messages to Rollbar", "ruflin/elastica": "Allow sending log messages to an Elastic Search server" }, @@ -2174,7 +2192,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.10.0" + "source": "https://github.com/Seldaek/monolog/tree/3.12.1" }, "funding": [ { @@ -2186,20 +2204,20 @@ "type": "tidelift" } ], - "time": "2026-01-02T08:56:05+00:00" + "time": "2026-09-29T19:21:12+00:00" }, { "name": "nesbot/carbon", - "version": "3.11.1", + "version": "3.15.0", "source": { "type": "git", "url": "https://github.com/CarbonPHP/carbon.git", - "reference": "f438fcc98f92babee98381d399c65336f3a3827f" + "reference": "217d38553209bdb44e01590d9e9a2e4df8354cce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/f438fcc98f92babee98381d399c65336f3a3827f", - "reference": "f438fcc98f92babee98381d399c65336f3a3827f", + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/217d38553209bdb44e01590d9e9a2e4df8354cce", + "reference": "217d38553209bdb44e01590d9e9a2e4df8354cce", "shasum": "" }, "require": { @@ -2209,6 +2227,7 @@ "psr/clock": "^1.0", "symfony/clock": "^6.3.12 || ^7.0 || ^8.0", "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-time": "^1.0", "symfony/translation": "^4.4.18 || ^5.2.1 || ^6.0 || ^7.0 || ^8.0" }, "provide": { @@ -2219,7 +2238,7 @@ "doctrine/orm": "^2.15.2 || ^3.0", "friendsofphp/php-cs-fixer": "^v3.87.1", "kylekatarnls/multi-tester": "^2.5.3", - "phpmd/phpmd": "^2.15.0", + "phpmd/phpmd": "^3.0@dev", "phpstan/extension-installer": "^1.4.3", "phpstan/phpstan": "^2.1.22", "phpunit/phpunit": "^10.5.53", @@ -2291,20 +2310,20 @@ "type": "tidelift" } ], - "time": "2026-01-29T09:26:29+00:00" + "time": "2026-10-18T18:27:53+00:00" }, { "name": "nette/schema", - "version": "v1.3.5", + "version": "v1.3.6", "source": { "type": "git", "url": "https://github.com/nette/schema.git", - "reference": "f0ab1a3cda782dbc5da270d28545236aa80c4002" + "reference": "c54350438cd6914616f790a49cb424605f421562" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/f0ab1a3cda782dbc5da270d28545236aa80c4002", - "reference": "f0ab1a3cda782dbc5da270d28545236aa80c4002", + "url": "https://api.github.com/repos/nette/schema/zipball/c54350438cd6914616f790a49cb424605f421562", + "reference": "c54350438cd6914616f790a49cb424605f421562", "shasum": "" }, "require": { @@ -2356,22 +2375,22 @@ ], "support": { "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.3.5" + "source": "https://github.com/nette/schema/tree/v1.3.6" }, - "time": "2026-02-23T03:47:12+00:00" + "time": "2026-08-16T21:58:41+00:00" }, { "name": "nette/utils", - "version": "v4.1.3", + "version": "v4.1.5", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "bb3ea637e3d131d72acc033cfc2746ee893349fe" + "reference": "b043439dbdf954e6c28b5ea7e34b0100f83165e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/bb3ea637e3d131d72acc033cfc2746ee893349fe", - "reference": "bb3ea637e3d131d72acc033cfc2746ee893349fe", + "url": "https://api.github.com/repos/nette/utils/zipball/b043439dbdf954e6c28b5ea7e34b0100f83165e0", + "reference": "b043439dbdf954e6c28b5ea7e34b0100f83165e0", "shasum": "" }, "require": { @@ -2391,7 +2410,7 @@ }, "suggest": { "ext-gd": "to use Image", - "ext-iconv": "to use Strings::webalize(), toAscii(), chr() and reverse()", + "ext-iconv": "to use Strings::chr(), ord() and reverse()", "ext-intl": "to use Strings::webalize(), toAscii(), normalize() and compare()", "ext-json": "to use Nette\\Utils\\Json", "ext-mbstring": "to use Strings::lower() etc...", @@ -2447,26 +2466,25 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v4.1.3" + "source": "https://github.com/nette/utils/tree/v4.1.5" }, - "time": "2026-02-13T03:05:33+00:00" + "time": "2026-07-17T23:02:45+00:00" }, { "name": "nikic/php-parser", - "version": "v5.7.0", + "version": "v5.9.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82" + "reference": "9e33da9553fe7786f0962b35f4e4ecf01be89def" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/dca41cd15c2ac9d055ad70dbfd011130757d1f82", - "reference": "dca41cd15c2ac9d055ad70dbfd011130757d1f82", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9e33da9553fe7786f0962b35f4e4ecf01be89def", + "reference": "9e33da9553fe7786f0962b35f4e4ecf01be89def", "shasum": "" }, "require": { - "ext-ctype": "*", "ext-json": "*", "ext-tokenizer": "*", "php": ">=7.4" @@ -2505,9 +2523,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v5.7.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v5.9.0" }, - "time": "2025-12-06T11:56:16+00:00" + "time": "2026-09-13T18:51:52+00:00" }, { "name": "nunomaduro/termwind", @@ -2598,16 +2616,16 @@ }, { "name": "phpoption/phpoption", - "version": "1.9.5", + "version": "1.10.0", "source": { "type": "git", "url": "https://github.com/schmittjoh/php-option.git", - "reference": "75365b91986c2405cf5e1e012c5595cd487a98be" + "reference": "67b192b6a42ec03944b972d6e633ddec78ad2c6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/75365b91986c2405cf5e1e012c5595cd487a98be", - "reference": "75365b91986c2405cf5e1e012c5595cd487a98be", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/67b192b6a42ec03944b972d6e633ddec78ad2c6d", + "reference": "67b192b6a42ec03944b972d6e633ddec78ad2c6d", "shasum": "" }, "require": { @@ -2615,7 +2633,7 @@ }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.44 || ^9.6.25 || ^10.5.53 || ^11.5.34" + "phpunit/phpunit": "^8.5.54 || ^9.6.36 || ^10.5.64 || ^11.5.56 || ^12.5.33" }, "type": "library", "extra": { @@ -2657,7 +2675,7 @@ ], "support": { "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.5" + "source": "https://github.com/schmittjoh/php-option/tree/1.10.0" }, "funding": [ { @@ -2669,7 +2687,7 @@ "type": "tidelift" } ], - "time": "2025-12-27T19:41:33+00:00" + "time": "2026-08-24T00:54:40+00:00" }, { "name": "psr/clock", @@ -3085,16 +3103,16 @@ }, { "name": "psy/psysh", - "version": "v0.12.20", + "version": "v0.12.24", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "19678eb6b952a03b8a1d96ecee9edba518bb0373" + "reference": "ca0fdcf8a7617afa3adfdf1b5fef573dffb69ca1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/19678eb6b952a03b8a1d96ecee9edba518bb0373", - "reference": "19678eb6b952a03b8a1d96ecee9edba518bb0373", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/ca0fdcf8a7617afa3adfdf1b5fef573dffb69ca1", + "reference": "ca0fdcf8a7617afa3adfdf1b5fef573dffb69ca1", "shasum": "" }, "require": { @@ -3158,53 +3176,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.12.20" - }, - "time": "2026-02-11T15:05:28+00:00" - }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" + "source": "https://github.com/bobthecow/psysh/tree/v0.12.24" }, - "time": "2019-03-08T08:55:37+00:00" + "time": "2026-06-29T15:41:09+00:00" }, { "name": "ramsey/collection", @@ -3284,20 +3258,20 @@ }, { "name": "ramsey/uuid", - "version": "4.9.2", + "version": "4.9.4", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "8429c78ca35a09f27565311b98101e2826affde0" + "reference": "75d73f48d02797c2c285a7e9f348fadc0102ffe2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/8429c78ca35a09f27565311b98101e2826affde0", - "reference": "8429c78ca35a09f27565311b98101e2826affde0", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/75d73f48d02797c2c285a7e9f348fadc0102ffe2", + "reference": "75d73f48d02797c2c285a7e9f348fadc0102ffe2", "shasum": "" }, "require": { - "brick/math": "^0.8.16 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14", + "brick/math": "^0.8.16 || ^0.9 || ^0.10 || ^0.11 || ^0.12 || ^0.13 || ^0.14 || ^0.15 || ^0.16 || ^0.17 || ^0.18 || ^0.19 || ^0.20 || ^1.0", "php": "^8.0", "ramsey/collection": "^1.2 || ^2.0" }, @@ -3356,9 +3330,9 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.9.2" + "source": "https://github.com/ramsey/uuid/tree/4.9.4" }, - "time": "2025-12-14T04:43:48+00:00" + "time": "2026-09-16T11:39:30+00:00" }, { "name": "readalizer/readalizer", @@ -3410,20 +3384,20 @@ }, { "name": "symfony/clock", - "version": "v8.0.0", + "version": "v8.1.9", "source": { "type": "git", "url": "https://github.com/symfony/clock.git", - "reference": "832119f9b8dbc6c8e6f65f30c5969eca1e88764f" + "reference": "945ea3b64d6da9c1c2c354fe5c07b27455df6442" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/clock/zipball/832119f9b8dbc6c8e6f65f30c5969eca1e88764f", - "reference": "832119f9b8dbc6c8e6f65f30c5969eca1e88764f", + "url": "https://api.github.com/repos/symfony/clock/zipball/945ea3b64d6da9c1c2c354fe5c07b27455df6442", + "reference": "945ea3b64d6da9c1c2c354fe5c07b27455df6442", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "psr/clock": "^1.0" }, "provide": { @@ -3463,7 +3437,7 @@ "time" ], "support": { - "source": "https://github.com/symfony/clock/tree/v8.0.0" + "source": "https://github.com/symfony/clock/tree/v8.1.9" }, "funding": [ { @@ -3483,51 +3457,53 @@ "type": "tidelift" } ], - "time": "2025-11-12T15:46:48+00:00" + "time": "2026-10-12T14:32:04+00:00" }, { "name": "symfony/console", - "version": "v7.4.4", + "version": "v8.1.9", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "41e38717ac1dd7a46b6bda7d6a82af2d98a78894" + "reference": "630e74196a2635ec0f06c12bd3fb47cfedf85157" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/41e38717ac1dd7a46b6bda7d6a82af2d98a78894", - "reference": "41e38717ac1dd7a46b6bda7d6a82af2d98a78894", + "url": "https://api.github.com/repos/symfony/console/zipball/630e74196a2635ec0f06c12bd3fb47cfedf85157", + "reference": "630e74196a2635ec0f06c12bd3fb47cfedf85157", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4.1", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php85": "^1.32", "symfony/service-contracts": "^2.5|^3", - "symfony/string": "^7.2|^8.0" + "symfony/string": "^7.4.6|^8.0.6" }, "conflict": { - "symfony/dependency-injection": "<6.4", - "symfony/dotenv": "<6.4", - "symfony/event-dispatcher": "<6.4", - "symfony/lock": "<6.4", - "symfony/process": "<6.4" + "symfony/dependency-injection": "<8.1", + "symfony/event-dispatcher": "<8.1" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0|^8.0", - "symfony/dependency-injection": "^6.4|^7.0|^8.0", - "symfony/event-dispatcher": "^6.4|^7.0|^8.0", - "symfony/http-foundation": "^6.4|^7.0|^8.0", - "symfony/http-kernel": "^6.4|^7.0|^8.0", - "symfony/lock": "^6.4|^7.0|^8.0", - "symfony/messenger": "^6.4|^7.0|^8.0", - "symfony/process": "^6.4|^7.0|^8.0", - "symfony/stopwatch": "^6.4|^7.0|^8.0", - "symfony/var-dumper": "^6.4|^7.0|^8.0" + "symfony/config": "^7.4|^8.0", + "symfony/dependency-injection": "^8.1", + "symfony/event-dispatcher": "^8.1", + "symfony/filesystem": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/lock": "^7.4|^8.0", + "symfony/messenger": "^7.4|^8.0", + "symfony/mime": "^7.4|^8.0", + "symfony/process": "^7.4|^8.0", + "symfony/stopwatch": "^7.4|^8.0", + "symfony/uid": "^7.4|^8.0", + "symfony/validator": "^7.4|^8.0", + "symfony/var-dumper": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -3561,7 +3537,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.4.4" + "source": "https://github.com/symfony/console/tree/v8.1.9" }, "funding": [ { @@ -3581,24 +3557,24 @@ "type": "tidelift" } ], - "time": "2026-01-13T11:36:38+00:00" + "time": "2026-10-12T19:11:16+00:00" }, { "name": "symfony/css-selector", - "version": "v8.0.0", + "version": "v8.1.6", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "6225bd458c53ecdee056214cb4a2ffaf58bd592b" + "reference": "08e2905152a39cf3fd1745d83f8c483e258887d9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/6225bd458c53ecdee056214cb4a2ffaf58bd592b", - "reference": "6225bd458c53ecdee056214cb4a2ffaf58bd592b", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/08e2905152a39cf3fd1745d83f8c483e258887d9", + "reference": "08e2905152a39cf3fd1745d83f8c483e258887d9", "shasum": "" }, "require": { - "php": ">=8.4" + "php": ">=8.4.1" }, "type": "library", "autoload": { @@ -3630,7 +3606,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v8.0.0" + "source": "https://github.com/symfony/css-selector/tree/v8.1.6" }, "funding": [ { @@ -3650,20 +3626,20 @@ "type": "tidelift" } ], - "time": "2025-10-30T14:17:19+00:00" + "time": "2026-08-23T10:06:25+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.6.0", + "version": "v3.7.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + "reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/f3202fa1b5097b0af062dc978b32ecf63404e31d", + "reference": "f3202fa1b5097b0af062dc978b32ecf63404e31d", "shasum": "" }, "require": { @@ -3676,7 +3652,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.7-dev" } }, "autoload": { @@ -3701,7 +3677,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.1" }, "funding": [ { @@ -3712,42 +3688,45 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2026-06-05T06:23:12+00:00" }, { "name": "symfony/error-handler", - "version": "v7.4.4", + "version": "v8.1.8", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "8da531f364ddfee53e36092a7eebbbd0b775f6b8" + "reference": "c146daceccd5d4f864c051b233c276641cec527b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/8da531f364ddfee53e36092a7eebbbd0b775f6b8", - "reference": "8da531f364ddfee53e36092a7eebbbd0b775f6b8", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/c146daceccd5d4f864c051b233c276641cec527b", + "reference": "c146daceccd5d4f864c051b233c276641cec527b", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4.1", "psr/log": "^1|^2|^3", "symfony/polyfill-php85": "^1.32", - "symfony/var-dumper": "^6.4|^7.0|^8.0" + "symfony/var-dumper": "^7.4|^8.0" }, "conflict": { - "symfony/deprecation-contracts": "<2.5", - "symfony/http-kernel": "<6.4" + "symfony/deprecation-contracts": "<2.5" }, "require-dev": { - "symfony/console": "^6.4|^7.0|^8.0", + "symfony/console": "^7.4|^8.0", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/http-kernel": "^6.4|^7.0|^8.0", - "symfony/serializer": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/serializer": "^7.4|^8.0", "symfony/webpack-encore-bundle": "^1.0|^2.0" }, "bin": [ @@ -3779,7 +3758,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.4.4" + "source": "https://github.com/symfony/error-handler/tree/v8.1.8" }, "funding": [ { @@ -3799,24 +3778,25 @@ "type": "tidelift" } ], - "time": "2026-01-20T16:42:42+00:00" + "time": "2026-09-22T18:58:53+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v8.0.4", + "version": "v8.1.5", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "99301401da182b6cfaa4700dbe9987bb75474b47" + "reference": "7458da64220376b2e0dc2d8451bf43382c1ad297" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/99301401da182b6cfaa4700dbe9987bb75474b47", - "reference": "99301401da182b6cfaa4700dbe9987bb75474b47", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7458da64220376b2e0dc2d8451bf43382c1ad297", + "reference": "7458da64220376b2e0dc2d8451bf43382c1ad297", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { @@ -3864,7 +3844,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.4" + "source": "https://github.com/symfony/event-dispatcher/tree/v8.1.5" }, "funding": [ { @@ -3884,20 +3864,20 @@ "type": "tidelift" } ], - "time": "2026-01-05T11:45:55+00:00" + "time": "2026-08-21T17:47:34+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.6.0", + "version": "v3.7.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "59eb412e93815df44f05f342958efa9f46b1e586" + "reference": "c7de7a00ffb67842132da02ea92988a39ccd9f4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586", - "reference": "59eb412e93815df44f05f342958efa9f46b1e586", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c7de7a00ffb67842132da02ea92988a39ccd9f4e", + "reference": "c7de7a00ffb67842132da02ea92988a39ccd9f4e", "shasum": "" }, "require": { @@ -3911,7 +3891,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.7-dev" } }, "autoload": { @@ -3944,7 +3924,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.7.1" }, "funding": [ { @@ -3955,32 +3935,36 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2026-06-05T06:23:12+00:00" }, { "name": "symfony/finder", - "version": "v7.4.5", + "version": "v8.1.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "ad4daa7c38668dcb031e63bc99ea9bd42196a2cb" + "reference": "bd4fed193a3132c91c5c93595cbfc78988915822" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/ad4daa7c38668dcb031e63bc99ea9bd42196a2cb", - "reference": "ad4daa7c38668dcb031e63bc99ea9bd42196a2cb", + "url": "https://api.github.com/repos/symfony/finder/zipball/bd4fed193a3132c91c5c93595cbfc78988915822", + "reference": "bd4fed193a3132c91c5c93595cbfc78988915822", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.4.1" }, "require-dev": { - "symfony/filesystem": "^6.4|^7.0|^8.0" + "symfony/filesystem": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -4008,7 +3992,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.4.5" + "source": "https://github.com/symfony/finder/tree/v8.1.8" }, "funding": [ { @@ -4028,41 +4012,40 @@ "type": "tidelift" } ], - "time": "2026-01-26T15:07:59+00:00" + "time": "2026-09-26T06:33:49+00:00" }, { "name": "symfony/http-foundation", - "version": "v7.4.5", + "version": "v8.1.9", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "446d0db2b1f21575f1284b74533e425096abdfb6" + "reference": "7850897fb8659f98491b03be79ac48600bdaf9ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/446d0db2b1f21575f1284b74533e425096abdfb6", - "reference": "446d0db2b1f21575f1284b74533e425096abdfb6", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/7850897fb8659f98491b03be79ac48600bdaf9ab", + "reference": "7850897fb8659f98491b03be79ac48600bdaf9ab", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4.1", "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "^1.1" }, "conflict": { - "doctrine/dbal": "<3.6", - "symfony/cache": "<6.4.12|>=7.0,<7.1.5" + "doctrine/dbal": "<4.3" }, "require-dev": { - "doctrine/dbal": "^3.6|^4", + "doctrine/dbal": "^4.3", "predis/predis": "^1.1|^2.0", - "symfony/cache": "^6.4.12|^7.1.5|^8.0", - "symfony/clock": "^6.4|^7.0|^8.0", - "symfony/dependency-injection": "^6.4|^7.0|^8.0", - "symfony/expression-language": "^6.4|^7.0|^8.0", - "symfony/http-kernel": "^6.4|^7.0|^8.0", - "symfony/mime": "^6.4|^7.0|^8.0", - "symfony/rate-limiter": "^6.4|^7.0|^8.0" + "symfony/cache": "^7.4|^8.0", + "symfony/clock": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/expression-language": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/mime": "^7.4|^8.0", + "symfony/rate-limiter": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -4090,7 +4073,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.4.5" + "source": "https://github.com/symfony/http-foundation/tree/v8.1.9" }, "funding": [ { @@ -4110,78 +4093,69 @@ "type": "tidelift" } ], - "time": "2026-01-27T16:16:02+00:00" + "time": "2026-10-08T16:57:43+00:00" }, { "name": "symfony/http-kernel", - "version": "v7.4.5", + "version": "v8.1.9", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "229eda477017f92bd2ce7615d06222ec0c19e82a" + "reference": "55c6935bb4c004a72b55f723e79d5404881dcad3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/229eda477017f92bd2ce7615d06222ec0c19e82a", - "reference": "229eda477017f92bd2ce7615d06222ec0c19e82a", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/55c6935bb4c004a72b55f723e79d5404881dcad3", + "reference": "55c6935bb4c004a72b55f723e79d5404881dcad3", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4.1", "psr/log": "^1|^2|^3", "symfony/deprecation-contracts": "^2.5|^3", - "symfony/error-handler": "^6.4|^7.0|^8.0", - "symfony/event-dispatcher": "^7.3|^8.0", + "symfony/error-handler": "^7.4|^8.0", + "symfony/event-dispatcher": "^7.4|^8.0", "symfony/http-foundation": "^7.4|^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/browser-kit": "<6.4", - "symfony/cache": "<6.4", - "symfony/config": "<6.4", - "symfony/console": "<6.4", - "symfony/dependency-injection": "<6.4", - "symfony/doctrine-bridge": "<6.4", + "symfony/dependency-injection": "<8.1", "symfony/flex": "<2.10", - "symfony/form": "<6.4", - "symfony/http-client": "<6.4", "symfony/http-client-contracts": "<2.5", - "symfony/mailer": "<6.4", - "symfony/messenger": "<6.4", - "symfony/translation": "<6.4", + "symfony/serializer": "<7.4.15|>=8.0,<8.0.15|>=8.1,<8.1.2", "symfony/translation-contracts": "<2.5", - "symfony/twig-bridge": "<6.4", - "symfony/validator": "<6.4", - "symfony/var-dumper": "<6.4", - "twig/twig": "<3.12" + "symfony/var-dumper": "<8.1", + "symfony/web-profiler-bundle": "<8.1", + "twig/twig": "<3.21" }, "provide": { "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", - "symfony/browser-kit": "^6.4|^7.0|^8.0", - "symfony/clock": "^6.4|^7.0|^8.0", - "symfony/config": "^6.4|^7.0|^8.0", - "symfony/console": "^6.4|^7.0|^8.0", - "symfony/css-selector": "^6.4|^7.0|^8.0", - "symfony/dependency-injection": "^6.4|^7.0|^8.0", - "symfony/dom-crawler": "^6.4|^7.0|^8.0", - "symfony/expression-language": "^6.4|^7.0|^8.0", - "symfony/finder": "^6.4|^7.0|^8.0", + "symfony/browser-kit": "^7.4|^8.0", + "symfony/clock": "^7.4|^8.0", + "symfony/config": "^7.4|^8.0", + "symfony/console": "^7.4|^8.0", + "symfony/css-selector": "^7.4|^8.0", + "symfony/dependency-injection": "^8.1", + "symfony/dom-crawler": "^7.4|^8.0", + "symfony/expression-language": "^7.4|^8.0", + "symfony/finder": "^7.4|^8.0", "symfony/http-client-contracts": "^2.5|^3", - "symfony/process": "^6.4|^7.0|^8.0", - "symfony/property-access": "^7.1|^8.0", - "symfony/routing": "^6.4|^7.0|^8.0", - "symfony/serializer": "^7.1|^8.0", - "symfony/stopwatch": "^6.4|^7.0|^8.0", - "symfony/translation": "^6.4|^7.0|^8.0", + "symfony/process": "^7.4|^8.0", + "symfony/property-access": "^7.4|^8.0", + "symfony/rate-limiter": "^7.4|^8.0", + "symfony/routing": "^7.4|^8.0", + "symfony/serializer": "^7.4|^8.0", + "symfony/stopwatch": "^7.4|^8.0", + "symfony/translation": "^7.4|^8.0", "symfony/translation-contracts": "^2.5|^3", - "symfony/uid": "^6.4|^7.0|^8.0", - "symfony/validator": "^6.4|^7.0|^8.0", - "symfony/var-dumper": "^6.4|^7.0|^8.0", - "symfony/var-exporter": "^6.4|^7.0|^8.0", - "twig/twig": "^3.12" + "symfony/uid": "^7.4|^8.0", + "symfony/validator": "^7.4|^8.0", + "symfony/var-dumper": "^8.1", + "symfony/var-exporter": "^7.4|^8.0", + "twig/twig": "^3.21|^4.0" }, "type": "library", "autoload": { @@ -4209,7 +4183,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v7.4.5" + "source": "https://github.com/symfony/http-kernel/tree/v8.1.9" }, "funding": [ { @@ -4229,43 +4203,39 @@ "type": "tidelift" } ], - "time": "2026-01-28T10:33:42+00:00" + "time": "2026-10-14T06:47:03+00:00" }, { "name": "symfony/mailer", - "version": "v7.4.4", + "version": "v8.1.7", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "7b750074c40c694ceb34cb926d6dffee231c5cd6" + "reference": "8783380ecdafa23d36fc90c5873fd44b635c6e10" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/7b750074c40c694ceb34cb926d6dffee231c5cd6", - "reference": "7b750074c40c694ceb34cb926d6dffee231c5cd6", + "url": "https://api.github.com/repos/symfony/mailer/zipball/8783380ecdafa23d36fc90c5873fd44b635c6e10", + "reference": "8783380ecdafa23d36fc90c5873fd44b635c6e10", "shasum": "" }, "require": { "egulias/email-validator": "^2.1.10|^3|^4", - "php": ">=8.2", + "php": ">=8.4.1", "psr/event-dispatcher": "^1", "psr/log": "^1|^2|^3", - "symfony/event-dispatcher": "^6.4|^7.0|^8.0", - "symfony/mime": "^7.2|^8.0", + "symfony/event-dispatcher": "^7.4|^8.0", + "symfony/mime": "^7.4|^8.0", "symfony/service-contracts": "^2.5|^3" }, "conflict": { - "symfony/http-client-contracts": "<2.5", - "symfony/http-kernel": "<6.4", - "symfony/messenger": "<6.4", - "symfony/mime": "<6.4", - "symfony/twig-bridge": "<6.4" + "symfony/http-client-contracts": "<2.5" }, "require-dev": { - "symfony/console": "^6.4|^7.0|^8.0", - "symfony/http-client": "^6.4|^7.0|^8.0", - "symfony/messenger": "^6.4|^7.0|^8.0", - "symfony/twig-bridge": "^6.4|^7.0|^8.0" + "symfony/console": "^7.4|^8.0", + "symfony/http-client": "^7.4|^8.0", + "symfony/messenger": "^7.4|^8.0", + "symfony/twig-bridge": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -4293,7 +4263,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v7.4.4" + "source": "https://github.com/symfony/mailer/tree/v8.1.7" }, "funding": [ { @@ -4313,44 +4283,41 @@ "type": "tidelift" } ], - "time": "2026-01-08T08:25:11+00:00" + "time": "2026-09-15T06:01:24+00:00" }, { "name": "symfony/mime", - "version": "v7.4.5", + "version": "v8.1.7", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "b18c7e6e9eee1e19958138df10412f3c4c316148" + "reference": "773ac57f20e2795bdadb65b5b1b5f4850d498283" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/b18c7e6e9eee1e19958138df10412f3c4c316148", - "reference": "b18c7e6e9eee1e19958138df10412f3c4c316148", + "url": "https://api.github.com/repos/symfony/mime/zipball/773ac57f20e2795bdadb65b5b1b5f4850d498283", + "reference": "773ac57f20e2795bdadb65b5b1b5f4850d498283", "shasum": "" }, "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.4.1", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, "conflict": { "egulias/email-validator": "~3.0.0", - "phpdocumentor/reflection-docblock": "<5.2|>=6", - "phpdocumentor/type-resolver": "<1.5.1", - "symfony/mailer": "<6.4", - "symfony/serializer": "<6.4.3|>7.0,<7.0.3" + "phpdocumentor/reflection-docblock": "<5.2|>=7", + "phpdocumentor/type-resolver": "<1.5.1" }, "require-dev": { "egulias/email-validator": "^2.1.10|^3.1|^4", "league/html-to-markdown": "^5.0", - "phpdocumentor/reflection-docblock": "^5.2", - "symfony/dependency-injection": "^6.4|^7.0|^8.0", - "symfony/process": "^6.4|^7.0|^8.0", - "symfony/property-access": "^6.4|^7.0|^8.0", - "symfony/property-info": "^6.4|^7.0|^8.0", - "symfony/serializer": "^6.4.3|^7.0.3|^8.0" + "phpdocumentor/reflection-docblock": "^5.2|^6.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/process": "^7.4|^8.0", + "symfony/property-access": "^7.4|^8.0", + "symfony/property-info": "^7.4|^8.0", + "symfony/serializer": "^7.4.17|^8.1.5" }, "type": "library", "autoload": { @@ -4382,7 +4349,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v7.4.5" + "source": "https://github.com/symfony/mime/tree/v8.1.7" }, "funding": [ { @@ -4402,20 +4369,20 @@ "type": "tidelift" } ], - "time": "2026-01-27T08:59:58+00:00" + "time": "2026-09-04T11:02:17+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.33.0", + "version": "v1.37.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + "reference": "141046a8f9477948ff284fa65be2095baafb94f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/141046a8f9477948ff284fa65be2095baafb94f2", + "reference": "141046a8f9477948ff284fa65be2095baafb94f2", "shasum": "" }, "require": { @@ -4465,7 +4432,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.37.0" }, "funding": [ { @@ -4485,20 +4452,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-04-10T16:19:22+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.33.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70" + "reference": "5cac8f4db97208823aa353f59a01faad2da52c75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70", - "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/5cac8f4db97208823aa353f59a01faad2da52c75", + "reference": "5cac8f4db97208823aa353f59a01faad2da52c75", "shasum": "" }, "require": { @@ -4547,7 +4514,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.43.0" }, "funding": [ { @@ -4567,20 +4534,20 @@ "type": "tidelift" } ], - "time": "2025-06-27T09:58:17+00:00" + "time": "2026-09-25T15:46:47+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.33.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3" + "reference": "533d68cf99c8f8ee2e8893c59ed59192e92cfd74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/9614ac4d8061dc257ecc64cba1b140873dce8ad3", - "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/533d68cf99c8f8ee2e8893c59ed59192e92cfd74", + "reference": "533d68cf99c8f8ee2e8893c59ed59192e92cfd74", "shasum": "" }, "require": { @@ -4634,7 +4601,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.43.0" }, "funding": [ { @@ -4654,20 +4621,20 @@ "type": "tidelift" } ], - "time": "2024-09-10T14:38:51+00:00" + "time": "2026-09-23T14:40:04+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.33.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "3833d7255cc303546435cb650316bff708a1c75c" + "reference": "ebd57ccc7edb93d632e184efbe7693d2517bab3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", - "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/ebd57ccc7edb93d632e184efbe7693d2517bab3b", + "reference": "ebd57ccc7edb93d632e184efbe7693d2517bab3b", "shasum": "" }, "require": { @@ -4719,7 +4686,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.43.0" }, "funding": [ { @@ -4739,20 +4706,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-09-23T22:02:09+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.33.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + "reference": "4d5d331bf731e0aedbc6b2f5e61135b7b7996a72" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/4d5d331bf731e0aedbc6b2f5e61135b7b7996a72", + "reference": "4d5d331bf731e0aedbc6b2f5e61135b7b7996a72", "shasum": "" }, "require": { @@ -4804,7 +4771,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.43.0" }, "funding": [ { @@ -4824,20 +4791,20 @@ "type": "tidelift" } ], - "time": "2024-12-23T08:48:59+00:00" + "time": "2026-09-24T15:19:04+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.33.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608" + "reference": "9c6a5d6b01ca51d486c813e9a9c0ed55f208bb74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608", - "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/9c6a5d6b01ca51d486c813e9a9c0ed55f208bb74", + "reference": "9c6a5d6b01ca51d486c813e9a9c0ed55f208bb74", "shasum": "" }, "require": { @@ -4888,7 +4855,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.43.0" }, "funding": [ { @@ -4908,20 +4875,20 @@ "type": "tidelift" } ], - "time": "2025-01-02T08:10:11+00:00" + "time": "2026-09-25T15:50:05+00:00" }, { - "name": "symfony/polyfill-php83", - "version": "v1.33.0", + "name": "symfony/polyfill-php82", + "version": "v1.43.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5" + "url": "https://github.com/symfony/polyfill-php82.git", + "reference": "843bbe8b2a7934307b749751eede0f111f5d1cfc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/17f6f9a6b1735c0f163024d959f700cfbc5155e5", - "reference": "17f6f9a6b1735c0f163024d959f700cfbc5155e5", + "url": "https://api.github.com/repos/symfony/polyfill-php82/zipball/843bbe8b2a7934307b749751eede0f111f5d1cfc", + "reference": "843bbe8b2a7934307b749751eede0f111f5d1cfc", "shasum": "" }, "require": { @@ -4939,7 +4906,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php83\\": "" + "Symfony\\Polyfill\\Php82\\": "" }, "classmap": [ "Resources/stubs" @@ -4959,7 +4926,7 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "description": "Symfony polyfill backporting some PHP 8.2+ features to lower PHP versions", "homepage": "https://symfony.com", "keywords": [ "compatibility", @@ -4968,7 +4935,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-php82/tree/v1.43.0" }, "funding": [ { @@ -4988,20 +4955,20 @@ "type": "tidelift" } ], - "time": "2025-07-08T02:45:35+00:00" + "time": "2026-09-25T15:50:05+00:00" }, { "name": "symfony/polyfill-php84", - "version": "v1.33.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php84.git", - "reference": "d8ced4d875142b6a7426000426b8abc631d6b191" + "reference": "22c6548499cbe5c5bb072fc0c42312dff062a015" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/d8ced4d875142b6a7426000426b8abc631d6b191", - "reference": "d8ced4d875142b6a7426000426b8abc631d6b191", + "url": "https://api.github.com/repos/symfony/polyfill-php84/zipball/22c6548499cbe5c5bb072fc0c42312dff062a015", + "reference": "22c6548499cbe5c5bb072fc0c42312dff062a015", "shasum": "" }, "require": { @@ -5048,7 +5015,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php84/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-php84/tree/v1.43.0" }, "funding": [ { @@ -5068,20 +5035,20 @@ "type": "tidelift" } ], - "time": "2025-06-24T13:30:11+00:00" + "time": "2026-09-23T22:01:09+00:00" }, { "name": "symfony/polyfill-php85", - "version": "v1.33.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php85.git", - "reference": "d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91" + "reference": "86a42cbcc07adc331481a5ab310a4024bfc227f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91", - "reference": "d4e5fcd4ab3d998ab16c0db48e6cbb9a01993f91", + "url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/86a42cbcc07adc331481a5ab310a4024bfc227f6", + "reference": "86a42cbcc07adc331481a5ab310a4024bfc227f6", "shasum": "" }, "require": { @@ -5128,7 +5095,170 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php85/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-php85/tree/v1.43.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-09-25T15:46:47+00:00" + }, + { + "name": "symfony/polyfill-php86", + "version": "v1.43.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php86.git", + "reference": "8840df45b24f33a49dc419fa18dc0057231ae1d8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php86/zipball/8840df45b24f33a49dc419fa18dc0057231ae1d8", + "reference": "8840df45b24f33a49dc419fa18dc0057231ae1d8", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php86\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php86/tree/v1.43.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-09-25T15:46:47+00:00" + }, + { + "name": "symfony/polyfill-time", + "version": "v1.42.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-time.git", + "reference": "ac9f1ed802dd58f37e720388130c088434aa09fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-time/zipball/ac9f1ed802dd58f37e720388130c088434aa09fc", + "reference": "ac9f1ed802dd58f37e720388130c088434aa09fc", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Time\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Philippe Nyamagana Butera", + "email": "nyamsprod@gmail.com" + }, + { + "name": "Tim Düsterhus", + "email": "tim@tideways-gmbh.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Time API added to PHP 8.6", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "duration", + "polyfill", + "portable", + "shim", + "time" + ], + "support": { + "source": "https://github.com/symfony/polyfill-time/tree/v1.42.0" }, "funding": [ { @@ -5148,20 +5278,20 @@ "type": "tidelift" } ], - "time": "2025-06-23T16:12:55+00:00" + "time": "2026-08-07T13:08:13+00:00" }, { "name": "symfony/polyfill-uuid", - "version": "v1.33.0", + "version": "v1.43.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-uuid.git", - "reference": "21533be36c24be3f4b1669c4725c7d1d2bab4ae2" + "reference": "b23ff8245cc5c4479ea2be3d0132d2e6dd433993" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/21533be36c24be3f4b1669c4725c7d1d2bab4ae2", - "reference": "21533be36c24be3f4b1669c4725c7d1d2bab4ae2", + "url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/b23ff8245cc5c4479ea2be3d0132d2e6dd433993", + "reference": "b23ff8245cc5c4479ea2be3d0132d2e6dd433993", "shasum": "" }, "require": { @@ -5211,7 +5341,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/polyfill-uuid/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-uuid/tree/v1.43.0" }, "funding": [ { @@ -5231,24 +5361,24 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-09-24T05:20:52+00:00" }, { "name": "symfony/process", - "version": "v7.4.5", + "version": "v8.1.9", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "608476f4604102976d687c483ac63a79ba18cc97" + "reference": "59a682fd049b2d4d37c444f5ac21b7d01b8c7189" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/608476f4604102976d687c483ac63a79ba18cc97", - "reference": "608476f4604102976d687c483ac63a79ba18cc97", + "url": "https://api.github.com/repos/symfony/process/zipball/59a682fd049b2d4d37c444f5ac21b7d01b8c7189", + "reference": "59a682fd049b2d4d37c444f5ac21b7d01b8c7189", "shasum": "" }, "require": { - "php": ">=8.2" + "php": ">=8.4.1" }, "type": "library", "autoload": { @@ -5276,7 +5406,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.4.5" + "source": "https://github.com/symfony/process/tree/v8.1.9" }, "funding": [ { @@ -5296,38 +5426,33 @@ "type": "tidelift" } ], - "time": "2026-01-26T15:07:59+00:00" + "time": "2026-10-08T16:57:43+00:00" }, { "name": "symfony/routing", - "version": "v7.4.4", + "version": "v8.1.9", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "0798827fe2c79caeed41d70b680c2c3507d10147" + "reference": "edb06fb6ced3c1faaaed74c1c6c0f176a614c330" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/0798827fe2c79caeed41d70b680c2c3507d10147", - "reference": "0798827fe2c79caeed41d70b680c2c3507d10147", + "url": "https://api.github.com/repos/symfony/routing/zipball/edb06fb6ced3c1faaaed74c1c6c0f176a614c330", + "reference": "edb06fb6ced3c1faaaed74c1c6c0f176a614c330", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4.1", "symfony/deprecation-contracts": "^2.5|^3" }, - "conflict": { - "symfony/config": "<6.4", - "symfony/dependency-injection": "<6.4", - "symfony/yaml": "<6.4" - }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0|^8.0", - "symfony/dependency-injection": "^6.4|^7.0|^8.0", - "symfony/expression-language": "^6.4|^7.0|^8.0", - "symfony/http-foundation": "^6.4|^7.0|^8.0", - "symfony/yaml": "^6.4|^7.0|^8.0" + "symfony/config": "^7.4|^8.0", + "symfony/dependency-injection": "^7.4|^8.0", + "symfony/expression-language": "^7.4|^8.0", + "symfony/http-foundation": "^7.4|^8.0", + "symfony/yaml": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -5361,7 +5486,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v7.4.4" + "source": "https://github.com/symfony/routing/tree/v8.1.9" }, "funding": [ { @@ -5381,20 +5506,20 @@ "type": "tidelift" } ], - "time": "2026-01-12T12:19:02+00:00" + "time": "2026-10-12T12:37:13+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.6.1", + "version": "v3.7.3", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43" + "reference": "15e6a07ec2a2c75ceb1b21dd98105ee8456d2257" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43", - "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/15e6a07ec2a2c75ceb1b21dd98105ee8456d2257", + "reference": "15e6a07ec2a2c75ceb1b21dd98105ee8456d2257", "shasum": "" }, "require": { @@ -5412,7 +5537,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.7-dev" } }, "autoload": { @@ -5448,7 +5573,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.6.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.7.3" }, "funding": [ { @@ -5468,24 +5593,24 @@ "type": "tidelift" } ], - "time": "2025-07-15T11:30:57+00:00" + "time": "2026-07-27T15:39:01+00:00" }, { "name": "symfony/string", - "version": "v8.0.4", + "version": "v8.1.9", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "758b372d6882506821ed666032e43020c4f57194" + "reference": "07fb208558f941eab50ec49c89c2a6a93fb11f01" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/758b372d6882506821ed666032e43020c4f57194", - "reference": "758b372d6882506821ed666032e43020c4f57194", + "url": "https://api.github.com/repos/symfony/string/zipball/07fb208558f941eab50ec49c89c2a6a93fb11f01", + "reference": "07fb208558f941eab50ec49c89c2a6a93fb11f01", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-intl-grapheme": "^1.33", "symfony/polyfill-intl-normalizer": "^1.0", @@ -5538,7 +5663,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v8.0.4" + "source": "https://github.com/symfony/string/tree/v8.1.9" }, "funding": [ { @@ -5558,24 +5683,24 @@ "type": "tidelift" } ], - "time": "2026-01-12T12:37:40+00:00" + "time": "2026-10-03T15:16:03+00:00" }, { "name": "symfony/translation", - "version": "v8.0.4", + "version": "v8.1.5", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "db70c8ce7db74fd2da7b1d268db46b2a8ce32c10" + "reference": "d9e1caba0d6b6f9a26710af8a2f88d37f001215a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/db70c8ce7db74fd2da7b1d268db46b2a8ce32c10", - "reference": "db70c8ce7db74fd2da7b1d268db46b2a8ce32c10", + "url": "https://api.github.com/repos/symfony/translation/zipball/d9e1caba0d6b6f9a26710af8a2f88d37f001215a", + "reference": "d9e1caba0d6b6f9a26710af8a2f88d37f001215a", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "symfony/polyfill-mbstring": "^1.0", "symfony/translation-contracts": "^3.6.1" }, @@ -5631,7 +5756,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v8.0.4" + "source": "https://github.com/symfony/translation/tree/v8.1.5" }, "funding": [ { @@ -5651,20 +5776,20 @@ "type": "tidelift" } ], - "time": "2026-01-13T13:06:50+00:00" + "time": "2026-08-21T17:47:34+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.6.1", + "version": "v3.7.1", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "65a8bc82080447fae78373aa10f8d13b38338977" + "reference": "ccb206b98faccc511ebae8e5fad50f2dc0b30621" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/65a8bc82080447fae78373aa10f8d13b38338977", - "reference": "65a8bc82080447fae78373aa10f8d13b38338977", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/ccb206b98faccc511ebae8e5fad50f2dc0b30621", + "reference": "ccb206b98faccc511ebae8e5fad50f2dc0b30621", "shasum": "" }, "require": { @@ -5677,7 +5802,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.7-dev" } }, "autoload": { @@ -5713,7 +5838,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.6.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.7.1" }, "funding": [ { @@ -5733,28 +5858,28 @@ "type": "tidelift" } ], - "time": "2025-07-15T13:41:35+00:00" + "time": "2026-06-05T06:23:12+00:00" }, { "name": "symfony/uid", - "version": "v7.4.4", + "version": "v8.1.9", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "7719ce8aba76be93dfe249192f1fbfa52c588e36" + "reference": "cb487cf30380f0b0b090973bb9c0588193c06685" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/7719ce8aba76be93dfe249192f1fbfa52c588e36", - "reference": "7719ce8aba76be93dfe249192f1fbfa52c588e36", + "url": "https://api.github.com/repos/symfony/uid/zipball/cb487cf30380f0b0b090973bb9c0588193c06685", + "reference": "cb487cf30380f0b0b090973bb9c0588193c06685", "shasum": "" }, "require": { - "php": ">=8.2", + "php": ">=8.4.1", "symfony/polyfill-uuid": "^1.15" }, "require-dev": { - "symfony/console": "^6.4|^7.0|^8.0" + "symfony/console": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -5791,7 +5916,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v7.4.4" + "source": "https://github.com/symfony/uid/tree/v8.1.9" }, "funding": [ { @@ -5811,36 +5936,36 @@ "type": "tidelift" } ], - "time": "2026-01-03T23:30:35+00:00" + "time": "2026-10-12T14:32:04+00:00" }, { "name": "symfony/var-dumper", - "version": "v7.4.4", + "version": "v8.1.9", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "0e4769b46a0c3c62390d124635ce59f66874b282" + "reference": "b8c168c764c09f5d931f290c9dbdd13f1bf142f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/0e4769b46a0c3c62390d124635ce59f66874b282", - "reference": "0e4769b46a0c3c62390d124635ce59f66874b282", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/b8c168c764c09f5d931f290c9dbdd13f1bf142f3", + "reference": "b8c168c764c09f5d931f290c9dbdd13f1bf142f3", "shasum": "" }, "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0" + "php": ">=8.4.1", + "symfony/polyfill-mbstring": "^1.0" }, "conflict": { - "symfony/console": "<6.4" + "symfony/console": "<7.4", + "symfony/error-handler": "<7.4" }, "require-dev": { - "symfony/console": "^6.4|^7.0|^8.0", - "symfony/http-kernel": "^6.4|^7.0|^8.0", - "symfony/process": "^6.4|^7.0|^8.0", - "symfony/uid": "^6.4|^7.0|^8.0", - "twig/twig": "^3.12" + "symfony/console": "^7.4|^8.0", + "symfony/http-kernel": "^7.4|^8.0", + "symfony/process": "^7.4|^8.0", + "symfony/uid": "^7.4|^8.0", + "twig/twig": "^3.12|^4.0" }, "bin": [ "Resources/bin/var-dump-server" @@ -5878,7 +6003,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v7.4.4" + "source": "https://github.com/symfony/var-dumper/tree/v8.1.9" }, "funding": [ { @@ -5898,7 +6023,7 @@ "type": "tidelift" } ], - "time": "2026-01-01T22:13:48+00:00" + "time": "2026-10-13T05:48:51+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5957,23 +6082,23 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.6.3", + "version": "v5.7.0", "source": { "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "955e7815d677a3eaa7075231212f2110983adecc" + "url": "https://github.com/phpdotenv/phpdotenv.git", + "reference": "301c07936b16d88628b126b01d082ba153cf4c40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/955e7815d677a3eaa7075231212f2110983adecc", - "reference": "955e7815d677a3eaa7075231212f2110983adecc", + "url": "https://api.github.com/repos/phpdotenv/phpdotenv/zipball/301c07936b16d88628b126b01d082ba153cf4c40", + "reference": "301c07936b16d88628b126b01d082ba153cf4c40", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.4", + "graham-campbell/result-type": "^1.2", "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.5", + "phpoption/phpoption": "^1.10", "symfony/polyfill-ctype": "^1.26", "symfony/polyfill-mbstring": "^1.26", "symfony/polyfill-php80": "^1.26" @@ -6017,7 +6142,7 @@ "homepage": "https://github.com/vlucas" } ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", + "description": "Loads environment variables from `.env` to `$_ENV` and `$_SERVER` automagically, and optionally to `getenv()`.", "keywords": [ "dotenv", "env", @@ -6025,7 +6150,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.3" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.7.0" }, "funding": [ { @@ -6037,27 +6162,27 @@ "type": "tidelift" } ], - "time": "2025-12-27T19:49:13+00:00" + "time": "2026-08-24T18:07:49+00:00" }, { "name": "voku/portable-ascii", - "version": "2.0.3", + "version": "2.1.1", "source": { "type": "git", "url": "https://github.com/voku/portable-ascii.git", - "reference": "b1d923f88091c6bf09699efcd7c8a1b1bfd7351d" + "reference": "8e1051fe39379367aecf014f41744ce7539a856f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b1d923f88091c6bf09699efcd7c8a1b1bfd7351d", - "reference": "b1d923f88091c6bf09699efcd7c8a1b1bfd7351d", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/8e1051fe39379367aecf014f41744ce7539a856f", + "reference": "8e1051fe39379367aecf014f41744ce7539a856f", "shasum": "" }, "require": { - "php": ">=7.0.0" + "php": ">=7.1.0" }, "require-dev": { - "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" + "phpunit/phpunit": "~8.5 || ~9.6 || ~10.5 || ~11.5" }, "suggest": { "ext-intl": "Use Intl for transliterator_transliterate() support" @@ -6087,7 +6212,7 @@ ], "support": { "issues": "https://github.com/voku/portable-ascii/issues", - "source": "https://github.com/voku/portable-ascii/tree/2.0.3" + "source": "https://github.com/voku/portable-ascii/tree/2.1.1" }, "funding": [ { @@ -6111,22 +6236,22 @@ "type": "tidelift" } ], - "time": "2024-11-21T01:49:47+00:00" + "time": "2026-04-26T05:33:54+00:00" } ], "packages-dev": [ { "name": "brianium/paratest", - "version": "v7.19.0", + "version": "v7.20.0", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "7c6c29af7c4b406b49ce0c6b0a3a81d3684474e6" + "reference": "81c80677c9ec0ed4ef16b246167f11dec81a6e3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/7c6c29af7c4b406b49ce0c6b0a3a81d3684474e6", - "reference": "7c6c29af7c4b406b49ce0c6b0a3a81d3684474e6", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/81c80677c9ec0ed4ef16b246167f11dec81a6e3d", + "reference": "81c80677c9ec0ed4ef16b246167f11dec81a6e3d", "shasum": "" }, "require": { @@ -6140,9 +6265,9 @@ "phpunit/php-code-coverage": "^12.5.3 || ^13.0.1", "phpunit/php-file-iterator": "^6.0.1 || ^7", "phpunit/php-timer": "^8 || ^9", - "phpunit/phpunit": "^12.5.9 || ^13", + "phpunit/phpunit": "^12.5.14 || ^13.0.5", "sebastian/environment": "^8.0.3 || ^9", - "symfony/console": "^7.4.4 || ^8.0.4", + "symfony/console": "^7.4.7 || ^8.0.7", "symfony/process": "^7.4.5 || ^8.0.5" }, "require-dev": { @@ -6150,11 +6275,11 @@ "ext-pcntl": "*", "ext-pcov": "*", "ext-posix": "*", - "phpstan/phpstan": "^2.1.38", - "phpstan/phpstan-deprecation-rules": "^2.0.3", - "phpstan/phpstan-phpunit": "^2.0.12", - "phpstan/phpstan-strict-rules": "^2.0.8", - "symfony/filesystem": "^7.4.0 || ^8.0.1" + "phpstan/phpstan": "^2.1.44", + "phpstan/phpstan-deprecation-rules": "^2.0.4", + "phpstan/phpstan-phpunit": "^2.0.16", + "phpstan/phpstan-strict-rules": "^2.0.10", + "symfony/filesystem": "^7.4.6 || ^8.0.6" }, "bin": [ "bin/paratest", @@ -6194,7 +6319,7 @@ ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/v7.19.0" + "source": "https://github.com/paratestphp/paratest/tree/v7.20.0" }, "funding": [ { @@ -6206,27 +6331,246 @@ "type": "paypal" } ], - "time": "2026-02-06T10:53:26+00:00" + "time": "2026-03-29T15:46:14+00:00" }, { - "name": "doctrine/deprecations", - "version": "1.1.6", + "name": "composer/pcre", + "version": "3.4.0", "source": { "type": "git", - "url": "https://github.com/doctrine/deprecations.git", - "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca" + "url": "https://github.com/composer/pcre.git", + "reference": "d5a341b3fb61f3001970940afb1d332968a183ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", - "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "url": "https://api.github.com/repos/composer/pcre/zipball/d5a341b3fb61f3001970940afb1d332968a183ed", + "reference": "d5a341b3fb61f3001970940afb1d332968a183ed", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.4 || ^8.0" }, "conflict": { - "phpunit/phpunit": "<=7.5 || >=14" + "phpstan/phpstan": "<2.2.2" + }, + "require-dev": { + "phpstan/phpstan": "^2", + "phpstan/phpstan-deprecation-rules": "^2", + "phpstan/phpstan-strict-rules": "^2", + "phpunit/phpunit": "^9" + }, + "type": "library", + "extra": { + "phpstan": { + "includes": [ + "extension.neon" + ] + }, + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Pcre\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "PCRE wrapping library that offers type-safe preg_* replacements.", + "keywords": [ + "PCRE", + "preg", + "regex", + "regular expression" + ], + "support": { + "issues": "https://github.com/composer/pcre/issues", + "source": "https://github.com/composer/pcre/tree/3.4.0" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + } + ], + "time": "2026-06-07T11:47:49+00:00" + }, + { + "name": "composer/semver", + "version": "3.5.1", + "source": { + "type": "git", + "url": "https://github.com/composer/semver.git", + "reference": "528948210cc46f967a4b98e83b19e76f2b504993" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/semver/zipball/528948210cc46f967a4b98e83b19e76f2b504993", + "reference": "528948210cc46f967a4b98e83b19e76f2b504993", + "shasum": "" + }, + "require": { + "php": "^5.3.2 || ^7.0 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.11", + "symfony/phpunit-bridge": "^3 || ^7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Composer\\Semver\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nils Adermann", + "email": "naderman@naderman.de", + "homepage": "http://www.naderman.de" + }, + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + }, + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com", + "homepage": "http://robbast.nl" + } + ], + "description": "Version comparison library that offers utilities, version constraint parsing and validation.", + "keywords": [ + "semantic", + "semver", + "validation", + "versioning" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/semver/issues", + "source": "https://github.com/composer/semver/tree/3.5.1" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + } + ], + "time": "2026-10-05T13:12:12+00:00" + }, + { + "name": "composer/xdebug-handler", + "version": "3.0.5", + "source": { + "type": "git", + "url": "https://github.com/composer/xdebug-handler.git", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/6c1925561632e83d60a44492e0b344cf48ab85ef", + "reference": "6c1925561632e83d60a44492e0b344cf48ab85ef", + "shasum": "" + }, + "require": { + "composer/pcre": "^1 || ^2 || ^3", + "php": "^7.2.5 || ^8.0", + "psr/log": "^1 || ^2 || ^3" + }, + "require-dev": { + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.6 || ^10.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Composer\\XdebugHandler\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "John Stevenson", + "email": "john-stevenson@blueyonder.co.uk" + } + ], + "description": "Restarts a process without Xdebug.", + "keywords": [ + "Xdebug", + "performance" + ], + "support": { + "irc": "ircs://irc.libera.chat:6697/composer", + "issues": "https://github.com/composer/xdebug-handler/issues", + "source": "https://github.com/composer/xdebug-handler/tree/3.0.5" + }, + "funding": [ + { + "url": "https://packagist.com", + "type": "custom" + }, + { + "url": "https://github.com/composer", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/composer/composer", + "type": "tidelift" + } + ], + "time": "2024-05-06T16:37:16+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "1.1.6", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "conflict": { + "phpunit/phpunit": "<=7.5 || >=14" }, "require-dev": { "doctrine/coding-standard": "^9 || ^12 || ^14", @@ -6258,23 +6602,46 @@ }, { "name": "driftingly/rector-laravel", - "version": "2.1.2", + "version": "2.6.2", "source": { "type": "git", "url": "https://github.com/driftingly/rector-laravel.git", - "reference": "d7cd932cff9e398a43393f1a1a63b27d574e35ef" + "reference": "c0f9a2ff7365cec45d4dc64223608e7cec74604a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/driftingly/rector-laravel/zipball/d7cd932cff9e398a43393f1a1a63b27d574e35ef", - "reference": "d7cd932cff9e398a43393f1a1a63b27d574e35ef", + "url": "https://api.github.com/repos/driftingly/rector-laravel/zipball/c0f9a2ff7365cec45d4dc64223608e7cec74604a", + "reference": "c0f9a2ff7365cec45d4dc64223608e7cec74604a", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0", - "rector/rector": "^2.2.7" + "php": ">=8.3", + "rector/rector": "^2.6.4", + "symplify/rule-doc-generator-contracts": "^11.2", + "webmozart/assert": "^1.11 || ^2.0" + }, + "require-dev": { + "boundwize/structarmed": "^0.16", + "nette/utils": "^4.0", + "nikic/php-parser": "^5.6", + "phpstan/extension-installer": "^1.3", + "phpstan/phpstan": "^2.2", + "phpstan/phpstan-deprecation-rules": "^2.0", + "phpstan/phpstan-strict-rules": "^2.0", + "phpstan/phpstan-webmozart-assert": "^2.0", + "phpunit/phpunit": "^10.5", + "symplify/rule-doc-generator": "^12.2", + "tightenco/duster": "^3.1", + "tracy/tracy": "^2.10" }, "type": "rector-extension", + "extra": { + "rector": { + "includes": [ + "config/config.php" + ] + } + }, "autoload": { "psr-4": { "RectorLaravel\\": "src" @@ -6287,9 +6654,60 @@ "description": "Rector upgrades rules for Laravel Framework", "support": { "issues": "https://github.com/driftingly/rector-laravel/issues", - "source": "https://github.com/driftingly/rector-laravel/tree/2.1.2" + "source": "https://github.com/driftingly/rector-laravel/tree/2.6.2" + }, + "time": "2026-08-29T21:42:57+00:00" + }, + { + "name": "entropy/entropy", + "version": "0.4.31", + "source": { + "type": "git", + "url": "https://github.com/TomasVotruba/entropy.git", + "reference": "e31f93b8e987982e8d579c7c7f0cfa8aa7ae7e18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/TomasVotruba/entropy/zipball/e31f93b8e987982e8d579c7c7f0cfa8aa7ae7e18", + "reference": "e31f93b8e987982e8d579c7c7f0cfa8aa7ae7e18", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.4", + "symfony/polyfill-php80": "^1.31" }, - "time": "2025-10-31T21:56:58+00:00" + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.4", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpunit/phpunit": "^9.6", + "rector/jack": "^1.0", + "rector/rector": "^2.4", + "rector/swiss-knife": "^2.4", + "shipmonk/composer-dependency-analyser": "^1.8", + "shipmonk/dead-code-detector": "^1.4", + "symplify/easy-coding-standard": "^13.1", + "symplify/phpstan-rules": "^14.10", + "tomasvotruba/type-coverage": "^2.2", + "tracy/tracy": "^2.12" + }, + "type": "library", + "autoload": { + "psr-4": { + "Entropy\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "proprietary" + ], + "description": "Entropy framework", + "support": { + "issues": "https://github.com/TomasVotruba/entropy/issues", + "source": "https://github.com/TomasVotruba/entropy/tree/0.4.31" + }, + "time": "2026-10-13T12:04:57+00:00" }, { "name": "fakerphp/faker", @@ -6356,23 +6774,23 @@ }, { "name": "fidry/cpu-core-counter", - "version": "1.3.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/theofidry/cpu-core-counter.git", - "reference": "db9508f7b1474469d9d3c53b86f817e344732678" + "reference": "d384a7d0d6e67aa497327260ca95023e92dc2032" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/db9508f7b1474469d9d3c53b86f817e344732678", - "reference": "db9508f7b1474469d9d3c53b86f817e344732678", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/d384a7d0d6e67aa497327260ca95023e92dc2032", + "reference": "d384a7d0d6e67aa497327260ca95023e92dc2032", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "fidry/makefile": "^0.2.0", + "fidry/makefile": "^0.2.0 || ^1.1.2", "fidry/php-cs-fixer-config": "^1.1.2", "phpstan/extension-installer": "^1.2.0", "phpstan/phpstan": "^2.0", @@ -6380,6 +6798,7 @@ "phpstan/phpstan-phpunit": "^2.0", "phpstan/phpstan-strict-rules": "^2.0", "phpunit/phpunit": "^8.5.31 || ^9.5.26", + "symfony/polyfill-mbstring": "^1.33", "webmozarts/strict-phpunit": "^7.5" }, "type": "library", @@ -6405,7 +6824,7 @@ ], "support": { "issues": "https://github.com/theofidry/cpu-core-counter/issues", - "source": "https://github.com/theofidry/cpu-core-counter/tree/1.3.0" + "source": "https://github.com/theofidry/cpu-core-counter/tree/1.4.1" }, "funding": [ { @@ -6413,20 +6832,20 @@ "type": "github" } ], - "time": "2025-08-14T07:29:31+00:00" + "time": "2026-09-29T22:11:39+00:00" }, { "name": "filp/whoops", - "version": "2.18.4", + "version": "2.18.7", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "d2102955e48b9fd9ab24280a7ad12ed552752c4d" + "reference": "50670ba239926c50f2073e868f6672f775cd57ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/d2102955e48b9fd9ab24280a7ad12ed552752c4d", - "reference": "d2102955e48b9fd9ab24280a7ad12ed552752c4d", + "url": "https://api.github.com/repos/filp/whoops/zipball/50670ba239926c50f2073e868f6672f775cd57ec", + "reference": "50670ba239926c50f2073e868f6672f775cd57ec", "shasum": "" }, "require": { @@ -6435,8 +6854,8 @@ }, "require-dev": { "mockery/mockery": "^1.0", - "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3", - "symfony/var-dumper": "^4.0 || ^5.0" + "phpunit/phpunit": "^7.5.20 || ^8.5.8 || ^9.3.3 || ^10.5.58", + "symfony/var-dumper": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0" }, "suggest": { "symfony/var-dumper": "Pretty print complex values better with var-dumper available", @@ -6476,7 +6895,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.18.4" + "source": "https://github.com/filp/whoops/tree/2.18.7" }, "funding": [ { @@ -6484,23 +6903,25 @@ "type": "github" } ], - "time": "2025-08-08T12:00:00+00:00" + "time": "2026-10-18T13:17:38+00:00" }, { "name": "hamcrest/hamcrest-php", - "version": "v2.1.1", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487" + "reference": "b61cd040da1a4925bc90a51c074f5297e7c0fa52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", - "reference": "f8b1c0173b22fa6ec77a81fe63e5b01eba7e6487", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b61cd040da1a4925bc90a51c074f5297e7c0fa52", + "reference": "b61cd040da1a4925bc90a51c074f5297e7c0fa52", "shasum": "" }, "require": { + "ext-ctype": "*", + "ext-dom": "*", "php": "^7.4|^8.0" }, "replace": { @@ -6509,13 +6930,15 @@ "kodova/hamcrest-php": "*" }, "require-dev": { + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", "phpunit/php-file-iterator": "^1.4 || ^2.0 || ^3.0", "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -6533,9 +6956,9 @@ ], "support": { "issues": "https://github.com/hamcrest/hamcrest-php/issues", - "source": "https://github.com/hamcrest/hamcrest-php/tree/v2.1.1" + "source": "https://github.com/hamcrest/hamcrest-php/tree/v3.0.0" }, - "time": "2025-04-30T06:54:44+00:00" + "time": "2026-03-17T11:56:53+00:00" }, { "name": "iamcal/sql-parser", @@ -6640,24 +7063,23 @@ }, { "name": "knuckleswtf/scribe", - "version": "5.7.0", + "version": "5.11.0", "source": { "type": "git", "url": "https://github.com/knuckleswtf/scribe.git", - "reference": "81cadf88fca6b78a943af413c3818977c264b591" + "reference": "71c8c4acac495401ab8af1a68a46f09d45aff426" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/knuckleswtf/scribe/zipball/81cadf88fca6b78a943af413c3818977c264b591", - "reference": "81cadf88fca6b78a943af413c3818977c264b591", + "url": "https://api.github.com/repos/knuckleswtf/scribe/zipball/71c8c4acac495401ab8af1a68a46f09d45aff426", + "reference": "71c8c4acac495401ab8af1a68a46f09d45aff426", "shasum": "" }, "require": { "ext-fileinfo": "*", - "ext-json": "*", "ext-pdo": "*", "fakerphp/faker": "^1.23.1", - "laravel/framework": "^9.21 || ^10.0 || ^11.0 || ^12.0", + "laravel/framework": "^9.21 || ^10.0 || ^11.0 || ^12.0 || ^13.0", "league/flysystem": "^3.0", "mpociot/reflection-docblock": "^1.0.1", "nikic/php-parser": "^5.0", @@ -6666,8 +7088,8 @@ "php": ">=8.1", "ramsey/uuid": "^4.2.2", "shalvah/upgrader": "^0.6.0", - "symfony/var-exporter": "^6.0 || ^7.0", - "symfony/yaml": "^6.0 || ^7.0" + "symfony/var-exporter": "^6.0 || ^7.0 || ^8.0", + "symfony/yaml": "^6.0 || ^7.0 || ^8.0" }, "replace": { "mpociot/laravel-apidoc-generator": "*" @@ -6678,13 +7100,13 @@ "laravel/pint": "^1.20", "league/fractal": "^0.20", "nikic/fast-route": "^1.3", - "orchestra/testbench": "^7.0 || ^8.0 || ^9.10 || ^10.0", + "orchestra/testbench": "^7.0 || ^8.0 || ^9.10 || ^10.0 || ^11.0", "pestphp/pest": "^1.21 || ^2.0 || ^3.0 || ^4.0", "phpstan/phpstan": "^2.1.5", "phpunit/phpunit": "^9.0 || ^10.0 || ^11.0 || ^12.0", "spatie/ray": "^1.41", - "symfony/css-selector": "^6.0 || ^7.0", - "symfony/dom-crawler": "^6.0 || ^7.0" + "symfony/css-selector": "^6.0 || ^7.0 || ^8.0", + "symfony/dom-crawler": "^6.0 || ^7.0 || ^8.0" }, "type": "library", "extra": { @@ -6721,7 +7143,7 @@ ], "support": { "issues": "https://github.com/knuckleswtf/scribe/issues", - "source": "https://github.com/knuckleswtf/scribe/tree/5.7.0" + "source": "https://github.com/knuckleswtf/scribe/tree/5.11.0" }, "funding": [ { @@ -6729,24 +7151,23 @@ "type": "patreon" } ], - "time": "2026-02-04T20:03:24+00:00" + "time": "2026-06-08T15:39:10+00:00" }, { "name": "larastan/larastan", - "version": "3.x-dev", + "version": "v3.13.0", "source": { "type": "git", "url": "https://github.com/larastan/larastan.git", - "reference": "64a52bcc5347c89fdf131cb59f96ebfbc8d1ad65" + "reference": "24ee69a7705ffc7c2cd8a3c96a5f498a4c2de5e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/larastan/larastan/zipball/64a52bcc5347c89fdf131cb59f96ebfbc8d1ad65", - "reference": "64a52bcc5347c89fdf131cb59f96ebfbc8d1ad65", + "url": "https://api.github.com/repos/larastan/larastan/zipball/24ee69a7705ffc7c2cd8a3c96a5f498a4c2de5e3", + "reference": "24ee69a7705ffc7c2cd8a3c96a5f498a4c2de5e3", "shasum": "" }, "require": { - "ext-json": "*", "iamcal/sql-parser": "^0.7.0", "illuminate/console": "^11.44.2 || ^12.4.1 || ^13", "illuminate/container": "^11.44.2 || ^12.4.1 || ^13", @@ -6756,23 +7177,22 @@ "illuminate/pipeline": "^11.44.2 || ^12.4.1 || ^13", "illuminate/support": "^11.44.2 || ^12.4.1 || ^13", "php": "^8.2", - "phpstan/phpstan": "^2.1.32" + "phpstan/phpstan": "^2.3.0" }, "require-dev": { - "doctrine/coding-standard": "^13", + "doctrine/coding-standard": "^14", "laravel/framework": "^11.44.2 || ^12.7.2 || ^13", "mockery/mockery": "^1.6.12", "nikic/php-parser": "^5.4", "orchestra/canvas": "^v9.2.2 || ^10.0.1 || ^11", "orchestra/testbench-core": "^9.12.0 || ^10.1 || ^11", "phpstan/phpstan-deprecation-rules": "^2.0.1", - "phpunit/phpunit": "^10.5.35 || ^11.5.15 || ^12.5.8" + "phpunit/phpunit": "^10.5.35 || ^11.5.15 || ^12.5.8 || ^13.3.0" }, "suggest": { "orchestra/testbench": "Using Larastan for analysing a package needs Testbench", "phpmyadmin/sql-parser": "Install to enable Larastan's optional phpMyAdmin-based SQL parser automatically" }, - "default-branch": true, "type": "phpstan-extension", "extra": { "phpstan": { @@ -6812,7 +7232,7 @@ ], "support": { "issues": "https://github.com/larastan/larastan/issues", - "source": "https://github.com/larastan/larastan/tree/3.x" + "source": "https://github.com/larastan/larastan/tree/v3.13.0" }, "funding": [ { @@ -6820,34 +7240,35 @@ "type": "github" } ], - "time": "2026-02-20T12:07:12+00:00" + "time": "2026-10-07T14:14:28+00:00" }, { "name": "laravel/boost", - "version": "v2.4.1", + "version": "v2.10.3", "source": { "type": "git", "url": "https://github.com/laravel/boost.git", - "reference": "f6241df9fd81a86d79a051851177d4ffe3e28506" + "reference": "75c269a8a53e931c7252e7cd562e1a209356a7c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/boost/zipball/f6241df9fd81a86d79a051851177d4ffe3e28506", - "reference": "f6241df9fd81a86d79a051851177d4ffe3e28506", + "url": "https://api.github.com/repos/laravel/boost/zipball/75c269a8a53e931c7252e7cd562e1a209356a7c6", + "reference": "75c269a8a53e931c7252e7cd562e1a209356a7c6", "shasum": "" }, "require": { - "guzzlehttp/guzzle": "^7.9", + "guzzlehttp/guzzle": "^7.9|^8.0", "illuminate/console": "^11.45.3|^12.41.1|^13.0", "illuminate/contracts": "^11.45.3|^12.41.1|^13.0", "illuminate/routing": "^11.45.3|^12.41.1|^13.0", "illuminate/support": "^11.45.3|^12.41.1|^13.0", - "laravel/mcp": "^0.5.1|^0.6.0", + "laravel/mcp": "^0.7.1|^0.8.0|^0.9.0|^1.0", "laravel/prompts": "^0.3.10", - "laravel/roster": "^0.5.0", + "laravel/roster": "^1.0.0", "php": "^8.2" }, "require-dev": { + "jasonmccreary/double": "^1.0", "laravel/pint": "^1.27.0", "mockery/mockery": "^1.6.12", "orchestra/testbench": "^9.15.0|^10.6|^11.0", @@ -6886,20 +7307,20 @@ "issues": "https://github.com/laravel/boost/issues", "source": "https://github.com/laravel/boost" }, - "time": "2026-03-25T16:37:40+00:00" + "time": "2026-10-07T19:07:19+00:00" }, { "name": "laravel/mcp", - "version": "v0.6.5", + "version": "v1.0.2", "source": { "type": "git", "url": "https://github.com/laravel/mcp.git", - "reference": "583a6282bf0f074d754f7ff5cd1fff9d34244691" + "reference": "26c7803551028653beab49af0e672ae38607b772" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/mcp/zipball/583a6282bf0f074d754f7ff5cd1fff9d34244691", - "reference": "583a6282bf0f074d754f7ff5cd1fff9d34244691", + "url": "https://api.github.com/repos/laravel/mcp/zipball/26c7803551028653beab49af0e672ae38607b772", + "reference": "26c7803551028653beab49af0e672ae38607b772", "shasum": "" }, "require": { @@ -6913,9 +7334,11 @@ "illuminate/routing": "^11.45.3|^12.41.1|^13.0", "illuminate/support": "^11.45.3|^12.41.1|^13.0", "illuminate/validation": "^11.45.3|^12.41.1|^13.0", - "php": "^8.2" + "php": "^8.2", + "symfony/process": "^7.4.5|^8.0.5" }, "require-dev": { + "jasonmccreary/double": "^1.0", "laravel/pint": "^1.20", "orchestra/testbench": "^9.15|^10.8|^11.0", "pestphp/pest": "^3.8.5|^4.3.2", @@ -6926,7 +7349,7 @@ "extra": { "laravel": { "aliases": { - "Mcp": "Laravel\\Mcp\\Server\\Facades\\Mcp" + "Mcp": "Laravel\\Mcp\\Facades\\Mcp" }, "providers": [ "Laravel\\Mcp\\Server\\McpServiceProvider" @@ -6959,20 +7382,20 @@ "issues": "https://github.com/laravel/mcp/issues", "source": "https://github.com/laravel/mcp" }, - "time": "2026-03-30T19:17:10+00:00" + "time": "2026-10-11T20:52:46+00:00" }, { "name": "laravel/pail", - "version": "v1.2.6", + "version": "v1.2.7", "source": { "type": "git", "url": "https://github.com/laravel/pail.git", - "reference": "aa71a01c309e7f66bc2ec4fb1a59291b82eb4abf" + "reference": "2f7d27dada8effc48b8c424445a69cca7007daaa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pail/zipball/aa71a01c309e7f66bc2ec4fb1a59291b82eb4abf", - "reference": "aa71a01c309e7f66bc2ec4fb1a59291b82eb4abf", + "url": "https://api.github.com/repos/laravel/pail/zipball/2f7d27dada8effc48b8c424445a69cca7007daaa", + "reference": "2f7d27dada8effc48b8c424445a69cca7007daaa", "shasum": "" }, "require": { @@ -7039,20 +7462,20 @@ "issues": "https://github.com/laravel/pail/issues", "source": "https://github.com/laravel/pail" }, - "time": "2026-02-09T13:44:54+00:00" + "time": "2026-05-20T22:24:57+00:00" }, { "name": "laravel/pint", - "version": "v1.27.1", + "version": "v1.32.1", "source": { "type": "git", "url": "https://github.com/laravel/pint.git", - "reference": "54cca2de13790570c7b6f0f94f37896bee4abcb5" + "reference": "006bd7825eb01daf92959d060b89cd9514fe4253" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/pint/zipball/54cca2de13790570c7b6f0f94f37896bee4abcb5", - "reference": "54cca2de13790570c7b6f0f94f37896bee4abcb5", + "url": "https://api.github.com/repos/laravel/pint/zipball/006bd7825eb01daf92959d060b89cd9514fe4253", + "reference": "006bd7825eb01daf92959d060b89cd9514fe4253", "shasum": "" }, "require": { @@ -7060,16 +7483,19 @@ "ext-mbstring": "*", "ext-tokenizer": "*", "ext-xml": "*", - "php": "^8.2.0" + "php": "^8.3.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.93.1", - "illuminate/view": "^12.51.0", - "larastan/larastan": "^3.9.2", - "laravel-zero/framework": "^12.0.5", - "mockery/mockery": "^1.6.12", - "nunomaduro/termwind": "^2.3.3", - "pestphp/pest": "^3.8.5" + "composer/semver": "^3.4.4", + "friendsofphp/php-cs-fixer": "^3.95.25", + "illuminate/view": "^13.31.0", + "larastan/larastan": "^3.11.0", + "laravel-zero/framework": "^13.0.0", + "laravel/agent-detector": "^2.0.2", + "laravel/prompts": "^0.3.24", + "mockery/mockery": "^1.6.15", + "nunomaduro/termwind": "^2.4.0", + "pestphp/pest": "^4.7.8" }, "bin": [ "builds/pint" @@ -7106,36 +7532,37 @@ "issues": "https://github.com/laravel/pint/issues", "source": "https://github.com/laravel/pint" }, - "time": "2026-02-10T20:00:20+00:00" + "time": "2026-09-10T10:47:55+00:00" }, { "name": "laravel/roster", - "version": "v0.5.1", + "version": "v1.0.0", "source": { "type": "git", "url": "https://github.com/laravel/roster.git", - "reference": "5089de7615f72f78e831590ff9d0435fed0102bb" + "reference": "89e518bd88ae98ff50f6082f6b517c8d8e8245fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/roster/zipball/5089de7615f72f78e831590ff9d0435fed0102bb", - "reference": "5089de7615f72f78e831590ff9d0435fed0102bb", + "url": "https://api.github.com/repos/laravel/roster/zipball/89e518bd88ae98ff50f6082f6b517c8d8e8245fa", + "reference": "89e518bd88ae98ff50f6082f6b517c8d8e8245fa", "shasum": "" }, "require": { + "composer/semver": "^3.0", "illuminate/console": "^11.0|^12.0|^13.0", "illuminate/contracts": "^11.0|^12.0|^13.0", - "illuminate/routing": "^11.0|^12.0|^13.0", "illuminate/support": "^11.0|^12.0|^13.0", "php": "^8.2", "symfony/yaml": "^7.2|^8.0" }, "require-dev": { - "laravel/pint": "^1.14", + "laravel/pint": "^1.29", "mockery/mockery": "^1.6", "orchestra/testbench": "^9.0|^10.0|^11.0", "pestphp/pest": "^3.0|^4.1", - "phpstan/phpstan": "^2.0" + "phpstan/phpstan": "^2.0", + "rector/rector": "^2.0" }, "type": "library", "extra": { @@ -7167,33 +7594,32 @@ "issues": "https://github.com/laravel/roster/issues", "source": "https://github.com/laravel/roster" }, - "time": "2026-03-05T07:58:43+00:00" + "time": "2026-07-18T17:53:15+00:00" }, { "name": "mockery/mockery", - "version": "1.6.12", + "version": "1.6.15", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699" + "reference": "967a801bd188989a5669bd280f252d51c0fdc9ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/1f4efdd7d3beafe9807b08156dfcb176d18f1699", - "reference": "1f4efdd7d3beafe9807b08156dfcb176d18f1699", + "url": "https://api.github.com/repos/mockery/mockery/zipball/967a801bd188989a5669bd280f252d51c0fdc9ee", + "reference": "967a801bd188989a5669bd280f252d51c0fdc9ee", "shasum": "" }, "require": { - "hamcrest/hamcrest-php": "^2.0.1", - "lib-pcre": ">=7.0", + "hamcrest/hamcrest-php": "^2.0 || ^3.0", "php": ">=7.3" }, "conflict": { "phpunit/phpunit": "<8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5 || ^9.6.17", - "symplify/easy-coding-standard": "^12.1.14" + "phpunit/phpunit": "^9.6.36", + "symplify/easy-coding-standard": "^13.2.17" }, "type": "library", "autoload": { @@ -7250,7 +7676,7 @@ "security": "https://github.com/mockery/mockery/security/advisories", "source": "https://github.com/mockery/mockery" }, - "time": "2024-05-16T03:13:13+00:00" + "time": "2026-08-19T19:37:52+00:00" }, { "name": "mpociot/reflection-docblock", @@ -7307,20 +7733,20 @@ }, { "name": "myclabs/deep-copy", - "version": "1.13.4", + "version": "1.14.0", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a" + "reference": "8680aa248f8e07bc8fb43f56f0f5fc77a0c96aae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/07d290f0c47959fd5eed98c95ee5602db07e0b6a", - "reference": "07d290f0c47959fd5eed98c95ee5602db07e0b6a", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/8680aa248f8e07bc8fb43f56f0f5fc77a0c96aae", + "reference": "8680aa248f8e07bc8fb43f56f0f5fc77a0c96aae", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.0" }, "conflict": { "doctrine/collections": "<1.6.8", @@ -7355,35 +7781,35 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.13.4" + "source": "https://github.com/myclabs/DeepCopy/tree/1.14.0" }, "funding": [ { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" + "url": "https://github.com/mnapoli", + "type": "github" } ], - "time": "2025-08-01T08:46:24+00:00" + "time": "2026-08-11T10:17:44+00:00" }, { "name": "nunomaduro/collision", - "version": "v8.9.1", + "version": "v8.9.5", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "a1ed3fa530fd60bc515f9303e8520fcb7d4bd935" + "reference": "fb53eacd509a1d303858e2d20cfebf2d630254ec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/a1ed3fa530fd60bc515f9303e8520fcb7d4bd935", - "reference": "a1ed3fa530fd60bc515f9303e8520fcb7d4bd935", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/fb53eacd509a1d303858e2d20cfebf2d630254ec", + "reference": "fb53eacd509a1d303858e2d20cfebf2d630254ec", "shasum": "" }, "require": { "filp/whoops": "^2.18.4", "nunomaduro/termwind": "^2.4.0", "php": "^8.2.0", - "symfony/console": "^7.4.4 || ^8.0.4" + "symfony/console": "^7.4.14 || ^8.1.1" }, "conflict": { "laravel/framework": "<11.48.0 || >=14.0.0", @@ -7391,12 +7817,12 @@ }, "require-dev": { "brianium/paratest": "^7.8.5", - "larastan/larastan": "^3.9.2", - "laravel/framework": "^11.48.0 || ^12.52.0", - "laravel/pint": "^1.27.1", - "orchestra/testbench-core": "^9.12.0 || ^10.9.0", - "pestphp/pest": "^3.8.5 || ^4.4.1 || ^5.0.0", - "sebastian/environment": "^7.2.1 || ^8.0.3 || ^9.0.0" + "larastan/larastan": "^3.10.0", + "laravel/framework": "^11.48.0 || ^12.56.0 || ^13.20.0", + "laravel/pint": "^1.29.3", + "orchestra/testbench-core": "^9.12.0 || ^10.12.1 || ^11.3.5", + "pestphp/pest": "^3.8.5 || ^4.7.5 || ^5.0.0", + "sebastian/environment": "^7.2.1 || ^8.1.2 || ^9.3.2" }, "type": "library", "extra": { @@ -7459,20 +7885,20 @@ "type": "patreon" } ], - "time": "2026-02-17T17:33:08+00:00" + "time": "2026-07-15T19:09:14+00:00" }, { "name": "nunomaduro/pokio", - "version": "v0.1.2", + "version": "v1.0.1", "source": { "type": "git", "url": "https://github.com/nunomaduro/pokio.git", - "reference": "961069aa5682328cd78cff9c81e2fb67a15b5b1b" + "reference": "fc7884ebc5b0fabd6e267c0b4e6f750ba69cee5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/pokio/zipball/961069aa5682328cd78cff9c81e2fb67a15b5b1b", - "reference": "961069aa5682328cd78cff9c81e2fb67a15b5b1b", + "url": "https://api.github.com/repos/nunomaduro/pokio/zipball/fc7884ebc5b0fabd6e267c0b4e6f750ba69cee5b", + "reference": "fc7884ebc5b0fabd6e267c0b4e6f750ba69cee5b", "shasum": "" }, "require": { @@ -7482,12 +7908,12 @@ "symplify/easy-parallel": "<11.2.2" }, "require-dev": { - "laravel/pint": "^1.26.0", + "laravel/pint": "^1.29.0", "peckphp/peck": "^0.1.3", - "pestphp/pest": "^4.3.1", + "pestphp/pest": "^4.5.0", "pestphp/pest-plugin-type-coverage": "^4.0.3", - "phpstan/phpstan": "^2.1.33", - "symfony/var-dumper": "^7.4.3" + "phpstan/phpstan": "^2.1.46", + "symfony/var-dumper": "^7.4.8 || ^8.0.8" }, "type": "library", "extra": { @@ -7522,7 +7948,7 @@ ], "support": { "issues": "https://github.com/nunomaduro/pokio/issues", - "source": "https://github.com/nunomaduro/pokio/tree/v0.1.2" + "source": "https://github.com/nunomaduro/pokio/tree/v1.0.1" }, "funding": [ { @@ -7538,7 +7964,7 @@ "type": "patreon" } ], - "time": "2026-01-04T16:32:40+00:00" + "time": "2026-04-12T12:06:31+00:00" }, { "name": "parsedown/parsedown", @@ -7592,41 +8018,43 @@ }, { "name": "pestphp/pest", - "version": "v4.4.1", + "version": "v4.7.8", "source": { "type": "git", "url": "https://github.com/pestphp/pest.git", - "reference": "f96a1b27864b585b0b29b0ee7331176726f7e54a" + "reference": "5b2293f67adcf1b2320b33f521b94a692d18f360" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest/zipball/f96a1b27864b585b0b29b0ee7331176726f7e54a", - "reference": "f96a1b27864b585b0b29b0ee7331176726f7e54a", + "url": "https://api.github.com/repos/pestphp/pest/zipball/5b2293f67adcf1b2320b33f521b94a692d18f360", + "reference": "5b2293f67adcf1b2320b33f521b94a692d18f360", "shasum": "" }, "require": { - "brianium/paratest": "^7.19.0", - "nunomaduro/collision": "^8.9.0", + "brianium/paratest": "^7.20.0", + "composer/xdebug-handler": "^3.0.5", + "nunomaduro/collision": "^8.9.5", "nunomaduro/termwind": "^2.4.0", "pestphp/pest-plugin": "^4.0.0", - "pestphp/pest-plugin-arch": "^4.0.0", + "pestphp/pest-plugin-arch": "^4.0.2", "pestphp/pest-plugin-mutate": "^4.0.1", "pestphp/pest-plugin-profanity": "^4.2.1", "php": "^8.3.0", - "phpunit/phpunit": "^12.5.12", - "symfony/process": "^7.4.5|^8.0.5" + "phpunit/phpunit": "^12.5.33", + "symfony/process": "^7.4.13|^8.1.0" }, "conflict": { "filp/whoops": "<2.18.3", - "phpunit/phpunit": ">12.5.12", + "phpunit/phpunit": ">12.5.33", "sebastian/exporter": "<7.0.0", "webmozart/assert": "<1.11.0" }, "require-dev": { + "mrpunyapal/peststan": "^0.2.12", "pestphp/pest-dev-tools": "^4.1.0", - "pestphp/pest-plugin-browser": "^4.3.0", - "pestphp/pest-plugin-type-coverage": "^4.0.3", - "psy/psysh": "^0.12.20" + "pestphp/pest-plugin-browser": "^4.3.1", + "pestphp/pest-plugin-type-coverage": "^4.0.4", + "psy/psysh": "^0.12.24" }, "bin": [ "bin/pest" @@ -7692,7 +8120,7 @@ ], "support": { "issues": "https://github.com/pestphp/pest/issues", - "source": "https://github.com/pestphp/pest/tree/v4.4.1" + "source": "https://github.com/pestphp/pest/tree/v4.7.8" }, "funding": [ { @@ -7704,7 +8132,7 @@ "type": "github" } ], - "time": "2026-02-17T15:27:18+00:00" + "time": "2026-08-03T20:49:44+00:00" }, { "name": "pestphp/pest-plugin", @@ -7778,26 +8206,26 @@ }, { "name": "pestphp/pest-plugin-arch", - "version": "v4.0.0", + "version": "v4.0.2", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin-arch.git", - "reference": "25bb17e37920ccc35cbbcda3b00d596aadf3e58d" + "reference": "3fb0d02a91b9da504b139dc7ab2a31efb7c3215c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin-arch/zipball/25bb17e37920ccc35cbbcda3b00d596aadf3e58d", - "reference": "25bb17e37920ccc35cbbcda3b00d596aadf3e58d", + "url": "https://api.github.com/repos/pestphp/pest-plugin-arch/zipball/3fb0d02a91b9da504b139dc7ab2a31efb7c3215c", + "reference": "3fb0d02a91b9da504b139dc7ab2a31efb7c3215c", "shasum": "" }, "require": { "pestphp/pest-plugin": "^4.0.0", "php": "^8.3", - "ta-tikoma/phpunit-architecture-test": "^0.8.5" + "ta-tikoma/phpunit-architecture-test": "^0.8.7" }, "require-dev": { - "pestphp/pest": "^4.0.0", - "pestphp/pest-dev-tools": "^4.0.0" + "pestphp/pest": "^4.4.6", + "pestphp/pest-dev-tools": "^4.1.0" }, "type": "library", "extra": { @@ -7832,7 +8260,7 @@ "unit" ], "support": { - "source": "https://github.com/pestphp/pest-plugin-arch/tree/v4.0.0" + "source": "https://github.com/pestphp/pest-plugin-arch/tree/v4.0.2" }, "funding": [ { @@ -7844,7 +8272,7 @@ "type": "github" } ], - "time": "2025-08-20T13:10:51+00:00" + "time": "2026-04-10T17:20:19+00:00" }, { "name": "pestphp/pest-plugin-laravel", @@ -8054,28 +8482,28 @@ }, { "name": "pestphp/pest-plugin-type-coverage", - "version": "v4.0.3", + "version": "v4.0.4", "source": { "type": "git", "url": "https://github.com/pestphp/pest-plugin-type-coverage.git", - "reference": "123bbf73d4b790373600132f503fd8d1453d40bb" + "reference": "f485d40ec4e2081f9d3456c00f2c008f145d7896" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pestphp/pest-plugin-type-coverage/zipball/123bbf73d4b790373600132f503fd8d1453d40bb", - "reference": "123bbf73d4b790373600132f503fd8d1453d40bb", + "url": "https://api.github.com/repos/pestphp/pest-plugin-type-coverage/zipball/f485d40ec4e2081f9d3456c00f2c008f145d7896", + "reference": "f485d40ec4e2081f9d3456c00f2c008f145d7896", "shasum": "" }, "require": { - "nunomaduro/pokio": "^0.1.1", + "nunomaduro/pokio": "^1.0.0", "pestphp/pest-plugin": "^4.0.0", "php": "^8.3", - "phpstan/phpstan": "^1.12.24|^2.1.31", - "tomasvotruba/type-coverage": "^1.0.0|^2.0.2" + "phpstan/phpstan": "^1.12.24|^2.1.46", + "tomasvotruba/type-coverage": "^1.0.0|^2.1.0" }, "require-dev": { - "pestphp/pest": "^4.1.3", - "pestphp/pest-dev-tools": "^4.0.0" + "pestphp/pest": "^4.4.5", + "pestphp/pest-dev-tools": "^4.1.0" }, "type": "library", "extra": { @@ -8107,7 +8535,7 @@ "unit" ], "support": { - "source": "https://github.com/pestphp/pest-plugin-type-coverage/tree/v4.0.3" + "source": "https://github.com/pestphp/pest-plugin-type-coverage/tree/v4.0.4" }, "funding": [ { @@ -8119,7 +8547,7 @@ "type": "github" } ], - "time": "2025-11-02T23:10:59+00:00" + "time": "2026-04-06T14:00:30+00:00" }, { "name": "phar-io/manifest", @@ -8241,20 +8669,25 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.2.0", + "version": "2.2.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" + "reference": "ee15a5a2022c8383906b225055e9496a6a5e6e3b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", - "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/ee15a5a2022c8383906b225055e9496a6a5e6e3b", + "reference": "ee15a5a2022c8383906b225055e9496a6a5e6e3b", "shasum": "" }, "require": { - "php": "^7.2 || ^8.0" + "php": "^7.4 || ^8.0" + }, + "require-dev": { + "phpstan/phpstan": "^1.8", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^4.25" }, "type": "library", "extra": { @@ -8278,7 +8711,7 @@ } ], "description": "Common reflection classes used by phpdocumentor to reflect the code structure", - "homepage": "http://www.phpdoc.org", + "homepage": "https://www.phpdoc.org", "keywords": [ "FQSEN", "phpDocumentor", @@ -8288,22 +8721,22 @@ ], "support": { "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.x" + "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/2.2.1" }, - "time": "2020-06-27T09:03:43+00:00" + "time": "2025-11-10T21:21:55+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.6.6", + "version": "6.0.3", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "5cee1d3dfc2d2aa6599834520911d246f656bcb8" + "reference": "7bae67520aa9f5ecc506d646810bd40d9da54582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/5cee1d3dfc2d2aa6599834520911d246f656bcb8", - "reference": "5cee1d3dfc2d2aa6599834520911d246f656bcb8", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/7bae67520aa9f5ecc506d646810bd40d9da54582", + "reference": "7bae67520aa9f5ecc506d646810bd40d9da54582", "shasum": "" }, "require": { @@ -8311,8 +8744,8 @@ "ext-filter": "*", "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.2", - "phpdocumentor/type-resolver": "^1.7", - "phpstan/phpdoc-parser": "^1.7|^2.0", + "phpdocumentor/type-resolver": "^2.0", + "phpstan/phpdoc-parser": "^2.0", "webmozart/assert": "^1.9.1 || ^2" }, "require-dev": { @@ -8322,7 +8755,8 @@ "phpstan/phpstan-mockery": "^1.1", "phpstan/phpstan-webmozart-assert": "^1.2", "phpunit/phpunit": "^9.5", - "psalm/phar": "^5.26" + "psalm/phar": "^5.26", + "shipmonk/dead-code-detector": "^0.5.1" }, "type": "library", "extra": { @@ -8352,44 +8786,44 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.6.6" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/6.0.3" }, - "time": "2025-12-22T21:13:58+00:00" + "time": "2026-03-18T20:49:53+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.12.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195" + "reference": "dbe2133bb23e2e33a6834f4ed417f24a1b167769" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/92a98ada2b93d9b201a613cb5a33584dde25f195", - "reference": "92a98ada2b93d9b201a613cb5a33584dde25f195", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/dbe2133bb23e2e33a6834f4ed417f24a1b167769", + "reference": "dbe2133bb23e2e33a6834f4ed417f24a1b167769", "shasum": "" }, "require": { "doctrine/deprecations": "^1.0", - "php": "^7.3 || ^8.0", + "php": "^7.4 || ^8.0", "phpdocumentor/reflection-common": "^2.0", - "phpstan/phpdoc-parser": "^1.18|^2.0" + "phpstan/phpdoc-parser": "^2.0" }, "require-dev": { "ext-tokenizer": "*", "phpbench/phpbench": "^1.2", - "phpstan/extension-installer": "^1.1", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", + "phpstan/extension-installer": "^1.4", + "phpstan/phpstan": "^2.1", + "phpstan/phpstan-phpunit": "^2.0", "phpunit/phpunit": "^9.5", - "rector/rector": "^0.13.9", - "vimeo/psalm": "^4.25" + "psalm/phar": "^4" }, "type": "library", "extra": { "branch-alias": { - "dev-1.x": "1.x-dev" + "dev-1.x": "1.x-dev", + "dev-2.x": "2.x-dev" } }, "autoload": { @@ -8410,22 +8844,22 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.12.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/2.1.0" }, - "time": "2025-11-21T15:09:14+00:00" + "time": "2026-09-27T19:32:54+00:00" }, { "name": "phpstan/phpdoc-parser", - "version": "2.3.2", + "version": "2.3.6", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a" + "reference": "1427af4647235b4a73b13940b1f1258d3584f36e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a004701b11273a26cd7955a61d67a7f1e525a45a", - "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/1427af4647235b4a73b13940b1f1258d3584f36e", + "reference": "1427af4647235b4a73b13940b1f1258d3584f36e", "shasum": "" }, "require": { @@ -8457,17 +8891,17 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.2" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.6" }, - "time": "2026-01-25T14:56:51+00:00" + "time": "2026-09-27T20:07:45+00:00" }, { "name": "phpstan/phpstan", - "version": "2.1.39", + "version": "2.3.1", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c6f73a2af4cbcd99c931d0fb8f08548cc0fa8224", - "reference": "c6f73a2af4cbcd99c931d0fb8f08548cc0fa8224", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/6155239b488e95d26d1ebd95c6b4bb294d7f09db", + "reference": "6155239b488e95d26d1ebd95c6b4bb294d7f09db", "shasum": "" }, "require": { @@ -8490,6 +8924,17 @@ "license": [ "MIT" ], + "authors": [ + { + "name": "Ondřej Mirtes" + }, + { + "name": "Markus Staab" + }, + { + "name": "Vincent Langlet" + } + ], "description": "PHPStan - PHP Static Analysis Tool", "keywords": [ "dev", @@ -8512,38 +8957,37 @@ "type": "github" } ], - "time": "2026-02-11T14:48:56+00:00" + "time": "2026-10-08T21:09:11+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "12.5.3", + "version": "12.5.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "b015312f28dd75b75d3422ca37dff2cd1a565e8d" + "reference": "7440368d94738d54f2c1de24dbd3871793bbb0dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b015312f28dd75b75d3422ca37dff2cd1a565e8d", - "reference": "b015312f28dd75b75d3422ca37dff2cd1a565e8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/7440368d94738d54f2c1de24dbd3871793bbb0dd", + "reference": "7440368d94738d54f2c1de24dbd3871793bbb0dd", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^5.7.0", + "nikic/php-parser": "^5.9.0", "php": ">=8.3", - "phpunit/php-file-iterator": "^6.0", - "phpunit/php-text-template": "^5.0", + "phpunit/php-text-template": "^5.0.1", "sebastian/complexity": "^5.0", - "sebastian/environment": "^8.0.3", - "sebastian/lines-of-code": "^4.0", + "sebastian/environment": "^8.1.2", + "sebastian/lines-of-code": "^4.0.1", "sebastian/version": "^6.0", "theseer/tokenizer": "^2.0.1" }, "require-dev": { - "phpunit/phpunit": "^12.5.1" + "phpunit/phpunit": "^12.5.37" }, "suggest": { "ext-pcov": "PHP extension that provides line coverage", @@ -8581,7 +9025,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.5.3" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/12.5.8" }, "funding": [ { @@ -8601,27 +9045,27 @@ "type": "tidelift" } ], - "time": "2026-02-06T06:01:44+00:00" + "time": "2026-10-03T14:03:50+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "6.0.1", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5" + "reference": "a248d1640ab059b075f53a2ef0f9856e864e06b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5", - "reference": "3d1cd096ef6bea4bf2762ba586e35dbd317cbfd5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a248d1640ab059b075f53a2ef0f9856e864e06b5", + "reference": "a248d1640ab059b075f53a2ef0f9856e864e06b5", "shasum": "" }, "require": { "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.33" }, "type": "library", "extra": { @@ -8654,7 +9098,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", "security": "https://github.com/sebastianbergmann/php-file-iterator/security/policy", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/6.0.2" }, "funding": [ { @@ -8674,7 +9118,7 @@ "type": "tidelift" } ], - "time": "2026-02-02T14:04:18+00:00" + "time": "2026-08-25T14:40:53+00:00" }, { "name": "phpunit/php-invoker", @@ -8742,23 +9186,23 @@ }, { "name": "phpunit/php-text-template", - "version": "5.0.0", + "version": "5.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53" + "reference": "babab73b7ef9fae406f2eb3ee11323a61caa63d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/e1367a453f0eda562eedb4f659e13aa900d66c53", - "reference": "e1367a453f0eda562eedb4f659e13aa900d66c53", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/babab73b7ef9fae406f2eb3ee11323a61caa63d5", + "reference": "babab73b7ef9fae406f2eb3ee11323a61caa63d5", "shasum": "" }, "require": { "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.37" }, "type": "library", "extra": { @@ -8790,15 +9234,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/php-text-template/issues", "security": "https://github.com/sebastianbergmann/php-text-template/security/policy", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/5.0.0" + "source": "https://github.com/sebastianbergmann/php-text-template/tree/5.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/php-text-template", + "type": "tidelift" } ], - "time": "2025-02-07T04:59:16+00:00" + "time": "2026-10-03T04:51:29+00:00" }, { "name": "phpunit/php-timer", @@ -8862,43 +9318,43 @@ }, { "name": "phpunit/phpunit", - "version": "12.5.12", + "version": "12.5.33", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "418e06b3b46b0d54bad749ff4907fc7dfb530199" + "reference": "b98e028a26c5c5ba7e4a54be96ccf35f2914d184" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/418e06b3b46b0d54bad749ff4907fc7dfb530199", - "reference": "418e06b3b46b0d54bad749ff4907fc7dfb530199", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b98e028a26c5c5ba7e4a54be96ccf35f2914d184", + "reference": "b98e028a26c5c5ba7e4a54be96ccf35f2914d184", "shasum": "" }, "require": { "ext-dom": "*", + "ext-filter": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", - "ext-xml": "*", "ext-xmlwriter": "*", "myclabs/deep-copy": "^1.13.4", "phar-io/manifest": "^2.0.4", "phar-io/version": "^3.2.1", "php": ">=8.3", - "phpunit/php-code-coverage": "^12.5.3", + "phpunit/php-code-coverage": "^12.5.7", "phpunit/php-file-iterator": "^6.0.1", "phpunit/php-invoker": "^6.0.0", "phpunit/php-text-template": "^5.0.0", "phpunit/php-timer": "^8.0.0", - "sebastian/cli-parser": "^4.2.0", - "sebastian/comparator": "^7.1.4", + "sebastian/cli-parser": "^4.2.1", + "sebastian/comparator": "^7.1.8", "sebastian/diff": "^7.0.0", - "sebastian/environment": "^8.0.3", - "sebastian/exporter": "^7.0.2", - "sebastian/global-state": "^8.0.2", + "sebastian/environment": "^8.1.2", + "sebastian/exporter": "^7.0.3", + "sebastian/global-state": "^8.0.3", "sebastian/object-enumerator": "^7.0.0", "sebastian/recursion-context": "^7.0.1", - "sebastian/type": "^6.0.3", + "sebastian/type": "^6.0.4", "sebastian/version": "^6.0.0", "staabm/side-effects-detector": "^1.0.5" }, @@ -8940,49 +9396,33 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.12" + "source": "https://github.com/sebastianbergmann/phpunit/tree/12.5.33" }, "funding": [ { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" + "url": "https://phpunit.de/sponsoring.html", + "type": "other" } ], - "time": "2026-02-16T08:34:36+00:00" + "time": "2026-07-28T13:58:09+00:00" }, { "name": "rector/rector", - "version": "2.3.8", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "bbd37aedd8df749916cffa2a947cfc4714d1ba2c" + "reference": "4d6a39b7fff302cac0ce90cd959a53c2f6a32776" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/bbd37aedd8df749916cffa2a947cfc4714d1ba2c", - "reference": "bbd37aedd8df749916cffa2a947cfc4714d1ba2c", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/4d6a39b7fff302cac0ce90cd959a53c2f6a32776", + "reference": "4d6a39b7fff302cac0ce90cd959a53c2f6a32776", "shasum": "" }, "require": { "php": "^7.4|^8.0", - "phpstan/phpstan": "^2.1.38" + "phpstan/phpstan": "^2.3.0" }, "conflict": { "rector/rector-doctrine": "*", @@ -8990,9 +9430,6 @@ "rector/rector-phpunit": "*", "rector/rector-symfony": "*" }, - "suggest": { - "ext-dom": "To manipulate phpunit.xml via the custom-rule command" - }, "bin": [ "bin/rector" ], @@ -9016,7 +9453,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/2.3.8" + "source": "https://github.com/rectorphp/rector/tree/2.7.0" }, "funding": [ { @@ -9024,7 +9461,7 @@ "type": "github" } ], - "time": "2026-02-22T09:45:50+00:00" + "time": "2026-10-06T08:46:45+00:00" }, { "name": "roave/security-advisories", @@ -9032,18 +9469,19 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "92c5ec5685cfbcd7ef721a502e6622516728011c" + "reference": "0f55fdd9f5b320c8f353190683bedb6380511db4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/92c5ec5685cfbcd7ef721a502e6622516728011c", - "reference": "92c5ec5685cfbcd7ef721a502e6622516728011c", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/0f55fdd9f5b320c8f353190683bedb6380511db4", + "reference": "0f55fdd9f5b320c8f353190683bedb6380511db4", "shasum": "" }, "conflict": { "3f/pygmentize": "<1.2", "adaptcms/adaptcms": "<=1.3", - "admidio/admidio": "<=4.3.16", + "adawolfa/isdoc": "<1.4.3|>=1.5,<1.5.1|>=1.6,<1.6.1", + "admidio/admidio": "<=5.0.11", "adodb/adodb-php": "<=5.22.9", "aheinze/cockpit": "<2.2", "aimeos/ai-admin-graphql": ">=2022.04.1,<2022.10.10|>=2023.04.1,<2023.10.6|>=2024.04.1,<2024.07.2", @@ -9054,12 +9492,14 @@ "aimeos/aimeos-core": ">=2022.04.1,<2022.10.17|>=2023.04.1,<2023.10.17|>=2024.04.1,<2024.04.7", "aimeos/aimeos-laravel": "==2021.10", "aimeos/aimeos-typo3": "<19.10.12|>=20,<20.10.5", + "aimeos/pagible": "<0.10.4", "airesvsg/acf-to-rest-api": "<=3.1", "akaunting/akaunting": "<2.1.13", "akeneo/pim-community-dev": "<5.0.119|>=6,<6.0.53", "alextselegidis/easyappointments": "<=1.5.2", "alexusmai/laravel-file-manager": "<=3.3.1", "algolia/algoliasearch-magento-2": "<=3.16.1|>=3.17.0.0-beta1,<=3.17.1", + "almirhodzic/nova-toggle-5": "<1.3", "alt-design/alt-redirect": "<1.6.4", "altcha-org/altcha": "<1.3.1", "alterphp/easyadmin-extension-bundle": ">=1.2,<1.2.11|>=1.3,<1.3.1", @@ -9073,11 +9513,15 @@ "andreapollastri/cipi": "<=3.1.15", "andrewhaine/silverstripe-form-capture": ">=0.2,<=0.2.3|>=1,<1.0.2|>=2,<2.2.5", "aoe/restler": "<1.7.1", - "apache-solr-for-typo3/solr": "<2.8.3", + "apache-solr-for-typo3/solr": "<11.2.8|>=11.5,<11.6.6|>=12,<12.1.4|>=13,<13.1.4", + "apache/thrift": "<0.24", "apereo/phpcas": "<1.6", - "api-platform/core": "<3.4.17|>=4,<4.0.22|>=4.1,<4.1.5", + "api-platform/core": "<4.1.30|>=4.2,<4.2.26|>=4.3,<4.3.12", "api-platform/graphql": "<3.4.17|>=4,<4.0.22|>=4.1,<4.1.5", + "api-platform/hal": ">=4,<4.1.29|>=4.2,<4.2.25|>=4.3,<4.3.8", + "api-platform/json-api": ">=4,<4.1.29|>=4.2,<4.2.25|>=4.3,<4.3.8", "appwrite/server-ce": "<=1.2.1", + "aptoma/twig-markdown": "<=3.4.1", "arc/web": "<3", "area17/twill": "<1.2.5|>=2,<2.5.3", "artesaos/seotools": "<0.17.2", @@ -9085,28 +9529,30 @@ "athlon1600/php-proxy": "<=5.1", "athlon1600/php-proxy-app": "<=3", "athlon1600/youtube-downloader": "<=4", + "aureuserp/aureuserp": "<1.3.0.0-beta1", "austintoddj/canvas": "<=3.4.2", - "auth0/auth0-php": ">=3.3,<8.18", - "auth0/login": "<7.20", - "auth0/symfony": "<=5.5", - "auth0/wordpress": "<=5.4", - "automad/automad": "<2.0.0.0-alpha5", + "auth0/auth0-php": ">=3.3,<=8.18", + "auth0/login": "<=7.20", + "auth0/symfony": "<=5.8", + "auth0/wordpress": "<=5.5", + "automad/automad": "<=2.0.0.0-beta27", "automattic/jetpack": "<9.8", "awesome-support/awesome-support": "<=6.0.7", - "aws/aws-sdk-php": "<3.368", - "azuracast/azuracast": "<=0.23.1", + "aws/aws-sdk-php": "<=3.371.3", + "ayacoo/redirect-tab": "<2.1.2|>=3,<3.1.7|>=4,<4.0.5", + "azuracast/azuracast": "<=0.23.5", "b13/seo_basics": "<0.8.2", "backdrop/backdrop": "<=1.32", - "backpack/crud": "<3.4.9", + "backpack/crud": "<6.8.15|>=7,<7.0.47", "backpack/filemanager": "<2.0.2|>=3,<3.0.9", "bacula-web/bacula-web": "<9.7.1", "badaso/core": "<=2.9.11", - "bagisto/bagisto": "<2.3.10", + "bagisto/bagisto": "<=2.3.15", "barrelstrength/sprout-base-email": "<1.2.7", "barrelstrength/sprout-forms": "<3.9", "barryvdh/laravel-translation-manager": "<0.6.8", "barzahlen/barzahlen-php": "<2.0.1", - "baserproject/basercms": "<=5.1.1", + "baserproject/basercms": "<=5.2.2", "bassjobsen/bootstrap-3-typeahead": ">4.0.2", "bbpress/bbpress": "<2.6.5", "bcit-ci/codeigniter": "<3.1.3", @@ -9114,6 +9560,7 @@ "bedita/bedita": "<4", "bednee/cooluri": "<1.0.30", "bigfork/silverstripe-form-capture": ">=3,<3.1.1", + "billabear/billabear": "<=2025.01.03", "billz/raspap-webgui": "<3.3.6", "binarytorch/larecipe": "<2.8.1", "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", @@ -9128,62 +9575,72 @@ "brotkrueml/codehighlight": "<2.7", "brotkrueml/schema": "<1.13.1|>=2,<2.5.1", "brotkrueml/typo3-matomo-integration": "<1.3.2", - "buddypress/buddypress": "<7.2.1", + "buddypress/buddypress": "<14.5", "bugsnag/bugsnag-laravel": ">=2,<2.0.2", "bvbmedia/multishop": "<2.0.39", "bytefury/crater": "<6.0.2", "cachethq/cachet": "<2.5.1", "cadmium-org/cadmium-cms": "<=0.4.9", - "cakephp/cakephp": "<3.10.3|>=4,<4.0.10|>=4.1,<4.1.4|>=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10|>=5.2.10,<5.2.12|==5.3", - "cakephp/database": ">=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10", + "cakephp/authentication": "<2.11.1|>=3,<3.3.6|>=4,<4.1.1", + "cakephp/cakephp": "<4.5.12|>=4.6,<4.6.5|>=5,<5.1.10|>=5.2,<5.2.15|>=5.3,<5.3.7", + "cakephp/database": ">=3,<4.5.12|>=4.6,<4.6.5|>=5,<5.1.10|>=5.2,<5.2.15|>=5.3,<5.3.7", + "cakephp/debug_kit": "<4.10.3|>=5,<5.2.4", + "cakephp/queue": ">=0.1.10,<2.3.1", "cardgate/magento2": "<2.0.33", "cardgate/woocommerce": "<=3.1.15", - "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", - "cart2quote/module-quotation-encoded": ">=4.1.6,<=4.4.5|>=5,<5.4.4", - "cartalyst/sentry": "<=2.1.6", + "cart2quote/module-quotation": ">=4.1.6,<4.4.6|>=5,<5.4.4", + "cartalyst/sentry": "<2.1.7", "catfan/medoo": "<1.7.5", "causal/oidc": "<4", "cecil/cecil": "<7.47.1", "centreon/centreon": "<22.10.15", "cesargb/laravel-magiclink": ">=2,<2.25.1", "cesnet/simplesamlphp-module-proxystatistics": "<3.1", + "chamilo/chamilo-lms": "<=2", "chriskacerguis/codeigniter-restserver": "<=2.7.1", "chrome-php/chrome": "<1.14", - "ci4-cms-erp/ci4ms": "<0.28.5", + "ci4-cms-erp/ci4ms": "<=0.31.8", "civicrm/civicrm-core": ">=4.2,<4.2.9|>=4.3,<4.3.3", "ckeditor/ckeditor": "<4.25", "clickstorm/cs-seo": ">=6,<6.8|>=7,<7.5|>=8,<8.4|>=9,<9.3", "co-stack/fal_sftp": "<0.2.6", - "cockpit-hq/cockpit": "<2.11.4", - "code16/sharp": "<9.11.1", + "cockpit-hq/cockpit": "<=2.14", + "code16/sharp": "<9.22.5", "codeception/codeception": "<3.1.3|>=4,<4.1.22", "codeigniter/framework": "<3.1.10", - "codeigniter4/framework": "<4.6.2", + "codeigniter4/framework": "<4.7.4", "codeigniter4/shield": "<1.0.0.0-beta8", "codiad/codiad": "<=2.8.4", "codingms/additional-tca": ">=1.7,<1.15.17|>=1.16,<1.16.9", - "codingms/modules": "<4.3.11|>=5,<5.7.4|>=6,<6.4.2|>=7,<7.5.5", + "codingms/modules": "<7.10.4|>=8,<8.1.4", "commerceteam/commerce": ">=0.9.6,<0.9.9", "components/jquery": ">=1.0.3,<3.5", - "composer/composer": "<1.10.27|>=2,<2.2.26|>=2.3,<2.9.3", - "concrete5/concrete5": "<9.4.3", + "composer/composer": "<2.2.30|>=2.3,<2.10.3", + "concrete5/concrete5": "<9.5.2", "concrete5/core": "<8.5.8|>=9,<9.1", + "contao-components/colorbox": ">=1,<1.6.4.3-dev", "contao-components/mediaelement": ">=2.14.2,<2.21.1", - "contao/comments-bundle": ">=2,<4.13.40|>=5.0.0.0-RC1-dev,<5.3.4", - "contao/contao": ">=3,<3.5.37|>=4,<4.4.56|>=4.5,<4.13.56|>=5,<5.3.38|>=5.4.0.0-RC1-dev,<5.6.1", + "contao/comments-bundle": ">=2,<5.3.50|>=5.4,<5.7.12", + "contao/contao": ">=3,<3.5.37|>=4,<5.3.50|>=5.4,<5.7.12", "contao/core": "<3.5.39", - "contao/core-bundle": "<4.13.57|>=5,<5.3.42|>=5.4,<5.6.5", + "contao/core-bundle": "<5.3.50|>=5.4,<5.7.12", "contao/listing-bundle": ">=3,<=3.5.30|>=4,<4.4.8", "contao/managed-edition": "<=1.5", - "coreshop/core-shop": "<4.1.9", + "contao/newsletter-bundle": ">=5,<5.3.50|>=5.4,<5.7.12", + "coreshop/core-shop": "<4.1.9|==5", "corveda/phpsandbox": "<1.3.5", "cosenary/instagram": "<=2.3", + "cotonti/cotonti": "<=1", "couleurcitron/tarteaucitron-wp": "<0.3", - "cpsit/typo3-mailqueue": "<0.4.3|>=0.5,<0.5.1", - "craftcms/cms": "<4.17.0.0-beta1|>=5,<5.9.0.0-beta1", - "craftcms/commerce": ">=4.0.0.0-RC1-dev,<=4.10|>=5,<=5.5.1", + "cpsit/typo3-mailqueue": "<0.4.5|>=0.5,<0.5.2", + "craftcms/aws-s3": ">=2.0.2,<=2.2.4", + "craftcms/azure-blob": ">=2.0.0.0-beta1,<=2.1", + "craftcms/cms": "<4.18.3|>=5,<5.10.8", + "craftcms/commerce": ">=4,<=4.11.1|>=5,<=5.6.4", "craftcms/composer": ">=4.0.0.0-RC1-dev,<=4.10|>=5.0.0.0-RC1-dev,<=5.5.1", "craftcms/craft": ">=3.5,<=4.16.17|>=5.0.0.0-RC1-dev,<=5.8.21", + "craftcms/google-cloud": ">=2.0.0.0-beta1,<=2.2", + "craftcms/webhooks": ">=3,<3.2", "croogo/croogo": "<=4.0.7", "cuyz/valinor": "<0.12", "czim/file-handling": "<1.5|>=2,<2.3", @@ -9197,11 +9654,12 @@ "david-garcia/phpwhois": "<=4.3.1", "dbrisinajumi/d2files": "<1", "dcat/laravel-admin": "<=2.1.3|==2.2.0.0-beta|==2.2.2.0-beta", + "dedoc/scramble": ">=0.13.2,<0.13.22", "derhansen/fe_change_pwd": "<2.0.5|>=3,<3.0.3", - "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1|>=7,<7.4", + "derhansen/sf_event_mgt": "<5.9.3|>=6,<6.7.2|>=7,<7.9.3|>=8,<8.6.2|>=9,<9.0.3", "desperado/xml-bundle": "<=0.1.7", "dev-lancer/minecraft-motd-parser": "<=1.0.5", - "devcode-it/openstamanager": "<=2.9.8", + "devcode-it/openstamanager": "<=2.10.1", "devgroup/dotplant": "<2020.09.14-dev", "digimix/wp-svg-upload": "<=1", "directmailteam/direct-mail": "<6.0.3|>=7,<7.0.3|>=8,<9.5.2", @@ -9218,9 +9676,12 @@ "doctrine/mongodb-odm": "<1.0.2", "doctrine/mongodb-odm-bundle": "<3.0.1", "doctrine/orm": ">=1,<1.2.4|>=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", - "dolibarr/dolibarr": "<21.0.3", - "dompdf/dompdf": "<2.0.4", + "dolibarr/dolibarr": "<=23.0.2", + "dompdf/dompdf": "<3.1.6", "doublethreedigital/guest-entries": "<3.1.2", + "dreamfactory/df-core": "<1.0.4", + "drupal-pattern-lab/add-attributes-twig-extension": "<=1.0.1", + "drupal-pattern-lab/bem-twig-extension": "<=1.0.1", "drupal-pattern-lab/unified-twig-extensions": "<=0.1", "drupal/access_code": "<2.0.5", "drupal/acquia_dam": "<1.1.5", @@ -9232,7 +9693,7 @@ "drupal/commerce_alphabank_redirect": "<1.0.3", "drupal/commerce_eurobank_redirect": "<2.1.1", "drupal/config_split": "<1.10|>=2,<2.0.2", - "drupal/core": ">=6,<6.38|>=7,<7.103|>=8,<10.4.9|>=10.5,<10.5.6|>=11,<11.1.9|>=11.2,<11.2.8", + "drupal/core": ">=6,<6.38|>=7,<7.103|>=8,<10.5.10|>=10.6,<10.6.9|>=11,<11.2.12|>=11.3,<11.3.10", "drupal/core-recommended": ">=7,<7.102|>=8,<10.2.11|>=10.3,<10.3.9|>=11,<11.0.8", "drupal/currency": "<3.5", "drupal/drupal": ">=5,<5.11|>=6,<6.38|>=7,<7.102|>=8,<10.2.11|>=10.3,<10.3.9|>=11,<11.0.8", @@ -9259,10 +9720,11 @@ "drupal/umami_analytics": "<1.0.1", "duncanmcclean/guest-entries": "<3.1.2", "dweeves/magmi": "<=0.7.24", - "ec-cube/ec-cube": "<2.4.4|>=2.11,<=2.17.1|>=3,<=3.0.18.0-patch4|>=4,<=4.1.2", + "easycorp/easyadmin-bundle": ">=4,<4.29.16|>=5,<5.5.1", + "ec-cube/ec-cube": "<2.4.4|>=2.11,<=2.17.1|>=3,<=3.0.18.0-patch4|>=4,<=4.3.1", "ecodev/newsletter": "<=4", "ectouch/ectouch": "<=2.7.2", - "egroupware/egroupware": "<23.1.20260113|>=26.0.20251208,<26.0.20260113", + "egroupware/egroupware": "<23.1.20260601|>=26.0.20251208,<26.5.20260507", "elefant/cms": "<2.0.7", "elgg/elgg": "<3.3.24|>=4,<4.0.5", "elijaa/phpmemcacheadmin": "<=1.3", @@ -9270,10 +9732,11 @@ "encore/laravel-admin": "<=1.8.19", "endroid/qr-code-bundle": "<3.4.2", "enhavo/enhavo-app": "<=0.13.1", - "enshrined/svg-sanitize": "<0.22", + "enshrined/svg-sanitize": "<=0.22", "erusev/parsedown": "<1.7.2", "ether/logs": "<3.0.4", "evolutioncms/evolution": "<=3.2.3", + "evoweb/sf-register": "<13.2.4|>=14,<14.0.2", "exceedone/exment": "<4.4.3|>=5,<5.0.3", "exceedone/laravel-admin": "<2.2.3|==3", "ezsystems/demobundle": ">=5.4,<5.4.6.1-dev", @@ -9296,15 +9759,16 @@ "ezsystems/repository-forms": ">=2.3,<2.3.2.1-dev|>=2.5,<2.5.15", "ezyang/htmlpurifier": "<=4.2", "facade/ignition": "<1.16.15|>=2,<2.4.2|>=2.5,<2.5.2", - "facturascripts/facturascripts": "<2025.81", + "facturascripts/facturascripts": "<=2026.2", "fastly/magento2": "<1.2.26", "feehi/cms": "<=2.1.1", "feehi/feehicms": "<=2.1.1", "fenom/fenom": "<=2.12.1", - "filament/actions": ">=3.2,<3.2.123", - "filament/filament": ">=4,<4.3.1", - "filament/infolists": ">=3,<3.2.115", - "filament/tables": ">=3,<3.2.115", + "filament/actions": ">=3.2,<3.2.123|>=4,<=4.11.3|>=5,<=5.6.3", + "filament/filament": ">=3,<=3.3.51|>=4,<=4.13.2|>=5,<=5.8.2", + "filament/forms": ">=3,<=3.3.52", + "filament/infolists": ">=3,<3.2.115|>=4,<=4.11.4|>=5,<=5.6.4", + "filament/tables": ">=3,<=3.3.50|>=4,<=4.11.4|>=5,<=5.6.4", "filegator/filegator": "<7.8", "filp/whoops": "<2.1.13", "fineuploader/php-traditional-server": "<=1.2.2", @@ -9312,15 +9776,18 @@ "fisharebest/webtrees": "<=2.1.18", "fixpunkt/fp-masterquiz": "<2.2.1|>=3,<3.5.2", "fixpunkt/fp-newsletter": "<1.1.1|>=1.2,<2.1.2|>=2.2,<3.2.6", - "flarum/core": "<1.8.10", + "flarum/core": "<=1.8.15|>=2.0.0.0-beta1,<=2.0.0.0-beta8", "flarum/flarum": "<0.1.0.0-beta8", "flarum/framework": "<1.8.10", "flarum/mentions": "<1.6.3", + "flarum/nicknames": "<1.8.3", "flarum/sticky": ">=0.1.0.0-beta14,<=0.1.0.0-beta15", "flarum/tags": "<=0.1.0.0-beta13", + "flightphp/core": "<3.18.1", "floriangaerber/magnesium": "<0.3.1", "fluidtypo3/vhs": "<5.1.1", "fof/byobu": ">=0.3.0.0-beta2,<1.1.7", + "fof/oauth": "<1.7.4|>=2.0.0.0-beta1,<2.0.0.0-beta4", "fof/pretty-mail": "<=1.1.2", "fof/upload": "<1.2.3", "foodcoopshop/foodcoopshop": ">=3.2,<3.6.1", @@ -9328,7 +9795,7 @@ "forkcms/forkcms": "<5.11.1", "fossar/tcpdf-parser": "<6.2.22", "francoisjacquet/rosariosis": "<=11.5.1", - "frappant/frp-form-answers": "<3.1.2|>=4,<4.0.2", + "frappant/frp-form-answers": "<5.0.5|>=6,<6.1.3|>=7,<7.1.1", "friendsofsymfony/oauth2-php": "<1.3", "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", "friendsofsymfony/user-bundle": ">=1,<1.3.5", @@ -9336,19 +9803,22 @@ "friendsofsymfony1/symfony1": ">=1.1,<1.5.19", "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "friendsoftypo3/openid": ">=4.5,<4.5.31|>=4.7,<4.7.16|>=6,<6.0.11|>=6.1,<6.1.6", + "friendsoftypo3/tt-address": "<8.1.2|>=9,<9.1.1|>=10,<10.0.1", "froala/wysiwyg-editor": "<=4.3", "frosh/adminer-platform": "<2.2.1", - "froxlor/froxlor": "<=2.2.5", + "froxlor/froxlor": "<2.3.8", "frozennode/administrator": "<=5.0.12", "fuel/core": "<1.8.1", - "funadmin/funadmin": "<=5.0.2", + "funadmin/funadmin": "<=7.1.0.0-RC6", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", - "georgringer/news": "<1.3.3", + "georgringer/news": "<10.0.4|>=11,<11.4.4|>=12,<12.3.2|>=13,<13.0.2|>=14,<14.0.3", "geshi/geshi": "<=1.0.9.1", "getformwork/formwork": "<=2.3.3", - "getgrav/grav": "<1.11.0.0-beta1", - "getkirby/cms": "<3.9.8.3-dev|>=3.10,<3.10.1.2-dev|>=4,<4.7.1|>=5,<=5.2.1", + "getgrav/grav": "<=2.0.19", + "getgrav/grav-plugin-api": "<1.0.0.0-beta15", + "getgrav/grav-plugin-form": "<9.1", + "getkirby/cms": "<4.9.5|>=5,<5.5.2", "getkirby/kirby": "<3.9.8.3-dev|>=3.10,<3.10.1.2-dev|>=4,<4.7.1", "getkirby/panel": "<2.5.14", "getkirby/starterkit": "<=3.7.0.2", @@ -9357,16 +9827,18 @@ "globalpayments/php-sdk": "<2", "goalgorilla/open_social": "<12.3.11|>=12.4,<12.4.10|>=13.0.0.0-alpha1,<13.0.0.0-alpha11", "gogentooss/samlbase": "<1.2.7", - "google/protobuf": "<3.4", + "goodoneuz/pay-uz": "<=2.2.24", + "google/protobuf": "<4.33.6", "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", "gp247/core": "<1.1.24", "gree/jose": "<2.2.1", "gregwar/rst": "<1.0.3", - "grumpydictator/firefly-iii": "<6.1.17", + "grumpydictator/firefly-iii": "<=6.6.2", "gugoan/economizzer": "<=0.9.0.0-beta1", - "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5", + "guzzlehttp/guzzle": "<7.15.2|>=8,<8.0.1", + "guzzlehttp/guzzle-services": "<1.5.4", "guzzlehttp/oauth-subscriber": "<0.8.1", - "guzzlehttp/psr7": "<1.9.1|>=2,<2.4.5", + "guzzlehttp/psr7": "<2.12.3", "haffner/jh_captcha": "<=2.1.3|>=3,<=3.0.2", "handcraftedinthealps/goodby-csv": "<1.4.3", "harvesthq/chosen": "<1.8.7", @@ -9377,6 +9849,7 @@ "hjue/justwriting": "<=1", "hov/jobfair": "<1.0.13|>=2,<2.0.2", "httpsoft/http-message": "<1.0.12", + "hybridauth/hybridauth": "<=3.12.2", "hyn/multi-tenant": ">=5.6,<5.7.2", "ibexa/admin-ui": ">=4.2,<4.2.3|>=4.6,<4.6.25|>=5,<5.0.3", "ibexa/admin-ui-assets": ">=4.6.0.0-alpha1,<4.6.21", @@ -9388,35 +9861,44 @@ "ibexa/solr": ">=4.5,<4.5.4", "ibexa/user": ">=4,<4.4.3|>=5,<5.0.4", "icecoder/icecoder": "<=8.1", - "idno/known": "<=1.6.2", + "idno/known": "<1.6.4", "ilicmiljan/secure-props": ">=1.2,<1.2.2", "illuminate/auth": "<5.5.10", "illuminate/cookie": ">=4,<=4.0.11|>=4.1,<6.18.31|>=7,<7.22.4", "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40", "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", + "illuminate/mail": ">=9,<12.60|>=13,<13.10", "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", "imdbphp/imdbphp": "<=5.1.1", "impresscms/impresscms": "<=1.4.5", "impresspages/impresspages": "<1.0.13", - "in2code/femanager": "<6.4.2|>=7,<7.5.3|>=8,<8.3.1", + "in2code/femanager": "<6.4.5|>=7,<7.5.5|>=8,<8.4.2|>=13,<13.3.5", "in2code/ipandlanguageredirect": "<5.1.2", "in2code/lux": "<17.6.1|>=18,<24.0.2", - "in2code/powermail": "<7.5.1|>=8,<8.5.1|>=9,<10.9.1|>=11,<12.5.3|==13", + "in2code/powermail": "<10.9.3|>=11,<12.6.1|>=13,<13.2.1", "innologi/typo3-appointments": "<2.0.6", "intelliants/subrion": "<4.2.2", "inter-mediator/inter-mediator": "==5.5", - "ipl/web": "<0.10.1", + "intercom/intercom-php": "==5.0.2", + "invoiceninja/invoiceninja": "<5.13.4", + "ipl/web": "<=0.10.2|>=0.11,<=0.13", "islandora/crayfish": "<4.1", "islandora/islandora": ">=2,<2.4.1", "ivankristianto/phpwhois": "<=4.3", + "j0k3r/graby": "<=2.5", + "j0k3r/httplug-ssrf-plugin": "<=3.0.1", "jackalope/jackalope-doctrine-dbal": "<1.7.4", "jambagecom/div2007": "<0.10.2", "james-heinrich/getid3": "<1.9.21", "james-heinrich/phpthumb": "<=1.7.23", "jasig/phpcas": "<1.3.3", + "jayanta/laravel-threat-detection": "<1.9", "jbartels/wec-map": "<3.0.3", "jcbrand/converse.js": "<3.3.3", + "jleehr/canto-saas-api": "<=2", + "joedolson/my-calendar": "<3.7.7", "joelbutcher/socialstream": "<5.6|>=6,<6.2", + "johnbillion/query-monitor": "<3.20.4", "johnbillion/wp-crontrol": "<1.16.2|>=1.17,<1.19.2", "joomla/application": "<1.0.13", "joomla/archive": "<1.1.12|>=2,<2.0.1", @@ -9432,30 +9914,40 @@ "jsdecena/laracom": "<2.0.9", "jsmitty12/phpwhois": "<5.1", "juzaweb/cms": "<=3.4.2", - "jweiland/events2": "<8.3.8|>=9,<9.0.6", + "jweiland/clubdirectory": "<6.0.2|>=7,<7.0.2|>=8,<8.1.3", + "jweiland/events2": "<8.6.3|>=9,<9.4.2|>=10,<10.2.12", "jweiland/kk-downloader": "<1.2.2", + "jweiland/pforum": "<4.0.4|>=5,<5.0.1|>=6,<6.2.4", + "jweiland/telephonedirectory": "<4.1.1|>=5,<5.0.1|>=6,<6.2", + "jweiland/yellowpages2": "<6.1.6|>=7,<7.0.3|>=8,<8.1.2", + "kantorge/yaffa": "<=2", "kazist/phpwhois": "<=4.2.6", + "kelvinmo/simplejwt": "<=1.1", "kelvinmo/simplexrd": "<3.1.1", "kevinpapst/kimai2": "<1.16.7", - "khodakhah/nodcms": "<=3", - "kimai/kimai": "<2.46", + "khodakhah/nodcms": "<=3.4.1", + "kimai/kimai": "<2.59", "kitodo/presentation": "<3.2.3|>=3.3,<3.3.4", "klaviyo/magento2-extension": ">=1,<3", - "knplabs/knp-snappy": "<=1.4.2", + "knplabs/knp-snappy": "<=1.7", "kohana/core": "<3.3.3", - "koillection/koillection": "<1.6.12", - "krayin/laravel-crm": "<=1.3", + "koillection/koillection": "<1.8.4", + "krayin/laravel-crm": "<=2.2", "kreait/firebase-php": ">=3.2,<3.8.1", "kumbiaphp/kumbiapp": "<=1.1.1", + "kunstmaan/bundles-cms": "<7.3.2", + "kunstmaan/media-bundle": "<7.3.2", "la-haute-societe/tcpdf": "<6.2.22", + "laktak/hjson": "<2.3", "laminas/laminas-diactoros": "<2.18.1|==2.19|==2.20|==2.21|==2.22|==2.23|>=2.24,<2.24.2|>=2.25,<2.25.2", "laminas/laminas-form": "<2.17.1|>=3,<3.0.2|>=3.1,<3.1.1", "laminas/laminas-http": "<2.14.2", "lara-zeus/artemis": ">=1,<=1.0.6", "lara-zeus/dynamic-dashboard": ">=3,<=3.0.1", "laravel/fortify": "<1.11.1", - "laravel/framework": "<10.48.29|>=11,<11.44.1|>=12,<12.1.1", + "laravel/framework": "<12.69|>=13,<13.30", "laravel/laravel": ">=5.4,<5.4.22", + "laravel/passport": ">=13,<13.7.1", "laravel/pulse": "<1.3.1", "laravel/reverb": "<1.7", "laravel/socialite": ">=1,<2.0.10", @@ -9463,25 +9955,28 @@ "lavalite/cms": "<=10.1", "lavitto/typo3-form-to-database": "<2.2.5|>=3,<3.2.2|>=4,<4.2.3|>=5,<5.0.2", "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5", - "league/commonmark": "<2.7", - "league/flysystem": "<1.1.4|>=2,<2.1.1", + "league/commonmark": "<=2.10.1", + "league/flysystem": "<=3.35.2", "league/oauth2-server": ">=8.3.2,<8.4.2|>=8.5,<8.5.3", - "leantime/leantime": "<3.3", + "leantime/leantime": "<3.10", "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", "libreform/libreform": ">=2,<=2.0.8", - "librenms/librenms": "<26.2", + "librenms/librenms": "<26.7", "liftkit/database": "<2.13.2", "lightsaml/lightsaml": "<1.3.5", - "limesurvey/limesurvey": "<6.5.12", + "limesurvey/limesurvey": "<=7.0.0.0-beta1", + "litesaml/lightsaml": ">=6,<6.0.1", "livehelperchat/livehelperchat": "<=3.91", "livewire-filemanager/filemanager": "<=1.0.4", - "livewire/livewire": "<2.12.7|>=3.0.0.0-beta1,<3.6.4", + "livewire/livewire": "<2.12.7|>=3.0.0.0-beta1,<=3.8.2|>=4.0.0.0-beta1,<=4.3.3", "livewire/volt": "<1.7", "lms/routes": "<2.1.1", "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", + "lochmueller/html5videoplayer-powermail": "<=0.2.1", "lomkit/laravel-rest-api": "<2.13", "luracast/restler": "<3.1", "luyadev/yii-helpers": "<1.2.1", + "maatwebsite/excel": ">=3.1.8,<3.1.70", "macropay-solutions/laravel-crud-wizard-free": "<3.4.17", "maestroerror/php-heic-to-jpg": "<1.0.5", "magento/community-edition": "<2.4.6.0-patch13|>=2.4.7.0-beta1,<2.4.7.0-patch8|>=2.4.8.0-beta1,<2.4.8.0-patch3|>=2.4.9.0-alpha1,<2.4.9.0-alpha3|==2.4.9", @@ -9495,22 +9990,27 @@ "maikuolan/phpmussel": ">=1,<1.6", "mainwp/mainwp": "<=4.4.3.3", "manogi/nova-tiptap": "<=3.2.6", - "mantisbt/mantisbt": "<2.27.2", + "mantisbt/mantisbt": "<=2.28.3", "marcwillmann/turn": "<0.3.3", + "markhuot/craftql": "<=1.3.7", "marshmallow/nova-tiptap": "<5.7", + "mask/mask": "<8.3.12|>=9,<9.0.11", "matomo/matomo": "<1.11", "matyhtf/framework": "<3.0.6", - "mautic/core": "<5.2.9|>=6,<6.0.7", + "mautic/core": "<5.2.11|>=6,<6.0.9|>=7,<7.1.2", "mautic/core-lib": ">=1.0.0.0-beta,<4.4.13|>=5.0.0.0-alpha,<5.1.1", "mautic/grapes-js-builder-bundle": ">=4,<4.4.18|>=5,<5.2.9|>=6,<6.0.7", "maximebf/debugbar": "<1.19", + "mckenziearts/livewire-markdown-editor": "<1.3", + "mcp/sdk": ">=0.5,<0.7.1", "mdanter/ecc": "<2", "mediawiki/abuse-filter": "<1.39.9|>=1.40,<1.41.3|>=1.42,<1.42.2", "mediawiki/cargo": "<3.8.3", "mediawiki/core": "<1.39.5|==1.40", "mediawiki/data-transfer": ">=1.39,<1.39.11|>=1.41,<1.41.3|>=1.42,<1.42.2", + "mediawiki/maps": "<12.1.3", "mediawiki/matomo": "<2.4.3", - "mediawiki/semantic-media-wiki": "<4.0.2", + "mediawiki/semantic-media-wiki": "<=7.2.1", "mehrwert/phpmyadmin": "<3.2", "melisplatform/melis-asset-manager": "<5.0.1", "melisplatform/melis-cms": "<5.3.4", @@ -9522,23 +10022,27 @@ "microsoft/microsoft-graph": ">=1.16,<1.109.1|>=2,<2.0.1", "microsoft/microsoft-graph-beta": "<2.0.1", "microsoft/microsoft-graph-core": "<2.0.2", - "microweber/microweber": "<2.0.20", + "microweber/microweber": "<=2.0.20", "mikehaertl/php-shellcommand": "<1.6.1", - "mineadmin/mineadmin": "<=3.0.9", + "mineadmin/mineadmin": "<3.2.0.0-alpha2", "miniorange/miniorange-saml": "<1.4.3", + "miraheze/ts-portal": "<=33", "mittwald/typo3_forum": "<1.2.1", + "mix/mix": ">=2,<=2.2.17", + "mmc/ceselector": "<3.0.3|>=4,<4.0.2|>=5,<5.0.1|>=6,<6.0.1", "mobiledetect/mobiledetectlib": "<2.8.32", "modx/revolution": "<=3.1", "mojo42/jirafeau": "<4.4", - "mongodb/mongodb": ">=1,<1.9.2", + "mongodb/mongodb": "<1.21.5|>=2,<2.4.2", "mongodb/mongodb-extension": "<1.21.2", "monolog/monolog": ">=1.8,<1.12", - "moodle/moodle": "<4.4.12|>=4.5.0.0-beta,<4.5.8|>=5.0.0.0-beta,<5.0.4|>=5.1.0.0-beta,<5.1.1", + "moodle/moodle": "<4.5.9|>=5.0.0.0-beta,<5.0.5|>=5.1.0.0-beta,<5.1.2", "moonshine/moonshine": "<=3.12.5", "mos/cimage": "<0.7.19", "movim/moxl": ">=0.8,<=0.10", "movingbytes/social-network": "<=1.2.1", "mpdf/mpdf": "<=7.1.7", + "mtdowling/jmespath.php": "<2.9.1", "munkireport/comment": "<4", "munkireport/managedinstalls": "<2.6", "munkireport/munki_facts": "<1.5", @@ -9546,6 +10050,7 @@ "munkireport/softwareupdate": "<1.6", "mustache/mustache": ">=2,<2.14.1", "mwdelaney/wp-enable-svg": "<=0.2", + "nabeel/phpvms": "<7.0.6", "namshi/jose": "<2.2", "nasirkhan/laravel-starter": "<11.11", "nategood/httpful": "<1", @@ -9565,20 +10070,20 @@ "nilsteampassnet/teampass": "<3.1.3.1-dev", "nitsan/ns-backup": "<13.0.1", "nonfiction/nterchange": "<4.1.1", - "notrinos/notrinos-erp": "<=0.7", + "notrinos/notrinos-erp": "<=1", "noumo/easyii": "<=0.9", "novaksolutions/infusionsoft-php-sdk": "<1", "novosga/novosga": "<=2.2.12", - "nukeviet/nukeviet": "<4.5.02", + "nukeviet/nukeviet": "<4.6.00", "nyholm/psr7": "<1.6.1", "nystudio107/craft-seomatic": "<3.4.12", "nzedb/nzedb": "<0.8", "nzo/url-encryptor-bundle": ">=4,<4.3.2|>=5,<5.0.1", "october/backend": "<1.1.2", "october/cms": "<1.0.469|==1.0.469|==1.0.471|==1.1.1", - "october/october": "<3.7.5", - "october/rain": "<1.0.472|>=1.1,<1.1.2", - "october/system": "<=3.7.12|>=4,<=4.0.11", + "october/october": "<3.7.14|>=4,<4.1.10|>=4.3,<4.3.4", + "october/rain": "<=3.7.13|>=4,<=4.1.9", + "october/system": "<3.7.17|>=4,<4.2.23", "oliverklee/phpunit": "<3.5.15", "omeka/omeka-s": "<4.0.3", "onelogin/php-saml": "<2.21.1|>=3,<3.8.1|>=4,<4.3.1", @@ -9586,9 +10091,9 @@ "open-web-analytics/open-web-analytics": "<1.8.1", "opencart/opencart": ">=0", "openid/php-openid": "<2.3", - "openmage/magento-lts": "<20.16.1", + "openmage/magento-lts": "<=20.17", "opensolutions/vimbadmin": "<=3.0.15", - "opensource-workshop/connect-cms": "<1.8.7|>=2,<2.4.7", + "opensource-workshop/connect-cms": "<1.41.1|>=2,<2.41.1", "orchid/platform": ">=8,<14.43", "oro/calendar-bundle": ">=4.2,<=4.2.6|>=5,<=5.0.6|>=5.1,<5.1.1", "oro/commerce": ">=4.1,<5.0.11|>=5.1,<5.1.1", @@ -9597,16 +10102,20 @@ "oro/customer-portal": ">=4.1,<=4.1.13|>=4.2,<=4.2.10|>=5,<=5.0.11|>=5.1,<=5.1.3", "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<=4.2.10|>=5,<=5.0.12|>=5.1,<=5.1.3", "oveleon/contao-cookiebar": "<1.16.3|>=2,<2.1.3", - "oxid-esales/oxideshop-ce": "<=7.0.5", + "oxid-esales/oxideshop-ce": "<4.5|>=6,<6.14.4", + "oxid-esales/oxideshop-metapackage-ce": ">=6,<6.5.5", "oxid-esales/paymorrow-module": ">=1,<1.0.2|>=2,<2.0.1", + "oxid-esales/smarty-component": "<1.0.1", "packbackbooks/lti-1-3-php-library": "<5", "padraic/humbug_get_contents": "<1.1.2", "pagarme/pagarme-php": "<3", "pagekit/pagekit": "<=1.0.18", "paragonie/ecc": "<2.0.1", "paragonie/random_compat": "<2", - "paragonie/sodium_compat": "<1.24|>=2,<2.5", + "paragonie/sodium_compat": "<1.24.1|>=2,<2.5.1", "passbolt/passbolt_api": "<4.6.2", + "pattern-lab/drupal-twig-components": "<=2.2", + "paymenter/paymenter": "<=1.5.6", "paypal/adaptivepayments-sdk-php": "<=3.9.2", "paypal/invoice-sdk-php": "<=3.9", "paypal/merchant-sdk-php": "<3.12", @@ -9619,70 +10128,81 @@ "pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1", "personnummer/personnummer": "<3.0.2", "ph7software/ph7builder": "<=17.9.1", - "phanan/koel": "<5.1.4", + "phalcon/cphalcon": "<=5.15", + "phanan/koel": "<=9.7", + "pheditor/pheditor": "<2.0.8", "phenx/php-svg-lib": "<0.5.2", "php-censor/php-censor": "<2.0.13|>=2.1,<2.1.5", "php-mod/curl": "<2.3.2", - "phpbb/phpbb": "<3.3.11", + "php-standard-library/h2": ">=6.1,<6.1.2|>=6.2,<6.2.1", + "php-standard-library/php-standard-library": ">=6.1,<6.1.2|>=6.2,<6.2.1", + "phpbb/phpbb": "<3.3.16|==4.0.0.0-alpha1", + "phpcsstandards/phpcsutils": ">=1.0.0.0-alpha1,<1.2.3", "phpems/phpems": ">=6,<=6.1.3", "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", "phpmailer/phpmailer": "<6.5", "phpmussel/phpmussel": ">=1,<1.6", "phpmyadmin/phpmyadmin": "<5.2.2", - "phpmyfaq/phpmyfaq": "<=4.0.16", + "phpmyfaq/phpmyfaq": "<4.2.0.0-alpha", "phpoffice/common": "<0.2.9", "phpoffice/math": "<=0.2", "phpoffice/phpexcel": "<=1.8.2", - "phpoffice/phpspreadsheet": "<1.30|>=2,<2.1.12|>=2.2,<2.4|>=3,<3.10|>=4,<5", + "phpoffice/phpspreadsheet": "<=1.30.5|>=2,<=2.1.17|>=2.2,<=2.4.6|>=3,<=3.10.6|>=4,<=5.8", "phppgadmin/phppgadmin": "<=7.13", - "phpseclib/phpseclib": "<2.0.47|>=3,<3.0.36", + "phpseclib/phpseclib": "<3.0.57|>=4,<4.0.1", "phpservermon/phpservermon": "<3.6", - "phpsysinfo/phpsysinfo": "<3.4.3", - "phpunit/phpunit": "<8.5.52|>=9,<9.6.33|>=10,<10.5.62|>=11,<11.5.50|>=12,<12.5.8", + "phpsysinfo/phpsysinfo": "<=3.4.5", + "phpunit/phpunit": "<8.5.52|>=9,<9.6.33|>=10,<10.5.62|>=11,<11.5.50|>=12,<12.5.8|>=12.5.21,<12.5.22|>=13.1.5,<13.1.6", "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", "phpxmlrpc/phpxmlrpc": "<4.9.2", "phraseanet/phraseanet": "==4.0.3", "pi/pi": "<=2.5", - "pimcore/admin-ui-classic-bundle": "<=1.7.15|>=2.0.0.0-RC1-dev,<=2.2.2", + "pimcore/admin-ui-classic-bundle": "<1.7.18|>=2.0.0.0-RC1-dev,<=2.3.5", "pimcore/customer-management-framework-bundle": "<4.2.1", "pimcore/data-hub": "<1.2.4", "pimcore/data-importer": "<1.8.9|>=1.9,<1.9.3", "pimcore/demo": "<10.3", "pimcore/ecommerce-framework-bundle": "<1.0.10", "pimcore/perspective-editor": "<1.5.1", - "pimcore/pimcore": "<=11.5.13|>=12.0.0.0-RC1-dev,<12.3.1", + "pimcore/pimcore": "<=12.3.9|>=2026.1,<=2026.1.5", + "pimcore/studio-backend-bundle": "<2025.4.6|>=2026.1,<2026.1.6", "pimcore/web2print-tools-bundle": "<=5.2.1|>=6.0.0.0-RC1-dev,<=6.1", "piwik/piwik": "<1.11", "pixelfed/pixelfed": "<0.12.5", + "plank/laravel-mediable": "<7", "plotly/plotly.js": "<2.25.2", "pocketmine/bedrock-protocol": "<8.0.2", - "pocketmine/pocketmine-mp": "<5.32.1", + "pocketmine/pocketmine-mp": "<5.42.1", "pocketmine/raklib": ">=0.14,<0.14.6|>=0.15,<0.15.1", + "pontedilana/php-weasyprint": "<=2.5.1", + "poweradmin/poweradmin": "<4.2.5|>=4.3,<4.3.4", + "predis/predis": ">=3.0.0.0-RC1-dev,<3.3", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", "prestashop/blockreassurance": "<=5.1.3", "prestashop/blockwishlist": ">=2,<2.1.1", "prestashop/contactform": ">=1.0.1,<4.3", "prestashop/gamification": "<2.3.2", - "prestashop/prestashop": "<8.2.4|>=9.0.0.0-alpha1,<9.0.3", + "prestashop/prestashop": "<8.2.6|>=9,<9.1.1", "prestashop/productcomments": "<5.0.2", - "prestashop/ps_checkout": "<4.4.1|>=5,<5.0.5", + "prestashop/ps_checkout": "<5.3", "prestashop/ps_contactinfo": "<=3.3.2", "prestashop/ps_emailsubscription": "<2.6.1", - "prestashop/ps_facetedsearch": "<3.4.1", + "prestashop/ps_facetedsearch": "<4.0.4", "prestashop/ps_linklist": "<3.1", - "privatebin/privatebin": "<1.4|>=1.5,<1.7.4|>=1.7.7,<2.0.3", - "processwire/processwire": "<=3.0.246", - "propel/propel": ">=2.0.0.0-alpha1,<=2.0.0.0-alpha7", - "propel/propel1": ">=1,<=1.7.1", + "privatebin/privatebin": "<=2.0.4", + "processwire/processwire": "<=3.0.255", + "propel/propel": ">=2.0.0.0-alpha1,<2.0.0.0-alpha8", + "propel/propel1": ">=1,<1.7.2", "psy/psysh": "<=0.11.22|>=0.12,<=0.12.18", - "pterodactyl/panel": "<1.12.1", + "pterodactyl/panel": "<=1.12.4", "ptheofan/yii2-statemachine": ">=2.0.0.0-RC1-dev,<=2", "ptrofimov/beanstalk_console": "<1.7.14", "pubnub/pubnub": "<6.1", "punktde/pt_extbase": "<1.5.1", "pusher/pusher-php-server": "<2.2.1", + "putyourlightson/craft-sprig": ">=2,<2.15.2|>=3,<3.7.2", "pwweb/laravel-core": "<=0.3.6.0-beta", "pxlrbt/filament-excel": "<1.1.14|>=2.0.0.0-alpha,<2.3.3", "pyrocms/pyrocms": "<=3.9.1", @@ -9691,47 +10211,55 @@ "rainlab/blog-plugin": "<1.4.1", "rainlab/debugbar-plugin": "<3.1", "rainlab/user-plugin": "<=1.4.5", + "ralffreit/mfa-email": "<1.0.7|==2", "rankmath/seo-by-rank-math": "<=1.0.95", "rap2hpoutre/laravel-log-viewer": "<0.13", - "react/http": ">=0.7,<1.9", + "react/http": ">=0.6,<1.11.1", "really-simple-plugins/complianz-gdpr": "<6.4.2", - "redaxo/source": "<=5.20.1", + "redaxo/source": "<=5.21.1", "remdex/livehelperchat": "<4.29", "renolit/reint-downloadmanager": "<4.0.2|>=5,<5.0.1", "reportico-web/reportico": "<=8.1", - "rhukster/dom-sanitizer": "<1.0.7", + "rhukster/dom-sanitizer": "<1.0.10", "rmccue/requests": ">=1.6,<1.8", - "robrichards/xmlseclibs": "<=3.1.3", + "roadiz/documents": "<2.3.42|>=2.4,<2.5.44|>=2.6,<2.6.28|>=2.7,<2.7.9", + "roadiz/openid": "<2.3.43|>=2.5,<2.5.45|>=2.6,<2.6.31|>=2.7,<2.7.18", + "robrichards/xmlseclibs": "<3.1.5", "roots/soil": "<4.1", - "roundcube/roundcubemail": "<1.5.10|>=1.6,<1.6.11", + "roundcube/roundcubemail": "<1.5.10|>=1.6,<1.6.11|>=1.7.0.0-beta,<1.7.0.0-RC5-dev", "rudloff/alltube": "<3.0.3", "rudloff/rtmpdump-bin": "<=2.3.1", "s-cart/core": "<=9.0.5", "s-cart/s-cart": "<6.9", + "s9y/serendipity": "<2.6", "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", "sabre/dav": ">=1.6,<1.7.11|>=1.8,<1.8.9", + "saloonphp/saloon": "<4", "samwilson/unlinked-wikibase": "<1.42", "scheb/two-factor-bundle": "<3.26|>=4,<4.11", "sensiolabs/connect": "<4.2.3", "serluck/phpwhois": "<=4.2.6", - "setasign/fpdi": "<2.6.4", + "setasign/fpdi": "<2.6.7", "sfroemken/url_redirect": "<=1.2.1", "sheng/yiicms": "<1.2.1", - "shopware/core": "<6.6.10.9-dev|>=6.7,<6.7.6.1-dev", - "shopware/platform": "<6.6.10.7-dev|>=6.7,<6.7.3.1-dev", + "shlinkio/shlink": "<=5.0.1", + "shopper/cart": "<2.8", + "shopper/framework": "<2.9.2", + "shopware/core": "<6.6.10.18-dev|>=6.7,<6.7.10.1-dev", + "shopware/platform": "<6.6.10.18-dev|>=6.7,<6.7.10.1-dev", "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<=5.7.17|>=6.4.6,<6.6.10.10-dev|>=6.7,<6.7.6.1-dev", + "shopware/shopware": "<=6.3.5.2|>=6.4.6,<6.6.10.10-dev|>=6.7,<6.7.6.1-dev", "shopware/storefront": "<6.6.10.10-dev|>=6.7,<6.7.5.1-dev", "shopxo/shopxo": "<=6.4", - "showdoc/showdoc": "<2.10.4", + "showdoc/showdoc": "<3.8.1", "shuchkin/simplexlsx": ">=1.0.12,<1.1.13", "silverstripe-australia/advancedreports": ">=1,<=2", "silverstripe/admin": "<1.13.19|>=2,<2.1.8", - "silverstripe/assets": ">=1,<1.11.1", - "silverstripe/cms": "<4.11.3", + "silverstripe/assets": "<2.4.5|>=3,<3.1.3", + "silverstripe/cms": "<6.2.1", "silverstripe/comments": ">=1.3,<3.1.1", - "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", - "silverstripe/framework": "<5.3.23", + "silverstripe/forum": "<0.6.2|>=0.7,<0.7.4", + "silverstripe/framework": "<6.2.2", "silverstripe/graphql": ">=2,<2.0.5|>=3,<3.8.2|>=4,<4.3.7|>=5,<5.1.3", "silverstripe/hybridsessions": ">=1,<2.4.1|>=2.5,<2.5.1", "silverstripe/recipe-cms": ">=4.5,<4.5.3", @@ -9741,53 +10269,59 @@ "silverstripe/silverstripe-omnipay": "<2.5.2|>=3,<3.0.2|>=3.1,<3.1.4|>=3.2,<3.2.1", "silverstripe/subsites": ">=2,<2.6.1", "silverstripe/taxonomy": ">=1.3,<1.3.1|>=2,<2.0.1", - "silverstripe/userforms": "<3|>=5,<5.4.2", + "silverstripe/userforms": "<6.4.9|>=7,<7.0.7|>=7.1,<7.1.1", + "silverstripe/versioned": "<3.2.1", "silverstripe/versioned-admin": ">=1,<1.11.1", "simogeo/filemanager": "<=2.5", "simple-updates/phpwhois": "<=1", - "simplesamlphp/saml2": "<=4.16.15|>=5.0.0.0-alpha1,<=5.0.0.0-alpha19", - "simplesamlphp/saml2-legacy": "<=4.16.15", - "simplesamlphp/simplesamlphp": "<1.18.6", + "simplesamlphp/saml2": "<4.19.3|>=4.20,<=4.20.2|>=5,<5.0.6|>=6,<6.2.1", + "simplesamlphp/saml2-legacy": "<4.19.3|>=4.20,<=4.20.2", + "simplesamlphp/simplesamlphp": "<=2.4.6|>=2.5,<=2.5.1", + "simplesamlphp/simplesamlphp-module-casserver": "<=7.0.2", "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", "simplesamlphp/simplesamlphp-module-openid": "<1", "simplesamlphp/simplesamlphp-module-openidprovider": "<0.9", "simplesamlphp/xml-common": "<1.20", - "simplesamlphp/xml-security": "==1.6.11", + "simplesamlphp/xml-security": "<1.13.9|>=2,<2.3.1", "simplito/elliptic-php": "<1.0.6", "sitegeist/fluid-components": "<3.5", "sjbr/sr-feuser-register": "<2.6.2|>=5.1,<12.5", "sjbr/sr-freecap": "<2.4.6|>=2.5,<2.5.3", "sjbr/static-info-tables": "<2.3.1", "slim/psr7": "<1.4.1|>=1.5,<1.5.1|>=1.6,<1.6.1", - "slim/slim": "<2.6", + "slim/slim": "<2.6|>=4.4,<=4.15.1", "slub/slub-events": "<3.0.3", - "smarty/smarty": "<4.5.3|>=5,<5.1.1", - "snipe/snipe-it": "<=8.3.4", + "smarty/smarty": "<4.5.7|>=5,<5.8.4", + "snipe/snipe-it": "<8.7", "socalnick/scn-social-auth": "<1.15.2", "socialiteproviders/steam": "<1.1", + "solidinvoice/solidinvoice": "<=2.3.15", "solspace/craft-freeform": "<4.1.29|>=5,<=5.14.6", "soosyze/soosyze": "<=2", "spatie/browsershot": "<5.0.5", "spatie/image-optimizer": "<1.7.3", + "spatie/laravel-medialibrary": "<11.23", + "spatie/schema-org": ">=3.23.1,<3.23.2|>=4,<4.0.2", "spencer14420/sp-php-email-handler": "<1", "spipu/html2pdf": "<5.2.8", "spiral/roadrunner": "<2025.1", + "spomky-labs/otphp": "<11.4.3", "spoon/library": "<1.4.1", "spoonity/tcpdf": "<6.2.22", - "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", + "squizlabs/php_codesniffer": "<3.13.6|>=4,<4.0.2", "ssddanbrown/bookstack": "<24.05.1", "starcitizentools/citizen-skin": ">=1.9.4,<3.9", "starcitizentools/short-description": ">=4,<4.0.1", "starcitizentools/tabber-neue": ">=1.9.1,<2.7.2|>=3,<3.1.1", "starcitizenwiki/embedvideo": "<=4", - "statamic/cms": "<5.73.9|>=6,<6.3.2", + "statamic/cms": "<5.74.3|>=6,<=6.30", "stormpath/sdk": "<9.9.99", - "studio-42/elfinder": "<=2.1.64", + "studio-42/elfinder": "<2.1.70", "studiomitte/friendlycaptcha": "<0.1.4", "subhh/libconnect": "<7.0.8|>=8,<8.1", "sukohi/surpass": "<1", "sulu/form-bundle": ">=2,<2.5.3", - "sulu/sulu": "<1.6.44|>=2,<2.5.25|>=2.6,<2.6.9|>=3.0.0.0-alpha1,<3.0.0.0-alpha3", + "sulu/sulu": "<2.6.25|>=3,<3.0.8", "sumocoders/framework-user-bundle": "<1.4", "superbig/craft-audit": "<3.0.2", "svewap/a21glossary": "<=0.4.10", @@ -9797,51 +10331,68 @@ "sylius/admin-bundle": ">=1,<1.0.17|>=1.1,<1.1.9|>=1.2,<1.2.2", "sylius/grid": ">=1,<1.1.19|>=1.2,<1.2.18|>=1.3,<1.3.13|>=1.4,<1.4.5|>=1.5,<1.5.1", "sylius/grid-bundle": "<1.10.1", + "sylius/mollie-plugin": "<2.2.8|>=3,<3.2.4|>=3.3,<3.3.1", "sylius/paypal-plugin": "<1.6.2|>=1.7,<1.7.2|>=2,<2.0.2", "sylius/resource-bundle": ">=1,<1.3.14|>=1.4,<1.4.7|>=1.5,<1.5.2|>=1.6,<1.6.4", - "sylius/sylius": "<1.12.19|>=1.13.0.0-alpha1,<1.13.4", + "sylius/sylius": "<1.9.12|>=1.10,<1.10.16|>=1.11,<1.11.17|>=1.12,<=1.12.22|>=1.13,<=1.13.14|>=1.14,<=1.14.17|>=2,<2.0.18|>=2.1,<2.1.15|>=2.2,<2.2.6", + "symbiote/silverstripe-advancedworkflow": "<6.4.5|>=7,<7.1.3|>=7.2,<7.2.1", "symbiote/silverstripe-multivaluefield": ">=3,<3.1", "symbiote/silverstripe-queuedjobs": ">=3,<3.0.2|>=3.1,<3.1.4|>=4,<4.0.7|>=4.1,<4.1.2|>=4.2,<4.2.4|>=4.3,<4.3.3|>=4.4,<4.4.3|>=4.5,<4.5.1|>=4.6,<4.6.4", "symbiote/silverstripe-seed": "<6.0.3", "symbiote/silverstripe-versionedfiles": "<=2.0.3", "symfont/process": ">=0", - "symfony/cache": ">=3.1,<3.4.35|>=4,<4.2.12|>=4.3,<4.3.8", + "symfony/cache": "<5.4.52|>=6,<6.4.40|>=7,<7.4.12|>=8,<8.0.12", "symfony/dependency-injection": ">=2,<2.0.17|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", + "symfony/dom-crawler": "<5.4.52|>=6,<6.4.40|>=7,<7.4.12|>=8,<8.0.12", "symfony/error-handler": ">=4.4,<4.4.4|>=5,<5.0.4", + "symfony/expression-language": ">=2.4,<5.4.54|>=6,<6.4.48|>=7,<7.4.21|>=8,<8.1.9", "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.50|>=2.8,<2.8.49|>=3,<3.4.20|>=4,<4.0.15|>=4.1,<4.1.9|>=4.2,<4.2.1", "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2|>=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7|>=5.3.14,<5.3.15|>=5.4.3,<5.4.4|>=6.0.3,<6.0.4", - "symfony/http-client": ">=4.3,<5.4.47|>=6,<6.4.15|>=7,<7.1.8", - "symfony/http-foundation": "<5.4.50|>=6,<6.4.29|>=7,<7.3.7", - "symfony/http-kernel": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6", + "symfony/html-sanitizer": ">=6.1,<6.4.41|>=7,<7.4.13|>=8,<8.0.13", + "symfony/http-client": ">=4.3,<5.4.53|>=6,<6.4.15|>=7,<7.1.8", + "symfony/http-foundation": "<5.4.54|>=6,<6.4.46|>=7,<7.4.19|>=8,<8.1.7", + "symfony/http-kernel": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.2.6|>=7.4,<7.4.12|>=8,<8.0.12", "symfony/intl": ">=2.7,<2.7.38|>=2.8,<2.8.31|>=3,<3.2.14|>=3.3,<3.3.13", + "symfony/json-path": ">=7.3,<7.4.12|>=8,<8.0.12", + "symfony/lox24-notifier": ">=7.1,<7.4.12|>=8,<8.0.12", + "symfony/mailer": "<5.4.52|>=6,<6.4.40|>=7,<7.4.12|>=8,<8.0.12", + "symfony/mailjet-mailer": ">=6.4,<6.4.40|>=7,<7.4.12|>=8,<8.0.12", + "symfony/mailomat-mailer": ">=7.2,<7.4.13|>=8,<8.0.13", + "symfony/mailtrap-mailer": ">=7.2,<7.4.12|>=8,<8.0.12", "symfony/maker-bundle": ">=1.27,<1.29.2|>=1.30,<1.31.1", - "symfony/mime": ">=4.3,<4.3.8", + "symfony/mime": "<5.4.52|>=6,<6.4.40|>=7,<7.4.12|>=8,<8.0.12", + "symfony/monolog-bridge": "<5.4.52|>=6,<6.4.40|>=7,<7.4.12|>=8,<8.0.12", "symfony/phpunit-bridge": ">=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/polyfill": ">=1,<1.10", + "symfony/polyfill": ">=1,<1.10|>=1.17.1,<1.38.1", + "symfony/polyfill-intl-idn": ">=1.17.1,<1.38.1", "symfony/polyfill-php55": ">=1,<1.10", "symfony/process": "<5.4.51|>=6,<6.4.33|>=7,<7.1.7|>=7.3,<7.3.11|>=7.4,<7.4.5|>=8,<8.0.5", "symfony/proxy-manager-bridge": ">=2.7,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.1.12|>=4.2,<4.2.7", - "symfony/routing": ">=2,<2.0.19", - "symfony/runtime": ">=5.3,<5.4.46|>=6,<6.4.14|>=7,<7.1.7", + "symfony/routing": "<5.4.53|>=6,<6.4.41|>=7,<7.4.13|>=8,<8.0.13", + "symfony/runtime": ">=5.3,<5.4.52|>=6,<6.4.40|>=7,<7.4.12|>=8,<8.0.12", "symfony/security": ">=2,<2.7.51|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.8", "symfony/security-bundle": ">=2,<4.4.50|>=5,<5.4.20|>=6,<6.0.20|>=6.1,<6.1.12|>=6.2,<6.4.10|>=7,<7.0.10|>=7.1,<7.1.3", "symfony/security-core": ">=2.4,<2.6.13|>=2.7,<2.7.9|>=2.7.30,<2.7.32|>=2.8,<3.4.49|>=4,<4.4.24|>=5,<5.2.9", "symfony/security-csrf": ">=2.4,<2.7.48|>=2.8,<2.8.41|>=3,<3.3.17|>=3.4,<3.4.11|>=4,<4.0.11", "symfony/security-guard": ">=2.8,<3.4.48|>=4,<4.4.23|>=5,<5.2.8", - "symfony/security-http": ">=2.3,<2.3.41|>=2.4,<2.7.51|>=2.8,<2.8.50|>=3,<3.4.26|>=4,<4.2.12|>=4.3,<4.3.8|>=4.4,<4.4.7|>=5,<5.0.7|>=5.1,<5.2.8|>=5.3,<5.4.47|>=6,<6.4.15|>=7,<7.1.8", + "symfony/security-http": "<5.4.53|>=6,<6.4.41|>=7,<7.4.13|>=8,<8.0.13", "symfony/serializer": ">=2,<2.0.11|>=4.1,<4.4.35|>=5,<5.3.12", - "symfony/symfony": "<5.4.51|>=6,<6.4.33|>=7,<7.3.11|>=7.4,<7.4.5|>=8,<8.0.5", + "symfony/symfony": "<5.4.54|>=6,<6.4.48|>=7,<7.4.21|>=8,<8.1.9", "symfony/translation": ">=2,<2.0.17", - "symfony/twig-bridge": ">=2,<4.4.51|>=5,<5.4.31|>=6,<6.3.8", - "symfony/ux-autocomplete": "<2.11.2", - "symfony/ux-live-component": "<2.25.1", + "symfony/twig-bridge": ">=2,<4.4.51|>=5,<5.4.31|>=6,<6.3.8|>=6.4.24,<6.4.40", + "symfony/twilio-notifier": ">=6.4,<6.4.40|>=7,<7.4.12|>=8,<8.0.12", + "symfony/ux-autocomplete": "<2.36|>=3,<3.1", + "symfony/ux-icons": ">=2.17,<2.36.1|>=3,<3.2", + "symfony/ux-live-component": "<2.36|>=3,<3.1", + "symfony/ux-toolkit": ">=2.32,<2.36.1|>=3,<3.2", "symfony/ux-twig-component": "<2.25.1", "symfony/validator": "<5.4.43|>=6,<6.4.11|>=7,<7.1.4", "symfony/var-exporter": ">=4.2,<4.2.12|>=4.3,<4.3.8", - "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", + "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4|>=7.2.9,<7.4.12|>=8,<8.0.12", "symfony/webhook": ">=6.3,<6.3.8", - "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7|>=2.2.0.0-beta1,<2.2.0.0-beta2", + "symfony/yaml": "<5.4.54|>=6,<6.4.45|>=7,<7.4.18|>=8,<8.1.6", "symphonycms/symphony-2": "<2.6.4", + "syssy/syssy-typo3-extension": "<3.0.6", "t3/dce": "<0.11.5|>=2.2,<2.6.2", "t3g/svg-sanitizer": "<1.0.3", "t3s/content-consent": "<1.0.3|>=2,<2.0.2", @@ -9851,44 +10402,50 @@ "tecnickcom/tcpdf": "<6.8", "terminal42/contao-tablelookupwizard": "<3.3.5", "thelia/backoffice-default-template": ">=2.1,<2.1.2", - "thelia/thelia": ">=2.1,<2.1.3", + "thelia/thelia": ">=2.0.0.0-beta1,<2.1.3", "theonedemon/phpwhois": "<=4.2.5", "thinkcmf/thinkcmf": "<6.0.8", - "thorsten/phpmyfaq": "<=4.0.16|>=4.1.0.0-alpha,<=4.1.0.0-beta2", + "thorsten/phpmyfaq": "<4.2.0.0-alpha", "tikiwiki/tiki-manager": "<=17.1", "timber/timber": ">=0.16.6,<1.23.1|>=1.24,<1.24.1|>=2,<2.1", - "tinymce/tinymce": "<7.2", + "tinymce/tinymce": "<7.9.3|>=8,<8.5.1", "tinymighty/wiki-seo": "<1.2.2", "titon/framework": "<9.9.99", "tltneon/lgsl": "<7", "tobiasbg/tablepress": "<=2.0.0.0-RC1", + "tomasnorre/crawler": "<11.0.13|>=12,<12.0.11", "topthink/framework": "<6.0.17|>=6.1,<=8.0.4", "topthink/think": "<=6.1.1", "topthink/thinkphp": "<=3.2.3|>=6.1.3,<=8.0.4", "torrentpier/torrentpier": "<=2.8.8", - "tpwd/ke_search": "<4.0.3|>=4.1,<4.6.6|>=5,<5.0.2", + "tpwd/ke_search": "<5.6.2|>=6,<6.6.1|>=7,<7.0.1", "tribalsystems/zenario": "<=9.7.61188", "truckersmp/phpwhois": "<=4.3.1", "ttskch/pagination-service-provider": "<1", "twbs/bootstrap": "<3.4.1|>=4,<4.3.1", - "twig/twig": "<3.11.2|>=3.12,<3.14.1|>=3.16,<3.19", + "twig/cssinliner-extra": "<3.26", + "twig/intl-extra": "<3.26", + "twig/markdown-extra": "<3.26", + "twig/twig": "<3.27", + "typicms/core": "<12.0.5|>=13,<13.0.9|>=14,<14.0.27|>=15,<15.0.29|>=16,<16.1.7", "typo3/cms": "<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", - "typo3/cms-backend": "<4.1.14|>=4.2,<4.2.15|>=4.3,<4.3.7|>=4.4,<4.4.4|>=7,<=7.6.50|>=8,<=8.7.39|>=9,<9.5.55|>=10,<=10.4.54|>=11,<=11.5.48|>=12,<=12.4.40|>=13,<=13.4.22|>=14,<=14.0.1", + "typo3/cms-backend": "<10.4.60|>=11,<11.5.54|>=12,<12.4.49|>=13,<13.4.35|>=14,<14.3.7", "typo3/cms-belog": ">=10,<=10.4.47|>=11,<=11.5.41|>=12,<=12.4.24|>=13,<=13.4.2", "typo3/cms-beuser": ">=9,<9.5.55|>=10,<10.4.54|>=11,<11.5.48|>=12,<12.4.37|>=13,<13.4.18", - "typo3/cms-core": "<=8.7.56|>=9,<9.5.55|>=10,<=10.4.54|>=11,<=11.5.48|>=12,<=12.4.40|>=13,<=13.4.22|>=14,<=14.0.1", + "typo3/cms-core": "<10.4.57|>=11,<11.5.51|>=12,<12.4.46|>=13,<13.4.34|>=14,<14.3.6", "typo3/cms-dashboard": ">=10,<10.4.54|>=11,<11.5.48|>=12,<12.4.37|>=13,<13.4.18", "typo3/cms-extbase": "<6.2.24|>=7,<7.6.8|==8.1.1", "typo3/cms-extensionmanager": ">=10,<=10.4.47|>=11,<=11.5.41|>=12,<=12.4.24|>=13,<=13.4.2", "typo3/cms-felogin": ">=4.2,<4.2.3", - "typo3/cms-fluid": "<4.3.4|>=4.4,<4.4.1", - "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.47|>=11,<=11.5.41|>=12,<=12.4.24|>=13,<=13.4.2", + "typo3/cms-filelist": ">=11,<11.5.51|>=12,<12.4.46|>=13,<13.4.31|>=14,<14.3.3", + "typo3/cms-fluid": "<4.3.4|>=4.4,<4.4.1|>=8,<8.7.23|>=9,<9.5.4", + "typo3/cms-form": "<10.4.57|>=11,<11.5.51|>=12,<12.4.46|>=13,<13.4.31|>=14,<14.3.9", "typo3/cms-frontend": "<4.3.9|>=4.4,<4.4.5", - "typo3/cms-indexed-search": ">=10,<=10.4.47|>=11,<=11.5.41|>=12,<=12.4.24|>=13,<=13.4.2", + "typo3/cms-indexed-search": ">=10,<=10.4.47|>=11,<=11.5.41|>=12,<=12.4.24|>=13,<13.4.31|>=14,<14.3.3", "typo3/cms-install": "<4.1.14|>=4.2,<4.2.16|>=4.3,<4.3.9|>=4.4,<4.4.5|>=12.2,<12.4.8|==13.4.2", - "typo3/cms-lowlevel": ">=11,<=11.5.41", + "typo3/cms-lowlevel": ">=11,<=11.5.41|>=14.2,<14.3.7", "typo3/cms-recordlist": ">=11,<11.5.48", - "typo3/cms-recycler": ">=9,<9.5.55|>=10,<=10.4.54|>=11,<=11.5.48|>=12,<=12.4.40|>=13,<=13.4.22|>=14,<=14.0.1", + "typo3/cms-recycler": "<10.4.57|>=11,<11.5.51|>=12,<12.4.46|>=13,<13.4.31|>=14,<14.3.3", "typo3/cms-redirects": ">=10,<=10.4.54|>=11,<=11.5.48|>=12,<=12.4.40|>=13,<=13.4.22|>=14,<=14.0.1", "typo3/cms-rte-ckeditor": ">=9.5,<9.5.42|>=10,<10.4.39|>=11,<11.5.30", "typo3/cms-scheduler": ">=11,<=11.5.41", @@ -9896,13 +10453,14 @@ "typo3/cms-webhooks": ">=12,<=12.4.30|>=13,<=13.4.11", "typo3/cms-workspaces": ">=9,<9.5.55|>=10,<10.4.54|>=11,<11.5.48|>=12,<12.4.37|>=13,<13.4.18", "typo3/flow": ">=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1|>=2.3,<2.3.16|>=3,<3.0.12|>=3.1,<3.1.10|>=3.2,<3.2.13|>=3.3,<3.3.13|>=4,<4.0.6", - "typo3/html-sanitizer": ">=1,<=1.5.2|>=2,<=2.1.3", + "typo3/html-sanitizer": "<2.3.2", "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4|>=2.3,<2.3.99|>=3,<3.0.20|>=3.1,<3.1.18|>=3.2,<3.2.14|>=3.3,<3.3.23|>=4,<4.0.17|>=4.1,<4.1.16|>=4.2,<4.2.12|>=4.3,<4.3.3", "typo3/phar-stream-wrapper": ">=1,<2.1.1|>=3,<3.1.1", "typo3/swiftmailer": ">=4.1,<4.1.99|>=5.4,<5.4.5", "typo3fluid/fluid": ">=2,<2.0.8|>=2.1,<2.1.7|>=2.2,<2.2.4|>=2.3,<2.3.7|>=2.4,<2.4.4|>=2.5,<2.5.11|>=2.6,<2.6.10", "ua-parser/uap-php": "<3.8", "uasoft-indonesia/badaso": "<=2.9.7", + "ueberdosis/tiptap-php": "<2.1.1", "unisharp/laravel-filemanager": "<2.9.1", "universal-omega/dynamic-page-list3": "<3.6.4", "unopim/unopim": "<=0.3", @@ -9912,7 +10470,7 @@ "uvdesk/core-framework": "<=1.1.1", "vanilla/safecurl": "<0.9.2", "verbb/comments": "<1.5.5", - "verbb/formie": "<=2.1.43", + "verbb/formie": "<3.1.31", "verbb/image-resizer": "<2.0.9", "verbb/knock-knock": "<1.2.8", "verot/class.upload.php": "<=2.1.6", @@ -9926,42 +10484,52 @@ "wallabag/wallabag": "<2.6.11", "wanglelecc/laracms": "<=1.0.3", "wapplersystems/a21glossary": "<=0.4.10", - "web-auth/webauthn-framework": ">=3.3,<3.3.4|>=4.5,<4.9", - "web-auth/webauthn-lib": ">=4.5,<4.9", + "web-auth/webauthn-framework": ">=3.3,<3.3.4|>=4.5,<4.9|>=5.2,<5.2.4|>=5.3,<5.3.1", + "web-auth/webauthn-lib": ">=4.5,<5.3.5", + "web-auth/webauthn-symfony-bundle": "<5.3.4", "web-feet/coastercms": "==5.5", + "web-token/jwt-bundle": "<3.4.10|>=4,<4.0.7|>=4.1,<4.1.7", + "web-token/jwt-experimental": "<4.1.7", + "web-token/jwt-framework": "<3.4.10|>=4,<4.0.7|>=4.1,<4.1.7", + "web-token/jwt-library": "<3.4.10|>=4,<4.0.7|>=4.1,<4.1.7", "web-tp3/wec_map": "<3.0.3", "webbuilders-group/silverstripe-kapost-bridge": "<0.4", "webcoast/deferred-image-processing": "<1.0.2", "webklex/laravel-imap": "<5.3", "webklex/php-imap": "<5.3", + "webonyx/graphql-php": "<=15.32.2", "webpa/webpa": "<3.1.2", "webreinvent/vaahcms": "<=2.3.1", "wikibase/wikibase": "<=1.39.3", "wikimedia/parsoid": "<0.12.2", "willdurand/js-translation-bundle": "<2.1.1", - "winter/wn-backend-module": "<1.2.4", - "winter/wn-cms-module": "<=1.2.9", + "winter/wn-backend-module": "<1.2.14", + "winter/wn-cms-module": "<=1.2.12", "winter/wn-dusk-plugin": "<2.1", - "winter/wn-system-module": "<1.2.4", + "winter/wn-system-module": "<1.2.13", "wintercms/winter": "<=1.2.3", "wireui/wireui": "<1.19.3|>=2,<2.1.3", + "wnx/laravel-backup-restore": "<=1.9.3", "woocommerce/woocommerce": "<6.6|>=8.8,<8.8.5|>=8.9,<8.9.3", "wp-cli/wp-cli": ">=0.12,<2.5", - "wp-graphql/wp-graphql": "<=1.14.5", + "wp-coding-standards/wpcs": ">=0.14.1,<3.4.1", + "wp-graphql/wp-graphql": "<2.22.2", "wp-premium/gravityforms": "<2.4.21", "wpanel/wpanel4-cms": "<=4.3.1", "wpcloud/wp-stateless": "<3.2", "wpglobus/wpglobus": "<=1.9.6", - "wwbn/avideo": "<21", + "wpmetabox/meta-box": "<5.11.2", + "wwbn/avideo": "<=29", "xataface/xataface": "<3", "xpressengine/xpressengine": "<3.0.15", "yab/quarx": "<2.4.5", - "yeswiki/yeswiki": "<=4.5.4", + "yansongda/pay": "<=3.7.19", + "yeswiki/yeswiki": "<4.6.6", "yetiforce/yetiforce-crm": "<6.5", "yidashi/yii2cmf": "<=2", "yii2mod/yii2-cms": "<1.9.2", "yiisoft/yii": "<1.1.31", - "yiisoft/yii2": "<2.0.52", + "yiisoft/yii2": "<2.0.55", "yiisoft/yii2-authclient": "<2.2.15", "yiisoft/yii2-bootstrap": "<2.0.4", "yiisoft/yii2-dev": "<=2.0.45", @@ -9971,10 +10539,12 @@ "yiisoft/yii2-redis": "<2.0.20", "yikesinc/yikes-inc-easy-mailchimp-extender": "<6.8.6", "yoast-seo-for-typo3/yoast_seo": "<7.2.3", - "yourls/yourls": "<=1.10.2", + "yoast/duplicate-post": "<=4.5", + "yourls/yourls": "<=1.10.4", "yuan1994/tpadmin": "<=1.3.12", "yungifez/skuul": "<=2.6.5", "z-push/z-push-dev": "<2.7.6", + "zbateson/mail-mime-parser": "<3.0.6|>=4,<4.0.2", "zencart/zencart": "<=1.5.7.0-beta", "zendesk/zendesk_api_client_php": "<2.2.11", "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", @@ -10050,27 +10620,27 @@ "type": "tidelift" } ], - "time": "2026-02-20T22:06:39+00:00" + "time": "2026-10-19T23:20:11+00:00" }, { "name": "sebastian/cli-parser", - "version": "4.2.0", + "version": "4.2.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/cli-parser.git", - "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04" + "reference": "7d05781b13f7dec9043a629a21d086ed74582a15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/90f41072d220e5c40df6e8635f5dafba2d9d4d04", - "reference": "90f41072d220e5c40df6e8635f5dafba2d9d4d04", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/7d05781b13f7dec9043a629a21d086ed74582a15", + "reference": "7d05781b13f7dec9043a629a21d086ed74582a15", "shasum": "" }, "require": { "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.25" }, "type": "library", "extra": { @@ -10099,7 +10669,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/cli-parser/issues", "security": "https://github.com/sebastianbergmann/cli-parser/security/policy", - "source": "https://github.com/sebastianbergmann/cli-parser/tree/4.2.0" + "source": "https://github.com/sebastianbergmann/cli-parser/tree/4.2.1" }, "funding": [ { @@ -10119,20 +10689,20 @@ "type": "tidelift" } ], - "time": "2025-09-14T09:36:45+00:00" + "time": "2026-05-17T05:29:34+00:00" }, { "name": "sebastian/comparator", - "version": "7.1.4", + "version": "7.1.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "6a7de5df2e094f9a80b40a522391a7e6022df5f6" + "reference": "7c65c1e79836812819705b473a90c12399542485" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6a7de5df2e094f9a80b40a522391a7e6022df5f6", - "reference": "6a7de5df2e094f9a80b40a522391a7e6022df5f6", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/7c65c1e79836812819705b473a90c12399542485", + "reference": "7c65c1e79836812819705b473a90c12399542485", "shasum": "" }, "require": { @@ -10140,10 +10710,10 @@ "ext-mbstring": "*", "php": ">=8.3", "sebastian/diff": "^7.0", - "sebastian/exporter": "^7.0" + "sebastian/exporter": "^7.0.3" }, "require-dev": { - "phpunit/phpunit": "^12.2" + "phpunit/phpunit": "^12.5.25" }, "suggest": { "ext-bcmath": "For comparing BcMath\\Number objects" @@ -10191,7 +10761,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", "security": "https://github.com/sebastianbergmann/comparator/security/policy", - "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.4" + "source": "https://github.com/sebastianbergmann/comparator/tree/7.1.8" }, "funding": [ { @@ -10211,7 +10781,7 @@ "type": "tidelift" } ], - "time": "2026-01-24T09:28:48+00:00" + "time": "2026-05-21T04:45:25+00:00" }, { "name": "sebastian/complexity", @@ -10273,24 +10843,24 @@ }, { "name": "sebastian/diff", - "version": "7.0.0", + "version": "7.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "7ab1ea946c012266ca32390913653d844ecd085f" + "reference": "cd4cabe39f8a4e8ee6818ba99f10a05561ea4ad6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7ab1ea946c012266ca32390913653d844ecd085f", - "reference": "7ab1ea946c012266ca32390913653d844ecd085f", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/cd4cabe39f8a4e8ee6818ba99f10a05561ea4ad6", + "reference": "cd4cabe39f8a4e8ee6818ba99f10a05561ea4ad6", "shasum": "" }, "require": { "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^12.0", - "symfony/process": "^7.2" + "phpunit/phpunit": "^12.5.33", + "symfony/process": "^7.4.17" }, "type": "library", "extra": { @@ -10328,35 +10898,47 @@ "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", "security": "https://github.com/sebastianbergmann/diff/security/policy", - "source": "https://github.com/sebastianbergmann/diff/tree/7.0.0" + "source": "https://github.com/sebastianbergmann/diff/tree/7.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/diff", + "type": "tidelift" } ], - "time": "2025-02-07T04:55:46+00:00" + "time": "2026-08-25T15:35:54+00:00" }, { "name": "sebastian/environment", - "version": "8.0.3", + "version": "8.1.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "24a711b5c916efc6d6e62aa65aa2ec98fef77f68" + "reference": "9d32c685773823b1983e256ae4ecd48a10d6e439" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/24a711b5c916efc6d6e62aa65aa2ec98fef77f68", - "reference": "24a711b5c916efc6d6e62aa65aa2ec98fef77f68", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/9d32c685773823b1983e256ae4ecd48a10d6e439", + "reference": "9d32c685773823b1983e256ae4ecd48a10d6e439", "shasum": "" }, "require": { "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.26" }, "suggest": { "ext-posix": "*" @@ -10364,7 +10946,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "8.0-dev" + "dev-main": "8.1-dev" } }, "autoload": { @@ -10392,7 +10974,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", "security": "https://github.com/sebastianbergmann/environment/security/policy", - "source": "https://github.com/sebastianbergmann/environment/tree/8.0.3" + "source": "https://github.com/sebastianbergmann/environment/tree/8.1.2" }, "funding": [ { @@ -10412,29 +10994,29 @@ "type": "tidelift" } ], - "time": "2025-08-12T14:11:56+00:00" + "time": "2026-05-25T13:40:20+00:00" }, { "name": "sebastian/exporter", - "version": "7.0.2", + "version": "7.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "016951ae10980765e4e7aee491eb288c64e505b7" + "reference": "c5e21b5de653ce0a769fb36f5cdfcb5e7a32cf23" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/016951ae10980765e4e7aee491eb288c64e505b7", - "reference": "016951ae10980765e4e7aee491eb288c64e505b7", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c5e21b5de653ce0a769fb36f5cdfcb5e7a32cf23", + "reference": "c5e21b5de653ce0a769fb36f5cdfcb5e7a32cf23", "shasum": "" }, "require": { "ext-mbstring": "*", "php": ">=8.3", - "sebastian/recursion-context": "^7.0" + "sebastian/recursion-context": "^7.0.1" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.25" }, "type": "library", "extra": { @@ -10482,7 +11064,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", "security": "https://github.com/sebastianbergmann/exporter/security/policy", - "source": "https://github.com/sebastianbergmann/exporter/tree/7.0.2" + "source": "https://github.com/sebastianbergmann/exporter/tree/7.0.3" }, "funding": [ { @@ -10502,30 +11084,30 @@ "type": "tidelift" } ], - "time": "2025-09-24T06:16:11+00:00" + "time": "2026-05-20T04:37:17+00:00" }, { "name": "sebastian/global-state", - "version": "8.0.2", + "version": "8.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "ef1377171613d09edd25b7816f05be8313f9115d" + "reference": "b164d3274d6537ab462591c5755f76a8f5b1aae9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/ef1377171613d09edd25b7816f05be8313f9115d", - "reference": "ef1377171613d09edd25b7816f05be8313f9115d", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/b164d3274d6537ab462591c5755f76a8f5b1aae9", + "reference": "b164d3274d6537ab462591c5755f76a8f5b1aae9", "shasum": "" }, "require": { "php": ">=8.3", "sebastian/object-reflector": "^5.0", - "sebastian/recursion-context": "^7.0" + "sebastian/recursion-context": "^7.0.1" }, "require-dev": { "ext-dom": "*", - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.28" }, "type": "library", "extra": { @@ -10556,7 +11138,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", "security": "https://github.com/sebastianbergmann/global-state/security/policy", - "source": "https://github.com/sebastianbergmann/global-state/tree/8.0.2" + "source": "https://github.com/sebastianbergmann/global-state/tree/8.0.3" }, "funding": [ { @@ -10576,28 +11158,28 @@ "type": "tidelift" } ], - "time": "2025-08-29T11:29:25+00:00" + "time": "2026-06-01T15:10:33+00:00" }, { "name": "sebastian/lines-of-code", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/lines-of-code.git", - "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f" + "reference": "d543b8ef219dcd8da262cbb958639a96bedba10e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/97ffee3bcfb5805568d6af7f0f893678fc076d2f", - "reference": "97ffee3bcfb5805568d6af7f0f893678fc076d2f", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/d543b8ef219dcd8da262cbb958639a96bedba10e", + "reference": "d543b8ef219dcd8da262cbb958639a96bedba10e", "shasum": "" }, "require": { - "nikic/php-parser": "^5.0", + "nikic/php-parser": "^5.7.0", "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.25" }, "type": "library", "extra": { @@ -10626,15 +11208,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", "security": "https://github.com/sebastianbergmann/lines-of-code/security/policy", - "source": "https://github.com/sebastianbergmann/lines-of-code/tree/4.0.0" + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/4.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/lines-of-code", + "type": "tidelift" } ], - "time": "2025-02-07T04:57:28+00:00" + "time": "2026-05-19T16:22:07+00:00" }, { "name": "sebastian/object-enumerator", @@ -10828,23 +11422,23 @@ }, { "name": "sebastian/type", - "version": "6.0.3", + "version": "6.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "e549163b9760b8f71f191651d22acf32d56d6d4d" + "reference": "82ff822c2edc46724be9f7411d3163021f602773" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/e549163b9760b8f71f191651d22acf32d56d6d4d", - "reference": "e549163b9760b8f71f191651d22acf32d56d6d4d", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/82ff822c2edc46724be9f7411d3163021f602773", + "reference": "82ff822c2edc46724be9f7411d3163021f602773", "shasum": "" }, "require": { "php": ">=8.3" }, "require-dev": { - "phpunit/phpunit": "^12.0" + "phpunit/phpunit": "^12.5.25" }, "type": "library", "extra": { @@ -10873,7 +11467,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/type/issues", "security": "https://github.com/sebastianbergmann/type/security/policy", - "source": "https://github.com/sebastianbergmann/type/tree/6.0.3" + "source": "https://github.com/sebastianbergmann/type/tree/6.0.4" }, "funding": [ { @@ -10893,20 +11487,20 @@ "type": "tidelift" } ], - "time": "2025-08-09T06:57:12+00:00" + "time": "2026-05-20T06:45:45+00:00" }, { "name": "sebastian/version", - "version": "6.0.0", + "version": "6.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c" + "reference": "9e935a16187e14f39b0e79910dabd614972cdb26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/3e6ccf7657d4f0a59200564b08cead899313b53c", - "reference": "3e6ccf7657d4f0a59200564b08cead899313b53c", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/9e935a16187e14f39b0e79910dabd614972cdb26", + "reference": "9e935a16187e14f39b0e79910dabd614972cdb26", "shasum": "" }, "require": { @@ -10939,15 +11533,27 @@ "support": { "issues": "https://github.com/sebastianbergmann/version/issues", "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/6.0.0" + "source": "https://github.com/sebastianbergmann/version/tree/6.0.1" }, "funding": [ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://liberapay.com/sebastianbergmann", + "type": "liberapay" + }, + { + "url": "https://thanks.dev/u/gh/sebastianbergmann", + "type": "thanks_dev" + }, + { + "url": "https://tidelift.com/funding/github/packagist/sebastian/version", + "type": "tidelift" } ], - "time": "2025-02-07T05:00:38+00:00" + "time": "2026-10-04T05:50:08+00:00" }, { "name": "shalvah/upgrader", @@ -11059,28 +11665,116 @@ ], "time": "2024-10-20T05:08:20+00:00" }, + { + "name": "symfony/polyfill-deepclone", + "version": "v1.43.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-deepclone.git", + "reference": "82274308b59f6e96f53a3fb37fc40877d843e5a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-deepclone/zipball/82274308b59f6e96f53a3fb37fc40877d843e5a5", + "reference": "82274308b59f6e96f53a3fb37fc40877d843e5a5", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "provide": { + "ext-deepclone": "*" + }, + "suggest": { + "ext-deepclone": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\DeepClone\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the deepclone extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "deepclone", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-deepclone/tree/v1.43.2" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2026-10-14T07:17:09+00:00" + }, { "name": "symfony/var-exporter", - "version": "v7.4.0", + "version": "v8.1.9", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "03a60f169c79a28513a78c967316fbc8bf17816f" + "reference": "3717217839a76f6fa284931a224c4cada514da2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/03a60f169c79a28513a78c967316fbc8bf17816f", - "reference": "03a60f169c79a28513a78c967316fbc8bf17816f", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/3717217839a76f6fa284931a224c4cada514da2a", + "reference": "3717217839a76f6fa284931a224c4cada514da2a", "shasum": "" }, "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3" + "php": ">=8.4.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-deepclone": "^1.43.1" }, "require-dev": { - "symfony/property-access": "^6.4|^7.0|^8.0", - "symfony/serializer": "^6.4|^7.0|^8.0", - "symfony/var-dumper": "^6.4|^7.0|^8.0" + "symfony/property-access": "^7.4|^8.0", + "symfony/serializer": "^7.4|^8.0", + "symfony/var-dumper": "^7.4|^8.0" }, "type": "library", "autoload": { @@ -11105,11 +11799,12 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "description": "Provides tools to export, instantiate, hydrate, clone and lazy-load PHP objects", "homepage": "https://symfony.com", "keywords": [ "clone", "construct", + "deep-clone", "export", "hydrate", "instantiate", @@ -11118,7 +11813,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v7.4.0" + "source": "https://github.com/symfony/var-exporter/tree/v8.1.9" }, "funding": [ { @@ -11138,32 +11833,32 @@ "type": "tidelift" } ], - "time": "2025-09-11T10:15:23+00:00" + "time": "2026-10-07T07:28:40+00:00" }, { "name": "symfony/yaml", - "version": "v7.4.1", + "version": "v8.1.9", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "24dd4de28d2e3988b311751ac49e684d783e2345" + "reference": "6107ee26a25215c3df3af0a3315e56bb4fd0b7db" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/24dd4de28d2e3988b311751ac49e684d783e2345", - "reference": "24dd4de28d2e3988b311751ac49e684d783e2345", + "url": "https://api.github.com/repos/symfony/yaml/zipball/6107ee26a25215c3df3af0a3315e56bb4fd0b7db", + "reference": "6107ee26a25215c3df3af0a3315e56bb4fd0b7db", "shasum": "" }, "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", + "php": ">=8.4.1", "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "symfony/console": "<6.4" + "symfony/console": "<7.4" }, "require-dev": { - "symfony/console": "^6.4|^7.0|^8.0" + "symfony/console": "^7.4|^8.0", + "yaml/yaml-test-suite": "*" }, "bin": [ "Resources/bin/yaml-lint" @@ -11194,7 +11889,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v7.4.1" + "source": "https://github.com/symfony/yaml/tree/v8.1.9" }, "funding": [ { @@ -11214,7 +11909,67 @@ "type": "tidelift" } ], - "time": "2025-12-04T18:11:45+00:00" + "time": "2026-10-12T12:37:13+00:00" + }, + { + "name": "symplify/rule-doc-generator-contracts", + "version": "11.2.0", + "source": { + "type": "git", + "url": "https://github.com/symplify/rule-doc-generator-contracts.git", + "reference": "479cfcfd46047f80624aba931d9789e50475b5c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symplify/rule-doc-generator-contracts/zipball/479cfcfd46047f80624aba931d9789e50475b5c6", + "reference": "479cfcfd46047f80624aba931d9789e50475b5c6", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.3", + "phpstan/extension-installer": "^1.2", + "rector/rector": "^0.15.10", + "symplify/easy-ci": "^11.1", + "symplify/easy-coding-standard": "^11.1", + "symplify/easy-testing": "^11.1", + "symplify/phpstan-extensions": "^11.1", + "symplify/phpstan-rules": "11.2.3.72", + "tomasvotruba/unused-public": "^0.0.34" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "11.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symplify\\RuleDocGenerator\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Contracts for production code of RuleDocGenerator", + "support": { + "source": "https://github.com/symplify/rule-doc-generator-contracts/tree/11.2.0" + }, + "funding": [ + { + "url": "https://www.paypal.me/rectorphp", + "type": "custom" + }, + { + "url": "https://github.com/tomasvotruba", + "type": "github" + } + ], + "abandoned": true, + "time": "2024-03-18T22:02:54+00:00" }, { "name": "ta-tikoma/phpunit-architecture-test", @@ -11327,22 +12082,35 @@ }, { "name": "tomasvotruba/type-coverage", - "version": "2.1.0", + "version": "2.5.1", "source": { "type": "git", "url": "https://github.com/TomasVotruba/type-coverage.git", - "reference": "468354b3964120806a69890cbeb3fcf005876391" + "reference": "2d8e722c1776a17f506f6a66cd325e50fbaa12ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/TomasVotruba/type-coverage/zipball/468354b3964120806a69890cbeb3fcf005876391", - "reference": "468354b3964120806a69890cbeb3fcf005876391", + "url": "https://api.github.com/repos/TomasVotruba/type-coverage/zipball/2d8e722c1776a17f506f6a66cd325e50fbaa12ee", + "reference": "2d8e722c1776a17f506f6a66cd325e50fbaa12ee", "shasum": "" }, "require": { - "nette/utils": "^3.2 || ^4.0", - "php": "^7.4 || ^8.0", - "phpstan/phpstan": "^2.0" + "entropy/entropy": "^0.4.23", + "php": ">=7.4", + "phpstan/phpstan": "^2.2" + }, + "require-dev": { + "doctrine/collections": "^2.3", + "phpstan/extension-installer": "^1.4", + "phpunit/phpunit": "^13.2", + "rector/jack": "^1.1", + "rector/rector": "^2.5", + "shipmonk/composer-dependency-analyser": "^1.8", + "shipmonk/dead-code-detector": "^1.4", + "symfony/dom-crawler": "^8.1", + "symfony/form": "^8.1", + "symplify/easy-coding-standard": "^13.2", + "tracy/tracy": "^2.12" }, "type": "phpstan-extension", "extra": { @@ -11354,6 +12122,7 @@ }, "autoload": { "psr-4": { + "Rector\\TypePerfect\\": "packages/type-perfect/src", "TomasVotruba\\TypeCoverage\\": "src" } }, @@ -11368,7 +12137,7 @@ ], "support": { "issues": "https://github.com/TomasVotruba/type-coverage/issues", - "source": "https://github.com/TomasVotruba/type-coverage/tree/2.1.0" + "source": "https://github.com/TomasVotruba/type-coverage/tree/2.5.1" }, "funding": [ { @@ -11380,20 +12149,20 @@ "type": "github" } ], - "time": "2025-12-05T16:38:02+00:00" + "time": "2026-10-09T19:09:05+00:00" }, { "name": "webmozart/assert", - "version": "2.1.5", + "version": "2.5.0", "source": { "type": "git", "url": "https://github.com/webmozarts/assert.git", - "reference": "79155f94852fa27e2f73b459f6503f5e87e2c188" + "reference": "8a163706bbcac613733dba03f51e13b5eb1bb819" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/79155f94852fa27e2f73b459f6503f5e87e2c188", - "reference": "79155f94852fa27e2f73b459f6503f5e87e2c188", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/8a163706bbcac613733dba03f51e13b5eb1bb819", + "reference": "8a163706bbcac613733dba03f51e13b5eb1bb819", "shasum": "" }, "require": { @@ -11409,7 +12178,11 @@ }, "type": "library", "extra": { + "psalm": { + "pluginClass": "Webmozart\\Assert\\PsalmPlugin" + }, "branch-alias": { + "dev-master": "2.0-dev", "dev-feature/2-0": "2.0-dev" } }, @@ -11440,15 +12213,14 @@ ], "support": { "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/2.1.5" + "source": "https://github.com/webmozarts/assert/tree/2.5.0" }, - "time": "2026-02-18T14:09:36+00:00" + "time": "2026-10-05T23:14:19+00:00" } ], "aliases": [], - "minimum-stability": "dev", + "minimum-stability": "stable", "stability-flags": { - "larastan/larastan": 20, "roave/security-advisories": 20 }, "prefer-stable": true, diff --git a/public/docs/collection.json b/public/docs/collection.json index 89305bd..5bc11cf 100644 --- a/public/docs/collection.json +++ b/public/docs/collection.json @@ -5,12 +5,12 @@ "key": "baseUrl", "type": "string", "name": "string", - "value": "http:\/\/kit.test" + "value": "http:\/\/localhost" } ], "info": { "name": "Laravel API Documentation", - "_postman_id": "832787c5-41fd-49c5-a4fd-2328037fd698", + "_postman_id": "321e1488-584c-4409-a7b7-111dc489b0ee", "description": "", "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json" }, @@ -56,7 +56,7 @@ { "header": [], "code": 201, - "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Justina Gaylord\",\"email\":\"lafayette.considine@example.com\",\"email_verified_at\":\"2026-02-23T19:05:13+00:00\",\"created_at\":null,\"updated_at\":null}},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", + "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Justina Gaylord\",\"email\":\"lafayette.considine@example.com\",\"email_verified_at\":\"2026-10-20T09:17:41+00:00\",\"created_at\":null,\"updated_at\":null}},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", "name": "Registration succeeded." }, { @@ -100,7 +100,7 @@ { "header": [], "code": 200, - "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Justina Gaylord\",\"email\":\"cormier.nick@example.com\",\"email_verified_at\":\"2026-02-23T19:05:13+00:00\",\"created_at\":null,\"updated_at\":null}},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", + "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Justina Gaylord\",\"email\":\"cormier.nick@example.com\",\"email_verified_at\":\"2026-10-20T09:17:41+00:00\",\"created_at\":null,\"updated_at\":null}},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", "name": "Login succeeded." }, { @@ -138,7 +138,7 @@ { "header": [], "code": 200, - "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Morgan Hirthe\",\"email\":\"dare.emelie@example.com\",\"email_verified_at\":\"2026-02-23T19:05:13+00:00\",\"created_at\":null,\"updated_at\":null}}}", + "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Morgan Hirthe\",\"email\":\"dare.emelie@example.com\",\"email_verified_at\":\"2026-10-20T09:17:41+00:00\",\"created_at\":null,\"updated_at\":null}}}", "name": "Authenticated user profile." }, { @@ -287,7 +287,7 @@ { "id": "token_id", "key": "token_id", - "value": "42", + "value": 42, "description": "Personal access token id." } ] @@ -433,7 +433,7 @@ "query": [ { "key": "email", - "value": "jane%40example.com", + "value": "jane@example.com", "description": "Account email from the reset link.", "disabled": false } diff --git a/public/docs/index.html b/public/docs/index.html index c42dbcd..8375d14 100644 --- a/public/docs/index.html +++ b/public/docs/index.html @@ -26,13 +26,13 @@ - + - + @@ -133,7 +133,7 @@ @@ -142,7 +142,7 @@

Introduction

This documentation aims to provide all the information you need to work with our API.
 
@@ -172,7 +172,7 @@ 

Register

curl --request POST \
-    "http://kit.test/v1/auth/register" \
+    "http://localhost/v1/auth/register" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
     --data "{
@@ -186,7 +186,7 @@ 

Register

const url = new URL(
-    "http://kit.test/v1/auth/register"
+    "http://localhost/v1/auth/register"
 );
 
 const headers = {
@@ -222,7 +222,7 @@ 

Register

"attributes": { "name": "Justina Gaylord", "email": "lafayette.considine@example.com", - "email_verified_at": "2026-02-23T19:05:13+00:00", + "email_verified_at": "2026-10-20T09:17:41+00:00", "created_at": null, "updated_at": null } @@ -384,7 +384,7 @@

Login

curl --request POST \
-    "http://kit.test/v1/auth/login" \
+    "http://localhost/v1/auth/login" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
     --data "{
@@ -397,7 +397,7 @@ 

Login

const url = new URL(
-    "http://kit.test/v1/auth/login"
+    "http://localhost/v1/auth/login"
 );
 
 const headers = {
@@ -432,7 +432,7 @@ 

Login

"attributes": { "name": "Justina Gaylord", "email": "cormier.nick@example.com", - "email_verified_at": "2026-02-23T19:05:13+00:00", + "email_verified_at": "2026-10-20T09:17:41+00:00", "created_at": null, "updated_at": null } @@ -583,7 +583,7 @@

Get Current User

curl --request GET \
-    --get "http://kit.test/v1/auth/me" \
+    --get "http://localhost/v1/auth/me" \
     --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -591,7 +591,7 @@

Get Current User

const url = new URL(
-    "http://kit.test/v1/auth/me"
+    "http://localhost/v1/auth/me"
 );
 
 const headers = {
@@ -620,7 +620,7 @@ 

Get Current User

"attributes": { "name": "Morgan Hirthe", "email": "dare.emelie@example.com", - "email_verified_at": "2026-02-23T19:05:13+00:00", + "email_verified_at": "2026-10-20T09:17:41+00:00", "created_at": null, "updated_at": null } @@ -736,7 +736,7 @@

Logout

curl --request POST \
-    "http://kit.test/v1/auth/logout" \
+    "http://localhost/v1/auth/logout" \
     --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -744,7 +744,7 @@

Logout

const url = new URL(
-    "http://kit.test/v1/auth/logout"
+    "http://localhost/v1/auth/logout"
 );
 
 const headers = {
@@ -876,7 +876,7 @@ 

List Tokens

curl --request GET \
-    --get "http://kit.test/v1/auth/tokens" \
+    --get "http://localhost/v1/auth/tokens" \
     --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -884,7 +884,7 @@

List Tokens

const url = new URL(
-    "http://kit.test/v1/auth/tokens"
+    "http://localhost/v1/auth/tokens"
 );
 
 const headers = {
@@ -1045,7 +1045,7 @@ 

Revoke All Tokens

curl --request DELETE \
-    "http://kit.test/v1/auth/tokens" \
+    "http://localhost/v1/auth/tokens" \
     --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -1053,7 +1053,7 @@

Revoke All Tokens

const url = new URL(
-    "http://kit.test/v1/auth/tokens"
+    "http://localhost/v1/auth/tokens"
 );
 
 const headers = {
@@ -1194,7 +1194,7 @@ 

Revoke Token

curl --request DELETE \
-    "http://kit.test/v1/auth/tokens/42" \
+    "http://localhost/v1/auth/tokens/42" \
     --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
@@ -1206,7 +1206,7 @@ 

Revoke Token

const url = new URL(
-    "http://kit.test/v1/auth/tokens/42"
+    "http://localhost/v1/auth/tokens/42"
 );
 
 const headers = {
@@ -1387,7 +1387,7 @@ 

Request Password Reset

curl --request POST \
-    "http://kit.test/v1/auth/password/forgot" \
+    "http://localhost/v1/auth/password/forgot" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
     --data "{
@@ -1398,7 +1398,7 @@ 

Request Password Reset

const url = new URL(
-    "http://kit.test/v1/auth/password/forgot"
+    "http://localhost/v1/auth/password/forgot"
 );
 
 const headers = {
@@ -1528,7 +1528,7 @@ 

Reset Password

curl --request POST \
-    "http://kit.test/v1/auth/password/reset" \
+    "http://localhost/v1/auth/password/reset" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
     --data "{
@@ -1542,7 +1542,7 @@ 

Reset Password

const url = new URL(
-    "http://kit.test/v1/auth/password/reset"
+    "http://localhost/v1/auth/password/reset"
 );
 
 const headers = {
@@ -1725,7 +1725,7 @@ 

Read Reset Token Paylo
curl --request GET \
-    --get "http://kit.test/v1/auth/password/reset/reset-token-value?email=jane%40example.com" \
+    --get "http://localhost/v1/auth/password/reset/reset-token-value?email=jane%40example.com" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
     --data "{
@@ -1737,7 +1737,7 @@ 

Read Reset Token Paylo
const url = new URL(
-    "http://kit.test/v1/auth/password/reset/reset-token-value"
+    "http://localhost/v1/auth/password/reset/reset-token-value"
 );
 
 const params = {
@@ -1914,7 +1914,7 @@ 

Verify Email

curl --request GET \
-    --get "http://kit.test/v1/auth/email/verify/01HZX3W3T4J8Q57XNZD5BPHJ92/8c4f4370e5db9b5be6d0f4c95495f49f998fa32a" \
+    --get "http://localhost/v1/auth/email/verify/01HZX3W3T4J8Q57XNZD5BPHJ92/8c4f4370e5db9b5be6d0f4c95495f49f998fa32a" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json" \
     --data "{
@@ -1926,7 +1926,7 @@ 

Verify Email

const url = new URL(
-    "http://kit.test/v1/auth/email/verify/01HZX3W3T4J8Q57XNZD5BPHJ92/8c4f4370e5db9b5be6d0f4c95495f49f998fa32a"
+    "http://localhost/v1/auth/email/verify/01HZX3W3T4J8Q57XNZD5BPHJ92/8c4f4370e5db9b5be6d0f4c95495f49f998fa32a"
 );
 
 const headers = {
@@ -2074,7 +2074,7 @@ 

Body Parameters

value="architecto" data-component="body">
-

The id of an existing record in the users table. Example: architecto

+

Must match an existing stored value. Example: architecto

hash   @@ -2104,7 +2104,7 @@

Send Verific
curl --request POST \
-    "http://kit.test/v1/auth/email/verification-notification" \
+    "http://localhost/v1/auth/email/verification-notification" \
     --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -2112,7 +2112,7 @@

Send Verific
const url = new URL(
-    "http://kit.test/v1/auth/email/verification-notification"
+    "http://localhost/v1/auth/email/verification-notification"
 );
 
 const headers = {
diff --git a/public/docs/js/theme-default-5.7.0.js b/public/docs/js/theme-default-5.11.0.js
similarity index 100%
rename from public/docs/js/theme-default-5.7.0.js
rename to public/docs/js/theme-default-5.11.0.js
diff --git a/public/docs/js/tryitout-5.7.0.js b/public/docs/js/tryitout-5.11.0.js
similarity index 100%
rename from public/docs/js/tryitout-5.7.0.js
rename to public/docs/js/tryitout-5.11.0.js
diff --git a/public/docs/openapi.yaml b/public/docs/openapi.yaml
index 79a478a..c53dc77 100644
--- a/public/docs/openapi.yaml
+++ b/public/docs/openapi.yaml
@@ -5,7 +5,7 @@ info:
   version: 1.0.0
 servers:
   -
-    url: 'http://kit.test'
+    url: 'http://localhost'
 tags:
   -
     name: Authentication
@@ -40,7 +40,7 @@ paths:
                     attributes:
                       name: 'Justina Gaylord'
                       email: lafayette.considine@example.com
-                      email_verified_at: '2026-02-23T19:05:13+00:00'
+                      email_verified_at: '2026-10-20T09:17:41+00:00'
                       created_at: null
                       updated_at: null
                   meta:
@@ -68,7 +68,7 @@ paths:
                             example: lafayette.considine@example.com
                           email_verified_at:
                             type: string
-                            example: '2026-02-23T19:05:13+00:00'
+                            example: '2026-10-20T09:17:41+00:00'
                           created_at:
                             type: string
                             example: null
@@ -164,7 +164,7 @@ paths:
                     attributes:
                       name: 'Justina Gaylord'
                       email: cormier.nick@example.com
-                      email_verified_at: '2026-02-23T19:05:13+00:00'
+                      email_verified_at: '2026-10-20T09:17:41+00:00'
                       created_at: null
                       updated_at: null
                   meta:
@@ -192,7 +192,7 @@ paths:
                             example: cormier.nick@example.com
                           email_verified_at:
                             type: string
-                            example: '2026-02-23T19:05:13+00:00'
+                            example: '2026-10-20T09:17:41+00:00'
                           created_at:
                             type: string
                             example: null
@@ -478,7 +478,7 @@ paths:
               properties:
                 id:
                   type: string
-                  description: 'The id of an existing record in the users table.'
+                  description: 'Must match an existing stored value.'
                   example: architecto
                 hash:
                   type: string
@@ -525,7 +525,7 @@ paths:
                     attributes:
                       name: 'Morgan Hirthe'
                       email: dare.emelie@example.com
-                      email_verified_at: '2026-02-23T19:05:13+00:00'
+                      email_verified_at: '2026-10-20T09:17:41+00:00'
                       created_at: null
                       updated_at: null
                 properties:
@@ -549,7 +549,7 @@ paths:
                             example: dare.emelie@example.com
                           email_verified_at:
                             type: string
-                            example: '2026-02-23T19:05:13+00:00'
+                            example: '2026-10-20T09:17:41+00:00'
                           created_at:
                             type: string
                             example: null

From 7659aa0276ef1b02f5fdb900f2353e64c59273b2 Mon Sep 17 00:00:00 2001
From: Steve McDougall 
Date: Tue, 20 Oct 2026 10:22:49 +0100
Subject: [PATCH 02/10] feat: adopt api-toolbox for errors, idempotency,
 deprecation and request ids

Every API error is now RFC 9457 problem details typed from the
apiguide.dev catalogue. Kit's own messages stay translated: they are
mapped onto the exceptions api-toolbox renders and arrive as the
problem's detail. The exception callbacks keep only the security audit
log.

Kit's hand-rolled middleware gives way to the package:

- IdempotencyKey becomes `idempotent`, with locking for in-flight
  retries; a reused key with a different payload is now 422, and the
  Idempotency-Replayed header is gone, as the draft defines none.
- Sunset becomes #[Deprecation] and #[Sunset] on the controller.
  RetireSunsetEndpoints keeps kit's 410 after the sunset date, reading
  the same attributes.
- AttachRequestId becomes Negotiation request IDs (UUIDv7) with W3C
  trace context, and problems carry the ID as their instance.
- EnsureJsonApiRequest becomes `consumes:application/json`; its
  security headers move to AddSecurityHeaders.

Guests are no longer redirected to a login route that does not exist,
which forcing Accept: application/json used to hide.
---
 .env.example                                  |   2 +-
 .scribe/endpoints.cache/00.yaml               |   6 +-
 .scribe/endpoints/00.yaml                     |   6 +-
 .../Api/V1/Auth/DeleteTokenController.php     |   9 +-
 app/Http/Middleware/AddSecurityHeaders.php    |  26 ++++
 app/Http/Middleware/AttachRequestId.php       |  42 ------
 .../Middleware/EnforceTransportSecurity.php   |   5 +-
 app/Http/Middleware/EnsureJsonApiRequest.php  |  46 ------
 app/Http/Middleware/IdempotencyKey.php        |  99 ------------
 app/Http/Middleware/RetireSunsetEndpoints.php |  43 ++++++
 app/Http/Middleware/Sunset.php                |  57 -------
 app/Support/SecurityAudit.php                 |   7 +-
 bootstrap/app.php                             | 142 ++++++++----------
 composer.json                                 |   1 +
 composer.lock                                 |  68 ++++++++-
 config/api-toolbox.php                        | 100 ++++++++++++
 config/idempotency.php                        |   7 -
 lang/en/api.php                               |   4 -
 lang/es/api.php                               |   4 -
 public/docs/collection.json                   |   8 +-
 public/docs/index.html                        |   6 +-
 public/docs/openapi.yaml                      |  12 +-
 routes/api/routes.php                         |   2 +-
 routes/api/v1.php                             |   4 +-
 tests/Feature/ApiSecurityHardeningTest.php    |  42 ++++--
 tests/Feature/AuthSecurityTest.php            |  12 +-
 tests/Feature/AuthTokenManagementTest.php     |  24 +--
 tests/Feature/DeprecationTest.php             |  80 ++++++++++
 tests/Feature/IdempotencyKeyTest.php          |  54 ++++---
 tests/Feature/LocalizationTest.php            |  32 ++--
 tests/Feature/RequestIdMiddlewareTest.php     |  39 ++---
 tests/Feature/SunsetMiddlewareTest.php        |  64 --------
 .../TransportSecurityMiddlewareTest.php       |   8 +-
 33 files changed, 537 insertions(+), 524 deletions(-)
 create mode 100644 app/Http/Middleware/AddSecurityHeaders.php
 delete mode 100644 app/Http/Middleware/AttachRequestId.php
 delete mode 100644 app/Http/Middleware/EnsureJsonApiRequest.php
 delete mode 100644 app/Http/Middleware/IdempotencyKey.php
 create mode 100644 app/Http/Middleware/RetireSunsetEndpoints.php
 delete mode 100644 app/Http/Middleware/Sunset.php
 create mode 100644 config/api-toolbox.php
 delete mode 100644 config/idempotency.php
 create mode 100644 tests/Feature/DeprecationTest.php
 delete mode 100644 tests/Feature/SunsetMiddlewareTest.php

diff --git a/.env.example b/.env.example
index a708d6b..97a107b 100644
--- a/.env.example
+++ b/.env.example
@@ -4,7 +4,7 @@ APP_KEY=
 APP_DEBUG=true
 APP_URL=http://localhost
 SANCTUM_EXPIRATION=120
-IDEMPOTENCY_TTL_MINUTES=10
+IDEMPOTENCY_TTL=86400
 SECURITY_FORCE_HTTPS=false
 SECURITY_HSTS_ENABLED=true
 SECURITY_HSTS_MAX_AGE=31536000
diff --git a/.scribe/endpoints.cache/00.yaml b/.scribe/endpoints.cache/00.yaml
index 2f6ff97..afb300c 100644
--- a/.scribe/endpoints.cache/00.yaml
+++ b/.scribe/endpoints.cache/00.yaml
@@ -80,7 +80,7 @@ endpoints:
       -
         custom: []
         status: 201
-        content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:17:41+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}'
+        content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:22:40+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}'
         headers: []
         description: 'Registration succeeded.'
       -
@@ -159,7 +159,7 @@ endpoints:
       -
         custom: []
         status: 200
-        content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:17:41+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}'
+        content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:22:40+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}'
         headers: []
         description: 'Login succeeded.'
       -
@@ -519,7 +519,7 @@ endpoints:
       -
         custom: []
         status: 200
-        content: '{"data":{"id":"","type":"users","attributes":{"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:17:41+00:00","created_at":null,"updated_at":null}}}'
+        content: '{"data":{"id":"","type":"users","attributes":{"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:22:40+00:00","created_at":null,"updated_at":null}}}'
         headers: []
         description: 'Authenticated user profile.'
       -
diff --git a/.scribe/endpoints/00.yaml b/.scribe/endpoints/00.yaml
index 77e630f..f4868c7 100644
--- a/.scribe/endpoints/00.yaml
+++ b/.scribe/endpoints/00.yaml
@@ -78,7 +78,7 @@ endpoints:
       -
         custom: []
         status: 201
-        content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:17:41+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}'
+        content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:22:40+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}'
         headers: []
         description: 'Registration succeeded.'
       -
@@ -157,7 +157,7 @@ endpoints:
       -
         custom: []
         status: 200
-        content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:17:41+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}'
+        content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:22:40+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}'
         headers: []
         description: 'Login succeeded.'
       -
@@ -517,7 +517,7 @@ endpoints:
       -
         custom: []
         status: 200
-        content: '{"data":{"id":"","type":"users","attributes":{"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:17:41+00:00","created_at":null,"updated_at":null}}}'
+        content: '{"data":{"id":"","type":"users","attributes":{"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:22:40+00:00","created_at":null,"updated_at":null}}}'
         headers: []
         description: 'Authenticated user profile.'
       -
diff --git a/app/Http/Controllers/Api/V1/Auth/DeleteTokenController.php b/app/Http/Controllers/Api/V1/Auth/DeleteTokenController.php
index f33a6f3..9613db5 100644
--- a/app/Http/Controllers/Api/V1/Auth/DeleteTokenController.php
+++ b/app/Http/Controllers/Api/V1/Auth/DeleteTokenController.php
@@ -9,7 +9,6 @@
 use App\Models\User;
 use App\Support\SecurityAudit;
 use Illuminate\Container\Attributes\CurrentUser;
-use Illuminate\Http\JsonResponse;
 use Illuminate\Http\Response;
 use Knuckles\Scribe\Attributes\Authenticated;
 use Knuckles\Scribe\Attributes\Endpoint;
@@ -29,22 +28,20 @@
 #[ScribeResponse(content: ['message' => 'Unauthenticated.'], status: 401, description: 'Authentication failed.')]
 final class DeleteTokenController
 {
-    public function __invoke(DeleteTokenRequest $request, #[CurrentUser] User $user): Response|JsonResponse
+    public function __invoke(DeleteTokenRequest $request, #[CurrentUser] User $user): Response
     {
         $payload = DeleteTokenPayload::fromReqest($request);
 
         $token = $user->tokens()->whereKey($payload->tokenId)->first();
 
-        if (! $token) {
+        if ( ! $token) {
             SecurityAudit::log('auth.tokens.revoke_failed', [
                 'user_id' => (string) $user->getKey(),
                 'token_id' => (string) $payload->tokenId,
                 'reason' => 'not_found',
             ]);
 
-            return new JsonResponse([
-                'message' => __('api.auth.token_not_found'),
-            ], 404);
+            abort(404, __('api.auth.token_not_found'));
         }
 
         SecurityAudit::log('auth.tokens.revoked', [
diff --git a/app/Http/Middleware/AddSecurityHeaders.php b/app/Http/Middleware/AddSecurityHeaders.php
new file mode 100644
index 0000000..9fbf382
--- /dev/null
+++ b/app/Http/Middleware/AddSecurityHeaders.php
@@ -0,0 +1,26 @@
+headers->set('X-Content-Type-Options', 'nosniff');
+        $response->headers->set('X-Frame-Options', 'DENY');
+        $response->headers->set('Referrer-Policy', 'no-referrer');
+
+        return $response;
+    }
+}
diff --git a/app/Http/Middleware/AttachRequestId.php b/app/Http/Middleware/AttachRequestId.php
deleted file mode 100644
index 3af79fc..0000000
--- a/app/Http/Middleware/AttachRequestId.php
+++ /dev/null
@@ -1,42 +0,0 @@
-resolveRequestId((string) $request->headers->get('X-Request-Id', ''));
-
-        $request->attributes->set('request_id', $requestId);
-        $request->headers->set('X-Request-Id', $requestId);
-        Log::withContext(['request_id' => $requestId]);
-
-        $response = $next($request);
-        $response->headers->set('X-Request-Id', $requestId);
-
-        return $response;
-    }
-
-    private function resolveRequestId(string $candidate): string
-    {
-        $candidate = trim($candidate);
-
-        if ($candidate !== '' && preg_match('/^[A-Za-z0-9._-]{8,128}$/', $candidate) === 1) {
-            return $candidate;
-        }
-
-        return (string) Str::uuid();
-    }
-}
diff --git a/app/Http/Middleware/EnforceTransportSecurity.php b/app/Http/Middleware/EnforceTransportSecurity.php
index 90130de..6c239d1 100644
--- a/app/Http/Middleware/EnforceTransportSecurity.php
+++ b/app/Http/Middleware/EnforceTransportSecurity.php
@@ -5,7 +5,6 @@
 namespace App\Http\Middleware;
 
 use Closure;
-use Illuminate\Http\JsonResponse;
 use Illuminate\Http\Request;
 use Symfony\Component\HttpFoundation\Response;
 
@@ -17,9 +16,7 @@ final class EnforceTransportSecurity
     public function handle(Request $request, Closure $next): Response
     {
         if ((bool) config('security.force_https', false) && ! $request->isSecure()) {
-            return new JsonResponse([
-                'message' => __('api.errors.https_required'),
-            ], 400);
+            abort(400, __('api.errors.https_required'));
         }
 
         $response = $next($request);
diff --git a/app/Http/Middleware/EnsureJsonApiRequest.php b/app/Http/Middleware/EnsureJsonApiRequest.php
deleted file mode 100644
index 11a87c2..0000000
--- a/app/Http/Middleware/EnsureJsonApiRequest.php
+++ /dev/null
@@ -1,46 +0,0 @@
-headers->set('Accept', 'application/json');
-
-        if ($this->hasRequestPayload($request) && ! $request->isJson()) {
-            return new JsonResponse([
-                'message' => __('api.errors.unsupported_media_type'),
-            ], Response::HTTP_UNSUPPORTED_MEDIA_TYPE);
-        }
-
-        $response = $next($request);
-
-        // Baseline response hardening headers for API traffic.
-        $response->headers->set('X-Content-Type-Options', 'nosniff');
-        $response->headers->set('X-Frame-Options', 'DENY');
-        $response->headers->set('Referrer-Policy', 'no-referrer');
-
-        return $response;
-    }
-
-    private function hasRequestPayload(Request $request): bool
-    {
-        if (! in_array($request->method(), ['POST', 'PUT', 'PATCH', 'DELETE'], true)) {
-            return false;
-        }
-
-        return $request->getContent() !== '' || $request->request->count() > 0;
-    }
-}
diff --git a/app/Http/Middleware/IdempotencyKey.php b/app/Http/Middleware/IdempotencyKey.php
deleted file mode 100644
index f338942..0000000
--- a/app/Http/Middleware/IdempotencyKey.php
+++ /dev/null
@@ -1,99 +0,0 @@
-headers->get('Idempotency-Key', ''));
-
-        if ($idempotencyKey === '') {
-            return $next($request);
-        }
-
-        if (preg_match('/^[A-Za-z0-9._:-]{8,128}$/', $idempotencyKey) !== 1) {
-            return new JsonResponse([
-                'message' => __('api.errors.idempotency_key_invalid'),
-            ], 422);
-        }
-
-        $cacheKey = $this->cacheKey($request, $idempotencyKey);
-        $requestHash = $this->requestHash($request);
-        $cached = Cache::get($cacheKey);
-
-        if (is_array($cached)) {
-            if (($cached['request_hash'] ?? null) !== $requestHash) {
-                return new JsonResponse([
-                    'message' => __('api.errors.idempotency_key_conflict'),
-                ], 409);
-            }
-
-            $response = new Response(
-                (string) ($cached['body'] ?? ''),
-                (int) ($cached['status'] ?? 200),
-            );
-
-            $contentType = $cached['content_type'] ?? null;
-            if (is_string($contentType) && $contentType !== '') {
-                $response->headers->set('Content-Type', $contentType);
-            }
-
-            $response->headers->set('Idempotency-Key', $idempotencyKey);
-            $response->headers->set('Idempotency-Replayed', 'true');
-
-            return $response;
-        }
-
-        $response = $next($request);
-
-        if ($this->shouldCacheResponse($response)) {
-            $ttl = max((int) config('idempotency.ttl_minutes', 10), 1);
-
-            Cache::put($cacheKey, [
-                'request_hash' => $requestHash,
-                'status' => $response->getStatusCode(),
-                'body' => $response->getContent() ?: '',
-                'content_type' => $response->headers->get('Content-Type'),
-            ], now()->addMinutes($ttl));
-        }
-
-        $response->headers->set('Idempotency-Key', $idempotencyKey);
-
-        return $response;
-    }
-
-    private function cacheKey(Request $request, string $idempotencyKey): string
-    {
-        $scope = (string) ($request->user()?->getAuthIdentifier() ?? $request->ip());
-        $routeName = (string) ($request->route()?->getName() ?? $request->path());
-
-        return 'idempotency:'.sha1(sprintf('%s|%s|%s', $scope, $routeName, $idempotencyKey));
-    }
-
-    private function requestHash(Request $request): string
-    {
-        return hash('sha256', implode('|', [
-            $request->method(),
-            $request->path(),
-            $request->getContent(),
-        ]));
-    }
-
-    private function shouldCacheResponse(Response $response): bool
-    {
-        return $response->getStatusCode() >= 200
-            && $response->getStatusCode() < 300;
-    }
-}
diff --git a/app/Http/Middleware/RetireSunsetEndpoints.php b/app/Http/Middleware/RetireSunsetEndpoints.php
new file mode 100644
index 0000000..4f4e918
--- /dev/null
+++ b/app/Http/Middleware/RetireSunsetEndpoints.php
@@ -0,0 +1,43 @@
+route();
+
+        if ($route instanceof Route) {
+            $sunsetAt = $this->deprecations->forRoute($route)?->sunsetAt;
+
+            if (null !== $sunsetAt && $sunsetAt <= new DateTimeImmutable('now')) {
+                abort(Response::HTTP_GONE, __('api.sunset.endpoint_unavailable'));
+            }
+        }
+
+        return $next($request);
+    }
+}
diff --git a/app/Http/Middleware/Sunset.php b/app/Http/Middleware/Sunset.php
deleted file mode 100644
index 256f3f0..0000000
--- a/app/Http/Middleware/Sunset.php
+++ /dev/null
@@ -1,57 +0,0 @@
-utc();
-        $isExpired = now()->greaterThanOrEqualTo($sunsetDate);
-        $shouldEnforce = filter_var($enforceAfterSunset, FILTER_VALIDATE_BOOL);
-
-        if ($isExpired && $shouldEnforce) {
-            $response = new JsonResponse([
-                'message' => __('api.sunset.endpoint_unavailable'),
-                'sunset_at' => $sunsetDate->toAtomString(),
-            ], Response::HTTP_GONE);
-
-            return $this->attachHeaders($response, $sunsetDate, $successorUrl);
-        }
-
-        $response = $next($request);
-
-        return $this->attachHeaders($response, $sunsetDate, $successorUrl);
-    }
-
-    private function attachHeaders(Response $response, CarbonImmutable $sunsetDate, ?string $successorUrl): Response
-    {
-        // RFC 9745 syntax for Deprecation supports epoch prefixed with @.
-        $response->headers->set('Deprecation', '@'.$sunsetDate->timestamp);
-        $response->headers->set('Sunset', $sunsetDate->format('D, d M Y H:i:s').' GMT');
-
-        if ($successorUrl && filter_var($successorUrl, FILTER_VALIDATE_URL)) {
-            $linkValue = sprintf('<%s>; rel="successor-version"', $successorUrl);
-            $existingLink = $response->headers->get('Link');
-            $response->headers->set('Link', $existingLink ? $existingLink.', '.$linkValue : $linkValue);
-        }
-
-        return $response;
-    }
-}
diff --git a/app/Support/SecurityAudit.php b/app/Support/SecurityAudit.php
index 4a7245f..55d955e 100644
--- a/app/Support/SecurityAudit.php
+++ b/app/Support/SecurityAudit.php
@@ -6,6 +6,7 @@
 
 use Illuminate\Http\Request;
 use Illuminate\Support\Facades\Log;
+use JustSteveKing\Toolbox\Contracts\RequestIdentifier;
 
 final class SecurityAudit
 {
@@ -26,7 +27,7 @@ public static function log(string $event, array $context = []): void
 
     public static function hashEmail(string $email): string
     {
-        return hash('sha256', mb_strtolower(trim($email)));
+        return hash('sha256', mb_strtolower(mb_trim($email)));
     }
 
     /**
@@ -34,7 +35,7 @@ public static function hashEmail(string $email): string
      */
     private static function requestContext(): array
     {
-        if (! app()->bound('request')) {
+        if ( ! app()->bound('request')) {
             return [];
         }
 
@@ -42,7 +43,7 @@ private static function requestContext(): array
         $request = app('request');
 
         return [
-            'request_id' => $request->attributes->get('request_id'),
+            'request_id' => app()->bound(RequestIdentifier::class) ? app(RequestIdentifier::class)->current() : null,
             'ip' => $request->ip(),
             'method' => $request->method(),
             'path' => $request->path(),
diff --git a/bootstrap/app.php b/bootstrap/app.php
index 1f92ed8..a67f1aa 100644
--- a/bootstrap/app.php
+++ b/bootstrap/app.php
@@ -2,19 +2,17 @@
 
 declare(strict_types=1);
 
-use App\Http\Middleware\AttachRequestId;
-use App\Http\Middleware\EnsureJsonApiRequest;
+use App\Http\Middleware\AddSecurityHeaders;
 use App\Http\Middleware\EnforceTransportSecurity;
-use App\Http\Middleware\IdempotencyKey;
+use App\Http\Middleware\RetireSunsetEndpoints;
 use App\Http\Middleware\SetRequestLocale;
-use App\Http\Middleware\Sunset;
 use App\Support\SecurityAudit;
 use Illuminate\Auth\Access\AuthorizationException;
 use Illuminate\Auth\AuthenticationException;
 use Illuminate\Foundation\Application;
 use Illuminate\Foundation\Configuration\Exceptions;
 use Illuminate\Foundation\Configuration\Middleware;
-use Illuminate\Http\JsonResponse;
+use Illuminate\Http\Exceptions\ThrottleRequestsException;
 use Illuminate\Http\Request;
 use Illuminate\Routing\Exceptions\InvalidSignatureException;
 use Illuminate\Validation\ValidationException;
@@ -34,112 +32,96 @@
         $middleware->alias([
             'abilities' => CheckAbilities::class,
             'ability' => CheckForAnyAbility::class,
-            'idempotency' => IdempotencyKey::class,
-            'sunset' => Sunset::class,
         ]);
 
+        // There is no login page to send a guest to; a 401 problem is the whole answer.
+        $middleware->redirectGuestsTo(static fn(): ?string => null);
+
         $trustedProxies = (string) env('TRUSTED_PROXIES', '*');
-        $middleware->trustProxies($trustedProxies !== '' ? $trustedProxies : null);
+        $middleware->trustProxies('' !== $trustedProxies ? $trustedProxies : null);
 
         $trustedHosts = array_values(array_filter(array_map(
-            static fn (string $host): string => trim($host),
+            static fn(string $host): string => mb_trim($host),
             explode(',', (string) env('TRUSTED_HOSTS', '')),
         )));
-        if ($trustedHosts !== []) {
+        if ([] !== $trustedHosts) {
             $middleware->trustHosts(at: $trustedHosts, subdomains: false);
         }
 
-        $middleware->prependToGroup('api', EnsureJsonApiRequest::class);
+        $middleware->prependToGroup('api', AddSecurityHeaders::class);
         $middleware->prependToGroup('api', EnforceTransportSecurity::class);
         $middleware->prependToGroup('api', SetRequestLocale::class);
-        $middleware->prependToGroup('api', AttachRequestId::class);
+        $middleware->appendToGroup('api', RetireSunsetEndpoints::class);
     })
     ->withExceptions(function (Exceptions $exceptions): void {
-        $exceptions->render(function (AuthenticationException $exception, Request $request): ?JsonResponse {
-            if (! $request->expectsJson()) {
-                return null;
-            }
-
-            SecurityAudit::log('auth.unauthenticated', [
-                'guard' => 'sanctum',
-            ]);
-
-            return new JsonResponse([
-                'message' => __('api.errors.unauthenticated'),
-            ], 401);
-        });
-
-        $exceptions->render(function (AuthorizationException $exception, Request $request): ?JsonResponse {
-            if (! $request->expectsJson()) {
-                return null;
-            }
-
-            SecurityAudit::log('auth.forbidden', [
-                'exception' => $exception::class,
-            ]);
-
-            return new JsonResponse([
-                'message' => __('api.errors.forbidden'),
-            ], 403);
-        });
-
-        $exceptions->render(function (AccessDeniedHttpException $exception, Request $request): ?JsonResponse {
-            if (! $request->expectsJson()) {
-                return null;
+        // api-toolbox renders every API error as RFC 9457 problem details. These maps only swap
+        // in a translated message, which becomes the problem's "detail"; the type is unchanged.
+        $exceptions->map(AuthenticationException::class, static fn(AuthenticationException $exception): AuthenticationException => new AuthenticationException(
+            __('api.errors.unauthenticated'),
+            $exception->guards(),
+        ));
+
+        $exceptions->map(AuthorizationException::class, static fn(AuthorizationException $exception): AccessDeniedHttpException => new AccessDeniedHttpException(
+            __('api.errors.forbidden'),
+            $exception,
+        ));
+
+        $exceptions->map(InvalidSignatureException::class, static fn(InvalidSignatureException $exception): AccessDeniedHttpException => new AccessDeniedHttpException(
+            __('api.auth.invalid_verification_link'),
+            $exception,
+        ));
+
+        $exceptions->map(ThrottleRequestsException::class, static fn(ThrottleRequestsException $exception): ThrottleRequestsException => new ThrottleRequestsException(
+            __('api.errors.too_many_requests'),
+            $exception,
+            $exception->getHeaders(),
+        ));
+
+        // Audit callbacks run before api-toolbox's renderer and return null, so the problem
+        // response is still the package's.
+        $exceptions->render(function (AuthenticationException $exception, Request $request): null {
+            if ($request->expectsJson()) {
+                SecurityAudit::log('auth.unauthenticated', [
+                    'guard' => 'sanctum',
+                ]);
             }
 
-            SecurityAudit::log('auth.forbidden', [
-                'exception' => $exception::class,
-            ]);
-
-            return new JsonResponse([
-                'message' => __('api.errors.forbidden'),
-            ], 403);
+            return null;
         });
 
-        $exceptions->render(function (TooManyRequestsHttpException $exception, Request $request): ?JsonResponse {
-            if (! $request->expectsJson()) {
+        $exceptions->render(function (AccessDeniedHttpException $exception, Request $request): null {
+            if ( ! $request->expectsJson()) {
                 return null;
             }
 
-            SecurityAudit::log('api.rate_limited');
+            $cause = $exception->getPrevious() ?? $exception;
 
-            $response = new JsonResponse([
-                'message' => __('api.errors.too_many_requests'),
-            ], 429);
-
-            $retryAfter = $exception->getHeaders()['Retry-After'] ?? null;
-            if ($retryAfter !== null) {
-                $response->headers->set('Retry-After', (string) $retryAfter);
+            if ($cause instanceof InvalidSignatureException) {
+                SecurityAudit::log('auth.email_verification.invalid_signature');
+            } else {
+                SecurityAudit::log('auth.forbidden', [
+                    'exception' => $cause::class,
+                ]);
             }
 
-            return $response;
+            return null;
         });
 
-        $exceptions->render(function (ValidationException $exception, Request $request): ?JsonResponse {
-            if (! $request->expectsJson()) {
-                return null;
+        $exceptions->render(function (TooManyRequestsHttpException $exception, Request $request): null {
+            if ($request->expectsJson()) {
+                SecurityAudit::log('api.rate_limited');
             }
 
-            SecurityAudit::log('api.validation_failed', [
-                'errors' => array_keys($exception->errors()),
-            ]);
-
-            return new JsonResponse([
-                'message' => __('api.errors.validation_failed'),
-                'errors' => $exception->errors(),
-            ], $exception->status);
+            return null;
         });
 
-        $exceptions->render(function (InvalidSignatureException $exception, Request $request): ?JsonResponse {
-            if (! $request->expectsJson()) {
-                return null;
+        $exceptions->render(function (ValidationException $exception, Request $request): null {
+            if ($request->expectsJson()) {
+                SecurityAudit::log('api.validation_failed', [
+                    'errors' => array_keys($exception->errors()),
+                ]);
             }
 
-            SecurityAudit::log('auth.email_verification.invalid_signature');
-
-            return new JsonResponse([
-                'message' => __('api.auth.invalid_verification_link'),
-            ], 403);
+            return null;
         });
     })->create();
diff --git a/composer.json b/composer.json
index 13806b6..d033f8a 100644
--- a/composer.json
+++ b/composer.json
@@ -13,6 +13,7 @@
     "license": "MIT",
     "require": {
         "php": "^8.5",
+        "juststeveking/api-toolbox": "^0.2",
         "laravel/framework": "^13.30",
         "laravel/sanctum": "^4.3",
         "laravel/tinker": "^3.0",
diff --git a/composer.lock b/composer.lock
index c60cf71..d26b3dc 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "85e3b9cc1da14fcd4cab4bed78df373f",
+    "content-hash": "03747733f6409bed0295c502afdc1d22",
     "packages": [
         {
             "name": "brick/math",
@@ -1059,6 +1059,72 @@
             ],
             "time": "2026-08-24T17:13:02+00:00"
         },
+        {
+            "name": "juststeveking/api-toolbox",
+            "version": "v0.2.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/JustSteveKing/api-toolbox.git",
+                "reference": "a4f6ee4382450414232f58ff05aab701e212872a"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/JustSteveKing/api-toolbox/zipball/a4f6ee4382450414232f58ff05aab701e212872a",
+                "reference": "a4f6ee4382450414232f58ff05aab701e212872a",
+                "shasum": ""
+            },
+            "require": {
+                "laravel/framework": "^13.30",
+                "php": "^8.3"
+            },
+            "require-dev": {
+                "larastan/larastan": "^3.13",
+                "laravel/pint": "^1.32",
+                "orchestra/testbench": "^11.0",
+                "pestphp/pest": "^4.1 || ^5.0",
+                "pestphp/pest-plugin-laravel": "^4.0 || ^5.0"
+            },
+            "type": "library",
+            "extra": {
+                "laravel": {
+                    "aliases": {
+                        "ApiToolbox": "JustSteveKing\\Toolbox\\Facades\\ApiToolbox"
+                    },
+                    "providers": [
+                        "JustSteveKing\\Toolbox\\ApiToolboxServiceProvider"
+                    ]
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "JustSteveKing\\Toolbox\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Steve McDougall",
+                    "email": "steve@juststeveking.com"
+                }
+            ],
+            "description": "Standards-compliant APIs in Laravel, one RFC at a time.",
+            "keywords": [
+                "api",
+                "http",
+                "laravel",
+                "problem-details",
+                "rfc",
+                "rfc9457"
+            ],
+            "support": {
+                "issues": "https://github.com/JustSteveKing/api-toolbox/issues",
+                "source": "https://github.com/JustSteveKing/api-toolbox/tree/v0.2.0"
+            },
+            "time": "2026-10-15T12:12:47+00:00"
+        },
         {
             "name": "laravel/framework",
             "version": "v13.37.0",
diff --git a/config/api-toolbox.php b/config/api-toolbox.php
new file mode 100644
index 0000000..1c54e9f
--- /dev/null
+++ b/config/api-toolbox.php
@@ -0,0 +1,100 @@
+ [
+        Features::problemDetails([
+            // Where problem type slugs resolve to. Point this at your docs.
+            'type_base_uri' => '/problems',
+            // Paths that always get problem details, whatever the request's Accept header.
+            'paths' => ['v1/*'],
+            // Type plain HTTP errors with the apiguide.dev catalogue rather than about:blank.
+            'apiguide' => true,
+            // The challenge a 401 carries, which RFC 9110 section 15.5.2 says it MUST.
+            'www_authenticate' => 'Bearer',
+        ]),
+        Features::deprecation([
+            // Run on every request; turn off to add the "deprecation" middleware per route instead.
+            'global' => true,
+        ]),
+        Features::conditionalRequests(),
+        Features::pagination(),
+        Features::idempotency([
+            // Seconds a completed response is kept for replay, and so how long a key is valid.
+            // The draft (section 2.5.2) says to publish this in your API documentation.
+            'ttl' => (int) env('IDEMPOTENCY_TTL', 86400),
+        ]),
+        Features::negotiation([
+            // No standard defines a request ID header; this is the common convention. false turns
+            // request IDs off.
+            'request_id_header' => 'X-Request-Id',
+            // Keep a well-formed request ID a proxy or client sent, rather than replace it.
+            'trust_request_id' => true,
+            // W3C Trace Context on every request, and onto outgoing HTTP client requests.
+            'trace_context' => true,
+            'propagate_trace' => true,
+        ]),
+        Features::preferences(),
+        // Off until an endpoint returns 202 Accepted; turning it on adds the status monitor route.
+        // Features::asyncOperations([
+        //     // Where the status monitor lives, and the middleware it runs behind.
+        //     'path' => 'v1/operations',
+        //     'middleware' => ['api', 'auth:sanctum'],
+        //     // Seconds an operation's status is kept after its last change.
+        //     'ttl' => 86400,
+        //     // Retry-After, in seconds, while an operation is still running.
+        //     'retry_after' => 5,
+        // ]),
+        Features::mergePatch(),
+        Features::digests(),
+        Features::messageSignatures([
+            // Keys by keyid. The algorithm belongs to the key; the message never chooses it.
+            'keys' => [
+                // 'webhooks' => ['algorithm' => 'hmac-sha256', 'secret' => env('WEBHOOK_SECRET')],
+                // 'partner' => ['algorithm' => 'ed25519', 'public_key' => storage_path('keys/partner.pem')],
+            ],
+            // What signature.verify requires, beyond RFC 9421 itself.
+            'verify' => [
+                'required' => ['@method', '@authority', '@path'],
+                'max_age' => 300,
+                'leeway' => 30,
+                'cover_content' => true,
+            ],
+            // The key signature.sign uses when none is named.
+            'sign' => ['key' => null],
+        ]),
+        Features::apiCatalog([
+            // Each API: its URL as href, then any of service-desc (a machine-readable description,
+            // such as OpenAPI), service-doc (human documentation), service-meta and status.
+            'apis' => [
+                [
+                    'href' => '/v1',
+                    'service-desc' => ['href' => '/docs/openapi.yaml', 'type' => 'application/vnd.oai.openapi'],
+                    'service-doc' => ['href' => '/docs', 'type' => 'text/html'],
+                ],
+            ],
+            // Other API catalogs this one links to.
+            'catalogs' => [],
+            'max_age' => 3600,
+            // RFC 9727, section 8 recommends rate limiting the catalog, such as ['throttle:60,1'].
+            'middleware' => ['throttle:60,1'],
+        ]),
+        // Experimental: built on an IETF draft that can still change.
+        // Features::rateLimitHeaders(),
+    ],
+
+];
diff --git a/config/idempotency.php b/config/idempotency.php
deleted file mode 100644
index 5b5ea18..0000000
--- a/config/idempotency.php
+++ /dev/null
@@ -1,7 +0,0 @@
- (int) env('IDEMPOTENCY_TTL_MINUTES', 10),
-];
diff --git a/lang/en/api.php b/lang/en/api.php
index 614d32d..0ce9534 100644
--- a/lang/en/api.php
+++ b/lang/en/api.php
@@ -21,11 +21,7 @@
         'unauthenticated' => 'Unauthenticated.',
         'forbidden' => 'Forbidden.',
         'too_many_requests' => 'Too many requests. Please try again later.',
-        'validation_failed' => 'The given data was invalid.',
         'https_required' => 'HTTPS is required for this endpoint.',
-        'unsupported_media_type' => 'Unsupported media type. Use application/json request bodies.',
-        'idempotency_key_invalid' => 'Invalid Idempotency-Key header format.',
-        'idempotency_key_conflict' => 'Idempotency-Key was already used with a different request payload.',
     ],
     'sunset' => [
         'endpoint_unavailable' => 'This endpoint has been sunset and is no longer available.',
diff --git a/lang/es/api.php b/lang/es/api.php
index dad7098..f295222 100644
--- a/lang/es/api.php
+++ b/lang/es/api.php
@@ -21,11 +21,7 @@
         'unauthenticated' => 'No autenticado.',
         'forbidden' => 'Prohibido.',
         'too_many_requests' => 'Demasiadas solicitudes. Intentalo de nuevo mas tarde.',
-        'validation_failed' => 'Los datos proporcionados no son validos.',
         'https_required' => 'HTTPS es obligatorio para este endpoint.',
-        'unsupported_media_type' => 'Tipo de contenido no compatible. Usa cuerpos de solicitud application/json.',
-        'idempotency_key_invalid' => 'Formato de cabecera Idempotency-Key invalido.',
-        'idempotency_key_conflict' => 'Idempotency-Key ya fue usado con un payload diferente.',
     ],
     'sunset' => [
         'endpoint_unavailable' => 'Este endpoint ha sido retirado y ya no esta disponible.',
diff --git a/public/docs/collection.json b/public/docs/collection.json
index 5bc11cf..6c14fbd 100644
--- a/public/docs/collection.json
+++ b/public/docs/collection.json
@@ -10,7 +10,7 @@
     ],
     "info": {
         "name": "Laravel API Documentation",
-        "_postman_id": "321e1488-584c-4409-a7b7-111dc489b0ee",
+        "_postman_id": "158e8ae1-0442-4201-9f3b-bf74e85b4f13",
         "description": "",
         "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json"
     },
@@ -56,7 +56,7 @@
                                 {
                                     "header": [],
                                     "code": 201,
-                                    "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Justina Gaylord\",\"email\":\"lafayette.considine@example.com\",\"email_verified_at\":\"2026-10-20T09:17:41+00:00\",\"created_at\":null,\"updated_at\":null}},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}",
+                                    "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Justina Gaylord\",\"email\":\"lafayette.considine@example.com\",\"email_verified_at\":\"2026-10-20T09:22:40+00:00\",\"created_at\":null,\"updated_at\":null}},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}",
                                     "name": "Registration succeeded."
                                 },
                                 {
@@ -100,7 +100,7 @@
                                 {
                                     "header": [],
                                     "code": 200,
-                                    "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Justina Gaylord\",\"email\":\"cormier.nick@example.com\",\"email_verified_at\":\"2026-10-20T09:17:41+00:00\",\"created_at\":null,\"updated_at\":null}},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}",
+                                    "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Justina Gaylord\",\"email\":\"cormier.nick@example.com\",\"email_verified_at\":\"2026-10-20T09:22:40+00:00\",\"created_at\":null,\"updated_at\":null}},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}",
                                     "name": "Login succeeded."
                                 },
                                 {
@@ -138,7 +138,7 @@
                                 {
                                     "header": [],
                                     "code": 200,
-                                    "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Morgan Hirthe\",\"email\":\"dare.emelie@example.com\",\"email_verified_at\":\"2026-10-20T09:17:41+00:00\",\"created_at\":null,\"updated_at\":null}}}",
+                                    "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Morgan Hirthe\",\"email\":\"dare.emelie@example.com\",\"email_verified_at\":\"2026-10-20T09:22:40+00:00\",\"created_at\":null,\"updated_at\":null}}}",
                                     "name": "Authenticated user profile."
                                 },
                                 {
diff --git a/public/docs/index.html b/public/docs/index.html
index 8375d14..152856e 100644
--- a/public/docs/index.html
+++ b/public/docs/index.html
@@ -222,7 +222,7 @@ 

Register

"attributes": { "name": "Justina Gaylord", "email": "lafayette.considine@example.com", - "email_verified_at": "2026-10-20T09:17:41+00:00", + "email_verified_at": "2026-10-20T09:22:40+00:00", "created_at": null, "updated_at": null } @@ -432,7 +432,7 @@

Login

"attributes": { "name": "Justina Gaylord", "email": "cormier.nick@example.com", - "email_verified_at": "2026-10-20T09:17:41+00:00", + "email_verified_at": "2026-10-20T09:22:40+00:00", "created_at": null, "updated_at": null } @@ -620,7 +620,7 @@

Get Current User

"attributes": { "name": "Morgan Hirthe", "email": "dare.emelie@example.com", - "email_verified_at": "2026-10-20T09:17:41+00:00", + "email_verified_at": "2026-10-20T09:22:40+00:00", "created_at": null, "updated_at": null } diff --git a/public/docs/openapi.yaml b/public/docs/openapi.yaml index c53dc77..52efeac 100644 --- a/public/docs/openapi.yaml +++ b/public/docs/openapi.yaml @@ -40,7 +40,7 @@ paths: attributes: name: 'Justina Gaylord' email: lafayette.considine@example.com - email_verified_at: '2026-10-20T09:17:41+00:00' + email_verified_at: '2026-10-20T09:22:40+00:00' created_at: null updated_at: null meta: @@ -68,7 +68,7 @@ paths: example: lafayette.considine@example.com email_verified_at: type: string - example: '2026-10-20T09:17:41+00:00' + example: '2026-10-20T09:22:40+00:00' created_at: type: string example: null @@ -164,7 +164,7 @@ paths: attributes: name: 'Justina Gaylord' email: cormier.nick@example.com - email_verified_at: '2026-10-20T09:17:41+00:00' + email_verified_at: '2026-10-20T09:22:40+00:00' created_at: null updated_at: null meta: @@ -192,7 +192,7 @@ paths: example: cormier.nick@example.com email_verified_at: type: string - example: '2026-10-20T09:17:41+00:00' + example: '2026-10-20T09:22:40+00:00' created_at: type: string example: null @@ -525,7 +525,7 @@ paths: attributes: name: 'Morgan Hirthe' email: dare.emelie@example.com - email_verified_at: '2026-10-20T09:17:41+00:00' + email_verified_at: '2026-10-20T09:22:40+00:00' created_at: null updated_at: null properties: @@ -549,7 +549,7 @@ paths: example: dare.emelie@example.com email_verified_at: type: string - example: '2026-10-20T09:17:41+00:00' + example: '2026-10-20T09:22:40+00:00' created_at: type: string example: null diff --git a/routes/api/routes.php b/routes/api/routes.php index a2a4c91..059fdbf 100644 --- a/routes/api/routes.php +++ b/routes/api/routes.php @@ -4,6 +4,6 @@ use Illuminate\Support\Facades\Route; -Route::prefix('v1')->group(base_path( +Route::prefix('v1')->middleware('consumes:application/json')->group(base_path( path: 'routes/api/v1.php', )); diff --git a/routes/api/v1.php b/routes/api/v1.php index d3ec835..f594573 100644 --- a/routes/api/v1.php +++ b/routes/api/v1.php @@ -17,13 +17,13 @@ use Illuminate\Support\Facades\Route; Route::post('/auth/register', RegisterController::class) - ->middleware(['idempotency', 'throttle:auth-register']) + ->middleware(['idempotent', 'throttle:auth-register']) ->name('v1.auth.register'); Route::post('/auth/login', LoginController::class) ->middleware('throttle:auth-login') ->name('v1.auth.login'); Route::post('/auth/password/forgot', ForgotPasswordController::class) - ->middleware(['idempotency', 'throttle:auth-password']) + ->middleware(['idempotent', 'throttle:auth-password']) ->name('v1.auth.password.forgot'); Route::post('/auth/password/reset', ResetPasswordController::class) ->middleware('throttle:auth-password') diff --git a/tests/Feature/ApiSecurityHardeningTest.php b/tests/Feature/ApiSecurityHardeningTest.php index b73c04d..40d3fb1 100644 --- a/tests/Feature/ApiSecurityHardeningTest.php +++ b/tests/Feature/ApiSecurityHardeningTest.php @@ -4,7 +4,9 @@ use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Testing\TestResponse; use Laravel\Sanctum\PersonalAccessToken; +use Tests\TestCase; uses(RefreshDatabase::class); @@ -14,31 +16,28 @@ 'password' => 'password123', ]); - $this->post('/v1/auth/login', [ + postForm($this, '/v1/auth/login', [ 'email' => 'non-json@example.com', 'password' => 'password123', 'device_name' => 'ios-app', ]) - ->assertStatus(415) - ->assertJsonPath('message', __('api.errors.unsupported_media_type')); + ->assertProblemType('https://apiguide.dev/errors/unsupported-media-type', 415) + ->assertHeader('Accept', 'application/json'); }); -it('localizes unsupported media type responses', function (): void { +it('keeps the unsupported media type problem stable whatever the requested language', function (): void { User::factory()->create([ 'email' => 'non-json-es@example.com', 'password' => 'password123', ]); - $this->withHeaders([ - 'Accept-Language' => 'es', - ])->post('/v1/auth/login', [ + postForm($this, '/v1/auth/login', [ 'email' => 'non-json-es@example.com', 'password' => 'password123', 'device_name' => 'ios-app', - ]) - ->assertStatus(415) - ->assertHeader('Content-Language', 'es') - ->assertJsonPath('message', __('api.errors.unsupported_media_type', [], 'es')); + ], ['HTTP_ACCEPT_LANGUAGE' => 'es']) + ->assertProblemType('https://apiguide.dev/errors/unsupported-media-type', 415) + ->assertHeader('Content-Language', 'es'); }); it('issues expiring sanctum tokens by default', function (): void { @@ -85,3 +84,24 @@ ->assertHeader('X-Frame-Options', 'DENY') ->assertHeader('Referrer-Policy', 'no-referrer'); }); + +it('renders problems for api requests that do not ask for json', function (): void { + $this->get('/v1/auth/me') + ->assertProblemType('https://apiguide.dev/errors/unauthorized', 401) + ->assertHeader('WWW-Authenticate', 'Bearer'); +}); + +/** + * A form-encoded POST with a real body, as a browser or curl -d sends it. Laravel's post() helper + * passes the fields as parsed parameters and leaves the body empty. + * + * @param array $fields + * @param array $server + */ +function postForm(TestCase $test, string $uri, array $fields, array $server = []): TestResponse +{ + return $test->call('POST', $uri, [], [], [], [ + 'CONTENT_TYPE' => 'application/x-www-form-urlencoded', + ...$server, + ], http_build_query($fields)); +} diff --git a/tests/Feature/AuthSecurityTest.php b/tests/Feature/AuthSecurityTest.php index ec4d98f..98cdde0 100644 --- a/tests/Feature/AuthSecurityTest.php +++ b/tests/Feature/AuthSecurityTest.php @@ -155,8 +155,8 @@ $this->withToken($token) ->getJson('/v1/auth/me') - ->assertForbidden() - ->assertJsonPath('message', __('api.errors.forbidden')); + ->assertProblem(403) + ->assertJsonPath('detail', __('api.errors.forbidden')); }); it('forbids logout when token lacks required ability', function (): void { @@ -165,8 +165,8 @@ $this->withToken($token) ->postJson('/v1/auth/logout') - ->assertForbidden() - ->assertJsonPath('message', __('api.errors.forbidden')); + ->assertProblem(403) + ->assertJsonPath('detail', __('api.errors.forbidden')); }); it('forbids resend verification when token lacks required ability', function (): void { @@ -175,8 +175,8 @@ $this->withToken($token) ->postJson('/v1/auth/email/verification-notification') - ->assertForbidden() - ->assertJsonPath('message', __('api.errors.forbidden')); + ->assertProblem(403) + ->assertJsonPath('detail', __('api.errors.forbidden')); }); it('throttles repeated failed login attempts', function (): void { diff --git a/tests/Feature/AuthTokenManagementTest.php b/tests/Feature/AuthTokenManagementTest.php index 455747b..f0089cf 100644 --- a/tests/Feature/AuthTokenManagementTest.php +++ b/tests/Feature/AuthTokenManagementTest.php @@ -33,7 +33,7 @@ /** @var array> $data */ $data = $response->json('data'); $isCurrentValues = array_map( - static fn (array $item): bool => (bool) data_get($item, 'attributes.is_current', false), + static fn(array $item): bool => (bool) data_get($item, 'attributes.is_current', false), $data, ); @@ -46,8 +46,8 @@ $this->withToken($token) ->getJson('/v1/auth/tokens') - ->assertForbidden() - ->assertJsonPath('message', __('api.errors.forbidden')); + ->assertProblem(403) + ->assertJsonPath('detail', __('api.errors.forbidden')); }); it('revokes a specific token owned by the authenticated user', function (): void { @@ -57,7 +57,7 @@ $targetToken = $user->createToken('target-token', ['auth:tokens:read']); $this->withToken($requestToken->plainTextToken) - ->deleteJson('/v1/auth/tokens/'.$targetToken->accessToken->id) + ->deleteJson('/v1/auth/tokens/' . $targetToken->accessToken->id) ->assertNoContent(); expect(PersonalAccessToken::query()->whereKey($targetToken->accessToken->id)->exists())->toBeFalse(); @@ -72,9 +72,9 @@ $otherToken = $otherUser->createToken('other-token', ['auth:tokens:read']); $this->withToken($requestToken->plainTextToken) - ->deleteJson('/v1/auth/tokens/'.$otherToken->accessToken->id) - ->assertNotFound() - ->assertJsonPath('message', __('api.auth.token_not_found')); + ->deleteJson('/v1/auth/tokens/' . $otherToken->accessToken->id) + ->assertProblemType('https://apiguide.dev/errors/resource-not-found', 404) + ->assertJsonPath('detail', __('api.auth.token_not_found')); }); it('validates token id route parameter when revoking a single token', function (): void { @@ -93,9 +93,9 @@ $limitedToken = $user->createToken('limited-token', ['auth:me'])->plainTextToken; $this->withToken($limitedToken) - ->deleteJson('/v1/auth/tokens/'.$targetToken->accessToken->id) - ->assertForbidden() - ->assertJsonPath('message', __('api.errors.forbidden')); + ->deleteJson('/v1/auth/tokens/' . $targetToken->accessToken->id) + ->assertProblem(403) + ->assertJsonPath('detail', __('api.errors.forbidden')); }); it('revokes all tokens for the authenticated user', function (): void { @@ -120,6 +120,6 @@ $this->withToken($limitedToken) ->deleteJson('/v1/auth/tokens') - ->assertForbidden() - ->assertJsonPath('message', __('api.errors.forbidden')); + ->assertProblem(403) + ->assertJsonPath('detail', __('api.errors.forbidden')); }); diff --git a/tests/Feature/DeprecationTest.php b/tests/Feature/DeprecationTest.php new file mode 100644 index 0000000..e3ff495 --- /dev/null +++ b/tests/Feature/DeprecationTest.php @@ -0,0 +1,80 @@ +get($path, DeprecatedEndpoint::class); + + $this->getJson($path) + ->assertOk() + ->assertDeprecated('2026-01-01T00:00:00Z', 'https://docs.example.com/deprecations/test') + ->assertSunset('2099-01-01T00:00:00Z', 'https://docs.example.com/sunset-policy'); +}); + +it('returns 410 gone once the sunset date has passed', function (): void { + $path = '/v1/test/retired-'.Str::lower((string) Str::ulid()); + + Route::middleware('api')->get($path, RetiredEndpoint::class); + + $this->getJson($path) + ->assertProblemType('https://apiguide.dev/errors/gone', 410) + ->assertJsonPath('detail', __('api.sunset.endpoint_unavailable')) + ->assertDeprecated('2000-01-01T00:00:00Z') + ->assertSunset('2001-01-01T00:00:00Z'); +}); + +it('serves deprecated endpoints that have no sunset date', function (): void { + $path = '/v1/test/deprecated-only-'.Str::lower((string) Str::ulid()); + + Route::middleware('api')->get($path, DeprecatedWithoutSunsetEndpoint::class); + + $response = $this->getJson($path) + ->assertOk() + ->assertJsonPath('ok', true) + ->assertDeprecated('2000-01-01T00:00:00Z'); + + expect($response->headers->get('Sunset'))->toBeNull(); +}); + +it('leaves endpoints without attributes alone', function (): void { + $this->getJson('/v1/auth/me') + ->assertUnauthorized() + ->assertNotDeprecated(); +}); + +#[Deprecation(at: '2026-01-01T00:00:00Z', link: 'https://docs.example.com/deprecations/test')] +#[Sunset(at: '2099-01-01T00:00:00Z', link: 'https://docs.example.com/sunset-policy')] +final class DeprecatedEndpoint +{ + public function __invoke(): JsonResponse + { + return new JsonResponse(['ok' => true]); + } +} + +#[Deprecation(at: '2000-01-01T00:00:00Z')] +#[Sunset(at: '2001-01-01T00:00:00Z')] +final class RetiredEndpoint +{ + public function __invoke(): JsonResponse + { + return new JsonResponse(['ok' => true]); + } +} + +#[Deprecation(at: '2000-01-01T00:00:00Z')] +final class DeprecatedWithoutSunsetEndpoint +{ + public function __invoke(): JsonResponse + { + return new JsonResponse(['ok' => true]); + } +} diff --git a/tests/Feature/IdempotencyKeyTest.php b/tests/Feature/IdempotencyKeyTest.php index 578f9b5..02271f2 100644 --- a/tests/Feature/IdempotencyKeyTest.php +++ b/tests/Feature/IdempotencyKeyTest.php @@ -11,7 +11,7 @@ uses(RefreshDatabase::class); it('replays register responses when idempotency key is reused with same payload', function (): void { - $headers = ['Idempotency-Key' => 'register-key-12345']; + $headers = ['Idempotency-Key' => '"register-key-12345"']; $payload = [ 'name' => 'Idempotent User', 'email' => 'idempotent@example.com', @@ -21,21 +21,35 @@ $first = $this->withHeaders($headers) ->postJson('/v1/auth/register', $payload) - ->assertCreated() - ->assertHeader('Idempotency-Key', 'register-key-12345'); + ->assertCreated(); - $second = $this->withHeaders($headers) + $this->withHeaders($headers) ->postJson('/v1/auth/register', $payload) - ->assertCreated() - ->assertHeader('Idempotency-Key', 'register-key-12345') - ->assertHeader('Idempotency-Replayed', 'true'); + ->assertIdempotentReplay($first); expect(User::query()->where('email', 'idempotent@example.com')->count())->toBe(1); expect(PersonalAccessToken::query()->count())->toBe(1); - expect($second->json('meta.token'))->toBe($first->json('meta.token')); }); -it('returns conflict when idempotency key is reused with a different payload', function (): void { +it('accepts the bare key form that common clients send', function (): void { + Notification::fake(); + + $user = User::factory()->create([ + 'email' => 'bare-key@example.com', + ]); + + $first = $this->withHeaders(['Idempotency-Key' => 'bare-key-12345']) + ->postJson('/v1/auth/password/forgot', ['email' => $user->email]) + ->assertOk(); + + $this->withHeaders(['Idempotency-Key' => '"bare-key-12345"']) + ->postJson('/v1/auth/password/forgot', ['email' => $user->email]) + ->assertIdempotentReplay($first); + + Notification::assertSentToTimes($user, ResetPassword::class, 1); +}); + +it('rejects a reused key with a different payload', function (): void { $headers = ['Idempotency-Key' => 'register-key-conflict']; $this->withHeaders($headers) @@ -54,8 +68,7 @@ 'password' => 'password123', 'device_name' => 'ios-app', ]) - ->assertStatus(409) - ->assertJsonPath('message', __('api.errors.idempotency_key_conflict')); + ->assertProblemType('https://apiguide.dev/errors/idempotency-key-conflict', 422); expect(User::query()->where('email', 'first-idempotency@example.com')->exists())->toBeTrue(); expect(User::query()->where('email', 'second-idempotency@example.com')->exists())->toBeFalse(); @@ -71,29 +84,27 @@ $headers = ['Idempotency-Key' => 'forgot-key-12345']; $payload = ['email' => $user->email]; - $this->withHeaders($headers) + $first = $this->withHeaders($headers) ->postJson('/v1/auth/password/forgot', $payload) ->assertOk(); $this->withHeaders($headers) ->postJson('/v1/auth/password/forgot', $payload) - ->assertOk() - ->assertHeader('Idempotency-Replayed', 'true'); + ->assertIdempotentReplay($first); Notification::assertSentToTimes($user, ResetPassword::class, 1); }); -it('validates idempotency key format', function (): void { +it('rejects malformed idempotency keys', function (): void { $this->withHeaders([ - 'Idempotency-Key' => 'bad***key', + 'Idempotency-Key' => 'bad key', ])->postJson('/v1/auth/password/forgot', [ 'email' => 'nobody@example.com', ]) - ->assertUnprocessable() - ->assertJsonPath('message', __('api.errors.idempotency_key_invalid')); + ->assertProblem(400); }); -it('localizes idempotency conflict errors', function (): void { +it('keeps the conflict type stable whatever the requested language', function (): void { $headers = ['Idempotency-Key' => 'register-key-es']; $this->withHeaders($headers) @@ -114,7 +125,6 @@ 'password' => 'password123', 'device_name' => 'ios-app', ]) - ->assertStatus(409) - ->assertHeader('Content-Language', 'es') - ->assertJsonPath('message', __('api.errors.idempotency_key_conflict', [], 'es')); + ->assertProblemType('https://apiguide.dev/errors/idempotency-key-conflict', 422) + ->assertHeader('Content-Language', 'es'); }); diff --git a/tests/Feature/LocalizationTest.php b/tests/Feature/LocalizationTest.php index 40f8c39..9a6a762 100644 --- a/tests/Feature/LocalizationTest.php +++ b/tests/Feature/LocalizationTest.php @@ -3,12 +3,12 @@ declare(strict_types=1); use App\Models\User; -use App\Http\Middleware\SetRequestLocale; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Http\JsonResponse; use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\URL; use Illuminate\Support\Str; +use JustSteveKing\Toolbox\Deprecation\Attributes\Sunset; uses(RefreshDatabase::class); @@ -27,9 +27,9 @@ $this->withHeaders([ 'Accept-Language' => 'es-MX', ])->getJson('/v1/auth/me') - ->assertUnauthorized() + ->assertProblemType('https://apiguide.dev/errors/unauthorized', 401) ->assertHeader('Content-Language', 'es') - ->assertJsonPath('message', __('api.errors.unauthenticated', [], 'es')); + ->assertJsonPath('detail', __('api.errors.unauthenticated', [], 'es')); }); it('translates validation failures from accept language header', function (): void { @@ -45,9 +45,9 @@ 'password' => 'wrong-password', 'device_name' => 'locale-test', ]) - ->assertUnprocessable() + ->assertProblemType('https://apiguide.dev/errors/validation-failed', 422) ->assertHeader('Content-Language', 'es') - ->assertJsonPath('message', __('api.errors.validation_failed', [], 'es')) + ->assertJsonPath('detail', __('api.auth.invalid_credentials', [], 'es')) ->assertJsonPath('errors.email.0', __('api.auth.invalid_credentials', [], 'es')); }); @@ -79,21 +79,29 @@ $this->withHeaders([ 'Accept-Language' => 'es', ])->getJson($url) - ->assertForbidden() + ->assertProblem(403) ->assertHeader('Content-Language', 'es') - ->assertJsonPath('message', __('api.auth.invalid_verification_link', [], 'es')); + ->assertJsonPath('detail', __('api.auth.invalid_verification_link', [], 'es')); }); it('translates sunset enforcement responses from accept language header', function (): void { - $path = '/v1/test/sunset-localized-'.Str::lower((string) Str::ulid()); + $path = '/v1/test/sunset-localized-' . Str::lower((string) Str::ulid()); - Route::middleware([SetRequestLocale::class, 'sunset:2000-01-01,,true']) - ->get($path, fn () => new JsonResponse(['ok' => true])); + Route::middleware('api')->get($path, LocalizedRetiredEndpoint::class); $this->withHeaders([ 'Accept-Language' => 'es', ])->getJson($path) - ->assertGone() + ->assertProblem(410) ->assertHeader('Content-Language', 'es') - ->assertJsonPath('message', __('api.sunset.endpoint_unavailable', [], 'es')); + ->assertJsonPath('detail', __('api.sunset.endpoint_unavailable', [], 'es')); }); + +#[Sunset(at: '2000-01-01T00:00:00Z')] +final class LocalizedRetiredEndpoint +{ + public function __invoke(): JsonResponse + { + return new JsonResponse(['ok' => true]); + } +} diff --git a/tests/Feature/RequestIdMiddlewareTest.php b/tests/Feature/RequestIdMiddlewareTest.php index 890e807..8a581ad 100644 --- a/tests/Feature/RequestIdMiddlewareTest.php +++ b/tests/Feature/RequestIdMiddlewareTest.php @@ -4,17 +4,19 @@ use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; +use Illuminate\Support\Str; uses(RefreshDatabase::class); -it('adds a request id header when one is not provided', function (): void { +it('assigns a uuidv7 request id when one is not provided', function (): void { $response = $this->getJson('/v1/auth/me') - ->assertUnauthorized(); + ->assertUnauthorized() + ->assertRequestId(); - $requestId = $response->headers->get('X-Request-Id'); + $requestId = (string) $response->headers->get('X-Request-Id'); - expect($requestId)->not->toBeNull(); - expect((string) $requestId)->toMatch('/^[A-Za-z0-9._-]{8,128}$/'); + expect(Str::isUuid($requestId))->toBeTrue(); + expect($requestId[14])->toBe('7'); }); it('uses the incoming request id header when valid', function (): void { @@ -24,31 +26,34 @@ 'X-Request-Id' => $provided, ])->getJson('/v1/auth/me') ->assertUnauthorized() - ->assertHeader('X-Request-Id', $provided); + ->assertRequestId($provided); }); -it('replaces invalid incoming request id values', function (): void { - $provided = '***invalid***'; +it('replaces incoming request ids that are too long', function (): void { + $provided = str_repeat('a', 201); $response = $this->withHeaders([ 'X-Request-Id' => $provided, ])->getJson('/v1/auth/me') - ->assertUnauthorized(); + ->assertUnauthorized() + ->assertRequestId(); + + expect(Str::isUuid((string) $response->headers->get('X-Request-Id')))->toBeTrue(); +}); - $actual = $response->headers->get('X-Request-Id'); +it('identifies problems by request id', function (): void { + $response = $this->getJson('/v1/auth/me') + ->assertProblem(401); - expect($actual)->not->toBeNull(); - expect((string) $actual)->not->toBe($provided); - expect((string) $actual)->toMatch('/^[A-Za-z0-9._-]{8,128}$/'); + expect($response->json('instance'))->toBe('urn:uuid:' . $response->headers->get('X-Request-Id')); }); it('includes request id header on successful authenticated responses', function (): void { $user = User::factory()->create(); $token = $user->createToken('request-id-success')->plainTextToken; - $response = $this->withToken($token) + $this->withToken($token) ->getJson('/v1/auth/me') - ->assertOk(); - - expect($response->headers->get('X-Request-Id'))->not->toBeNull(); + ->assertOk() + ->assertRequestId(); }); diff --git a/tests/Feature/SunsetMiddlewareTest.php b/tests/Feature/SunsetMiddlewareTest.php deleted file mode 100644 index 8f862a1..0000000 --- a/tests/Feature/SunsetMiddlewareTest.php +++ /dev/null @@ -1,64 +0,0 @@ -get($path, fn () => new JsonResponse(['ok' => true])); - - $response = $this->getJson($path) - ->assertOk(); - - expect($response->headers->get('Deprecation'))->toStartWith('@'); - expect($response->headers->get('Sunset'))->not->toBeNull(); - expect((string) $response->headers->get('Link'))->toContain($successor); - expect((string) $response->headers->get('Link'))->toContain('successor-version'); -}); - -it('returns 410 after sunset when enforcement is enabled', function (): void { - $path = '/v1/test/sunset-expired-'.Str::lower((string) Str::ulid()); - $successor = 'https://api.example.com/v2/replacement'; - - Route::middleware(sprintf('sunset:2000-01-01,%s,true', $successor)) - ->get($path, fn () => new JsonResponse(['ok' => true])); - - $response = $this->getJson($path) - ->assertGone() - ->assertJsonPath('message', __('api.sunset.endpoint_unavailable')); - - expect($response->headers->get('Deprecation'))->toStartWith('@'); - expect($response->headers->get('Sunset'))->not->toBeNull(); - expect((string) $response->headers->get('Link'))->toContain($successor); -}); - -it('does not set a link header for invalid successor urls', function (): void { - $path = '/v1/test/sunset-invalid-link-'.Str::lower((string) Str::ulid()); - - Route::middleware('sunset:2030-01-01,not-a-url') - ->get($path, fn () => new JsonResponse(['ok' => true])); - - $response = $this->getJson($path)->assertOk(); - - expect($response->headers->get('Link'))->toBeNull(); -}); - -it('does not block requests after sunset when enforcement is disabled', function (): void { - $path = '/v1/test/sunset-soft-expired-'.Str::lower((string) Str::ulid()); - - Route::middleware('sunset:2000-01-01') - ->get($path, fn () => new JsonResponse(['ok' => true])); - - $response = $this->getJson($path) - ->assertOk() - ->assertJsonPath('ok', true); - - expect($response->headers->get('Deprecation'))->toStartWith('@'); - expect($response->headers->get('Sunset'))->not->toBeNull(); -}); diff --git a/tests/Feature/TransportSecurityMiddlewareTest.php b/tests/Feature/TransportSecurityMiddlewareTest.php index 07c8ecf..0b8314c 100644 --- a/tests/Feature/TransportSecurityMiddlewareTest.php +++ b/tests/Feature/TransportSecurityMiddlewareTest.php @@ -10,8 +10,8 @@ config()->set('security.force_https', true); $this->getJson('/v1/auth/me') - ->assertStatus(400) - ->assertJsonPath('message', __('api.errors.https_required')); + ->assertProblem(400) + ->assertJsonPath('detail', __('api.errors.https_required')); }); it('localizes https enforcement errors', function (): void { @@ -20,9 +20,9 @@ $this->withHeaders([ 'Accept-Language' => 'es', ])->getJson('/v1/auth/me') - ->assertStatus(400) + ->assertProblem(400) ->assertHeader('Content-Language', 'es') - ->assertJsonPath('message', __('api.errors.https_required', [], 'es')); + ->assertJsonPath('detail', __('api.errors.https_required', [], 'es')); }); it('adds hsts header for secure requests when enabled', function (): void { From 40183c8c341f226264d4175051d03eadacc4e57b Mon Sep 17 00:00:00 2001 From: Steve McDougall Date: Tue, 20 Oct 2026 10:25:08 +0100 Subject: [PATCH 03/10] feat: plain JSON resources, paginated tokens and problem+json docs JSON:API resources give way to plain Laravel resources, so success and error responses tell one story: application/json for data, RFC 9457 problem details for errors. - GET /v1/auth/tokens is cursor paginated through api-toolbox, with navigation in RFC 8288 Link headers and a 400 for a cursor that cannot be decoded. The body is the page of tokens. - GET /v1/auth/me sends an ETag and answers If-None-Match with 304. - Documented error examples are problem details, and a Scribe generator labels them application/problem+json. The contract test now checks each runtime response's media type against the spec as well as its body. --- .scribe/endpoints.cache/00.yaml | 42 +- .scribe/endpoints/00.yaml | 42 +- .../Api/V1/Auth/ListTokensController.php | 69 +-- .../Api/V1/Auth/LoginController.php | 19 +- .../Controllers/Api/V1/Auth/MeController.php | 11 +- .../Api/V1/Auth/RegisterController.php | 17 +- .../Api/V1/Auth/ResetPasswordController.php | 11 +- ...mailVerificationNotificationController.php | 11 +- .../Api/V1/Auth/VerifyEmailController.php | 15 +- .../Resources/PersonalAccessTokenResource.php | 40 +- app/Http/Resources/UserResource.php | 38 +- .../ProblemDetailsOpenApiGenerator.php | 40 ++ config/scribe.php | 15 +- public/docs/collection.json | 39 +- public/docs/index.html | 139 +++--- public/docs/openapi.yaml | 440 ++++++++++-------- routes/api/v1.php | 2 +- tests/Feature/AuthTokenManagementTest.php | 48 +- tests/Feature/AuthTokenTest.php | 32 +- tests/Feature/OpenApiContractTest.php | 79 ++-- 20 files changed, 697 insertions(+), 452 deletions(-) create mode 100644 app/Support/ProblemDetailsOpenApiGenerator.php diff --git a/.scribe/endpoints.cache/00.yaml b/.scribe/endpoints.cache/00.yaml index afb300c..77a7fc4 100644 --- a/.scribe/endpoints.cache/00.yaml +++ b/.scribe/endpoints.cache/00.yaml @@ -80,13 +80,13 @@ endpoints: - custom: [] status: 201 - content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:22:40+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"","name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:25:01+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Registration succeeded.' - custom: [] status: 422 - content: '{"message":"The given data was invalid.","errors":{"email":["The email has already been taken."]}}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/validation-failed","title":"Validation Failed","status":422,"detail":"The email has already been taken.","errors":{"email":["The email has already been taken."]}}' headers: [] description: 'Validation failed.' responseFields: [] @@ -159,13 +159,13 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:22:40+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"","name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:25:01+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Login succeeded.' - custom: [] status: 422 - content: '{"message":"The given data was invalid.","errors":{"email":["The provided credentials are incorrect."]}}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/validation-failed","title":"Validation Failed","status":422,"detail":"The provided credentials are incorrect.","errors":{"email":["The provided credentials are incorrect."]}}' headers: [] description: 'Credentials were invalid.' responseFields: [] @@ -305,7 +305,7 @@ endpoints: - custom: [] status: 422 - content: '{"message":"The given data was invalid.","errors":{"email":["This password reset token is invalid."]}}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/validation-failed","title":"Validation Failed","status":422,"detail":"This password reset token is invalid.","errors":{"email":["This password reset token is invalid."]}}' headers: [] description: 'Reset token or payload was invalid.' responseFields: [] @@ -481,7 +481,7 @@ endpoints: - custom: [] status: 403 - content: '{"message":"Invalid verification link."}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/forbidden","title":"Forbidden","status":403,"detail":"Invalid verification link."}' headers: [] description: 'Signed URL was invalid, expired, or mismatched.' responseFields: [] @@ -519,13 +519,13 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"","type":"users","attributes":{"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:22:40+00:00","created_at":null,"updated_at":null}}}' + content: '{"data":{"id":"","name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:25:01+00:00","created_at":null,"updated_at":null}}' headers: [] description: 'Authenticated user profile.' - custom: [] status: 401 - content: '{"message":"Unauthenticated."}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/unauthorized","title":"Unauthorized","status":401,"detail":"Unauthenticated."}' headers: [] description: 'Authentication failed.' responseFields: [] @@ -604,8 +604,20 @@ endpoints: Accept: application/json urlParameters: [] cleanUrlParameters: [] - queryParameters: [] - cleanQueryParameters: [] + queryParameters: + cursor: + custom: [] + name: cursor + description: 'Opaque cursor from a Link header. Omit it for the first page.' + required: false + example: architecto + type: string + enumValues: [] + exampleWasSpecified: false + nullable: false + deprecated: false + cleanQueryParameters: + cursor: architecto bodyParameters: [] cleanBodyParameters: [] fileParameters: [] @@ -613,19 +625,19 @@ endpoints: - custom: [] status: 200 - content: '{"data":[{"id":"1","type":"personal-access-tokens","attributes":{"name":"ios-app","abilities":["auth:me","auth:logout"],"last_used_at":null,"expires_at":"2026-02-24T12:00:00+00:00","created_at":"2026-02-23T12:00:00+00:00","updated_at":"2026-02-23T12:00:00+00:00","is_current":true}}]}' + content: '[{"id":"1","name":"ios-app","abilities":["auth:me","auth:logout"],"last_used_at":null,"expires_at":"2026-02-24T12:00:00+00:00","created_at":"2026-02-23T12:00:00+00:00","updated_at":"2026-02-23T12:00:00+00:00","is_current":true}]' headers: [] - description: 'Token list payload.' + description: 'One page of tokens, newest first. Navigation is in RFC 8288 Link headers: rel="next" and rel="prev" when there is a page that way, and rel="first".' - custom: [] status: 401 - content: '{"message":"Unauthenticated."}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/unauthorized","title":"Unauthorized","status":401,"detail":"Unauthenticated."}' headers: [] description: 'Authentication failed.' - custom: [] status: 403 - content: '{"message":"Forbidden."}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/forbidden","title":"Forbidden","status":403,"detail":"Forbidden."}' headers: [] description: 'Token is missing required ability.' responseFields: [] @@ -814,7 +826,7 @@ endpoints: - custom: [] status: 401 - content: '{"message":"Unauthenticated."}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/unauthorized","title":"Unauthorized","status":401,"detail":"Unauthenticated."}' headers: [] description: 'Authentication failed.' responseFields: [] diff --git a/.scribe/endpoints/00.yaml b/.scribe/endpoints/00.yaml index f4868c7..49bbee9 100644 --- a/.scribe/endpoints/00.yaml +++ b/.scribe/endpoints/00.yaml @@ -78,13 +78,13 @@ endpoints: - custom: [] status: 201 - content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:22:40+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"","name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:25:01+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Registration succeeded.' - custom: [] status: 422 - content: '{"message":"The given data was invalid.","errors":{"email":["The email has already been taken."]}}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/validation-failed","title":"Validation Failed","status":422,"detail":"The email has already been taken.","errors":{"email":["The email has already been taken."]}}' headers: [] description: 'Validation failed.' responseFields: [] @@ -157,13 +157,13 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"","type":"users","attributes":{"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:22:40+00:00","created_at":null,"updated_at":null}},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"","name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:25:01+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Login succeeded.' - custom: [] status: 422 - content: '{"message":"The given data was invalid.","errors":{"email":["The provided credentials are incorrect."]}}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/validation-failed","title":"Validation Failed","status":422,"detail":"The provided credentials are incorrect.","errors":{"email":["The provided credentials are incorrect."]}}' headers: [] description: 'Credentials were invalid.' responseFields: [] @@ -303,7 +303,7 @@ endpoints: - custom: [] status: 422 - content: '{"message":"The given data was invalid.","errors":{"email":["This password reset token is invalid."]}}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/validation-failed","title":"Validation Failed","status":422,"detail":"This password reset token is invalid.","errors":{"email":["This password reset token is invalid."]}}' headers: [] description: 'Reset token or payload was invalid.' responseFields: [] @@ -479,7 +479,7 @@ endpoints: - custom: [] status: 403 - content: '{"message":"Invalid verification link."}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/forbidden","title":"Forbidden","status":403,"detail":"Invalid verification link."}' headers: [] description: 'Signed URL was invalid, expired, or mismatched.' responseFields: [] @@ -517,13 +517,13 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"","type":"users","attributes":{"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:22:40+00:00","created_at":null,"updated_at":null}}}' + content: '{"data":{"id":"","name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:25:01+00:00","created_at":null,"updated_at":null}}' headers: [] description: 'Authenticated user profile.' - custom: [] status: 401 - content: '{"message":"Unauthenticated."}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/unauthorized","title":"Unauthorized","status":401,"detail":"Unauthenticated."}' headers: [] description: 'Authentication failed.' responseFields: [] @@ -602,8 +602,20 @@ endpoints: Accept: application/json urlParameters: [] cleanUrlParameters: [] - queryParameters: [] - cleanQueryParameters: [] + queryParameters: + cursor: + custom: [] + name: cursor + description: 'Opaque cursor from a Link header. Omit it for the first page.' + required: false + example: architecto + type: string + enumValues: [] + exampleWasSpecified: false + nullable: false + deprecated: false + cleanQueryParameters: + cursor: architecto bodyParameters: [] cleanBodyParameters: [] fileParameters: [] @@ -611,19 +623,19 @@ endpoints: - custom: [] status: 200 - content: '{"data":[{"id":"1","type":"personal-access-tokens","attributes":{"name":"ios-app","abilities":["auth:me","auth:logout"],"last_used_at":null,"expires_at":"2026-02-24T12:00:00+00:00","created_at":"2026-02-23T12:00:00+00:00","updated_at":"2026-02-23T12:00:00+00:00","is_current":true}}]}' + content: '[{"id":"1","name":"ios-app","abilities":["auth:me","auth:logout"],"last_used_at":null,"expires_at":"2026-02-24T12:00:00+00:00","created_at":"2026-02-23T12:00:00+00:00","updated_at":"2026-02-23T12:00:00+00:00","is_current":true}]' headers: [] - description: 'Token list payload.' + description: 'One page of tokens, newest first. Navigation is in RFC 8288 Link headers: rel="next" and rel="prev" when there is a page that way, and rel="first".' - custom: [] status: 401 - content: '{"message":"Unauthenticated."}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/unauthorized","title":"Unauthorized","status":401,"detail":"Unauthenticated."}' headers: [] description: 'Authentication failed.' - custom: [] status: 403 - content: '{"message":"Forbidden."}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/forbidden","title":"Forbidden","status":403,"detail":"Forbidden."}' headers: [] description: 'Token is missing required ability.' responseFields: [] @@ -812,7 +824,7 @@ endpoints: - custom: [] status: 401 - content: '{"message":"Unauthenticated."}' + content: '{"type":"https:\/\/apiguide.dev\/errors\/unauthorized","title":"Unauthorized","status":401,"detail":"Unauthenticated."}' headers: [] description: 'Authentication failed.' responseFields: [] diff --git a/app/Http/Controllers/Api/V1/Auth/ListTokensController.php b/app/Http/Controllers/Api/V1/Auth/ListTokensController.php index daa893f..8ffa556 100644 --- a/app/Http/Controllers/Api/V1/Auth/ListTokensController.php +++ b/app/Http/Controllers/Api/V1/Auth/ListTokensController.php @@ -8,11 +8,12 @@ use App\Models\User; use App\Support\SecurityAudit; use Illuminate\Container\Attributes\CurrentUser; -use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; +use JustSteveKing\Toolbox\Pagination\CursorPage; use Knuckles\Scribe\Attributes\Authenticated; use Knuckles\Scribe\Attributes\Endpoint; use Knuckles\Scribe\Attributes\Group; +use Knuckles\Scribe\Attributes\QueryParam; use Knuckles\Scribe\Attributes\Response; use Knuckles\Scribe\Attributes\Subgroup; @@ -20,46 +21,56 @@ #[Subgroup(name: 'Token Authentication')] #[Endpoint(title: 'List Tokens', description: 'List personal access tokens for the authenticated user.')] #[Authenticated] +#[QueryParam('cursor', type: 'string', description: 'Opaque cursor from a Link header. Omit it for the first page.', required: false, example: null)] +#[Response( + content: [[ + 'id' => '1', + 'name' => 'ios-app', + 'abilities' => ['auth:me', 'auth:logout'], + 'last_used_at' => null, + 'expires_at' => '2026-02-24T12:00:00+00:00', + 'created_at' => '2026-02-23T12:00:00+00:00', + 'updated_at' => '2026-02-23T12:00:00+00:00', + 'is_current' => true, + ]], + status: 200, + description: 'One page of tokens, newest first. Navigation is in RFC 8288 Link headers: rel="next" and rel="prev" when there is a page that way, and rel="first".', +)] #[Response( content: [ - 'data' => [[ - 'id' => '1', - 'type' => 'personal-access-tokens', - 'attributes' => [ - 'name' => 'ios-app', - 'abilities' => ['auth:me', 'auth:logout'], - 'last_used_at' => null, - 'expires_at' => '2026-02-24T12:00:00+00:00', - 'created_at' => '2026-02-23T12:00:00+00:00', - 'updated_at' => '2026-02-23T12:00:00+00:00', - 'is_current' => true, - ], - ]], + 'type' => 'https://apiguide.dev/errors/forbidden', + 'title' => 'Forbidden', + 'status' => 403, + 'detail' => 'Forbidden.', ], - status: 200, - description: 'Token list payload.' + status: 403, + description: 'Token is missing required ability.', +)] +#[Response( + content: [ + 'type' => 'https://apiguide.dev/errors/unauthorized', + 'title' => 'Unauthorized', + 'status' => 401, + 'detail' => 'Unauthenticated.', + ], + status: 401, + description: 'Authentication failed.', )] -#[Response(content: ['message' => 'Forbidden.'], status: 403, description: 'Token is missing required ability.')] -#[Response(content: ['message' => 'Unauthenticated.'], status: 401, description: 'Authentication failed.')] final class ListTokensController { - public function __invoke(Request $request, #[CurrentUser] User $user): JsonResponse + public const int PER_PAGE = 25; + + public function __invoke(Request $request, #[CurrentUser] User $user): CursorPage { $tokens = $user->tokens() - ->latest('id') - ->get(); + ->orderByDesc('id') + ->cursorPaginate(self::PER_PAGE); SecurityAudit::log('auth.tokens.listed', [ 'user_id' => (string) $user->getKey(), - 'count' => $tokens->count(), + 'count' => count($tokens->items()), ]); - return PersonalAccessTokenResource::collection($tokens) - ->additional([ - 'meta' => [ - 'count' => $tokens->count(), - ], - ]) - ->response(); + return CursorPage::of($tokens, PersonalAccessTokenResource::class); } } diff --git a/app/Http/Controllers/Api/V1/Auth/LoginController.php b/app/Http/Controllers/Api/V1/Auth/LoginController.php index fdc89bb..62f0049 100644 --- a/app/Http/Controllers/Api/V1/Auth/LoginController.php +++ b/app/Http/Controllers/Api/V1/Auth/LoginController.php @@ -32,15 +32,18 @@ model: User::class, status: 200, description: 'Login succeeded.', - additional: ['meta' => ['token' => '1|example-token', 'token_type' => 'Bearer', 'expires_at' => null]] + additional: ['meta' => ['token' => '1|example-token', 'token_type' => 'Bearer', 'expires_at' => null]], )] #[Response( content: [ - 'message' => 'The given data was invalid.', + 'type' => 'https://apiguide.dev/errors/validation-failed', + 'title' => 'Validation Failed', + 'status' => 422, + 'detail' => 'The provided credentials are incorrect.', 'errors' => ['email' => ['The provided credentials are incorrect.']], ], status: 422, - description: 'Credentials were invalid.' + description: 'Credentials were invalid.', )] final class LoginController { @@ -50,7 +53,7 @@ public function __invoke(LoginRequest $request): JsonResponse $user = User::query()->where('email', $payload->email)->first(); - if (! $user || ! Hash::check($payload->password, $user->password)) { + if ( ! $user || ! Hash::check($payload->password, $user->password)) { SecurityAudit::log('auth.login.failed', [ 'email_hash' => SecurityAudit::hashEmail($payload->email), 'device_name' => $payload->deviceName, @@ -91,7 +94,7 @@ private function issueToken(User $user, string $deviceName): array ['options' => ['min_range' => 1]], ); - $expiresAt = $expirationMinutes !== false + $expiresAt = false !== $expirationMinutes ? now()->addMinutes($expirationMinutes) : null; @@ -107,13 +110,13 @@ private function defaultAbilities(): array { $abilities = config('sanctum.abilities.default', []); - if (! is_array($abilities)) { + if ( ! is_array($abilities)) { return []; } return array_values(array_filter( - array_map(static fn (mixed $ability): string => trim((string) $ability), $abilities), - static fn (string $ability): bool => $ability !== '', + array_map(static fn(mixed $ability): string => mb_trim((string) $ability), $abilities), + static fn(string $ability): bool => '' !== $ability, )); } } diff --git a/app/Http/Controllers/Api/V1/Auth/MeController.php b/app/Http/Controllers/Api/V1/Auth/MeController.php index cfedc42..4bc7bc2 100644 --- a/app/Http/Controllers/Api/V1/Auth/MeController.php +++ b/app/Http/Controllers/Api/V1/Auth/MeController.php @@ -21,7 +21,16 @@ #[Endpoint(title: 'Get Current User', description: 'Return the authenticated user for the current bearer token.')] #[Authenticated] #[ResponseFromApiResource(name: UserResource::class, model: User::class, status: 200, description: 'Authenticated user profile.')] -#[Response(content: ['message' => 'Unauthenticated.'], status: 401, description: 'Authentication failed.')] +#[Response( + content: [ + 'type' => 'https://apiguide.dev/errors/unauthorized', + 'title' => 'Unauthorized', + 'status' => 401, + 'detail' => 'Unauthenticated.', + ], + status: 401, + description: 'Authentication failed.', +)] final class MeController { public function __invoke(Request $request, #[CurrentUser] User $user): JsonResponse diff --git a/app/Http/Controllers/Api/V1/Auth/RegisterController.php b/app/Http/Controllers/Api/V1/Auth/RegisterController.php index 5630691..a04f4cc 100644 --- a/app/Http/Controllers/Api/V1/Auth/RegisterController.php +++ b/app/Http/Controllers/Api/V1/Auth/RegisterController.php @@ -32,15 +32,18 @@ model: User::class, status: 201, description: 'Registration succeeded.', - additional: ['meta' => ['token' => '1|example-token', 'token_type' => 'Bearer', 'expires_at' => null]] + additional: ['meta' => ['token' => '1|example-token', 'token_type' => 'Bearer', 'expires_at' => null]], )] #[Response( content: [ - 'message' => 'The given data was invalid.', + 'type' => 'https://apiguide.dev/errors/validation-failed', + 'title' => 'Validation Failed', + 'status' => 422, + 'detail' => 'The email has already been taken.', 'errors' => ['email' => ['The email has already been taken.']], ], status: 422, - description: 'Validation failed.' + description: 'Validation failed.', )] final class RegisterController { @@ -86,7 +89,7 @@ private function issueToken(User $user, string $deviceName): array ['options' => ['min_range' => 1]], ); - $expiresAt = $expirationMinutes !== false + $expiresAt = false !== $expirationMinutes ? now()->addMinutes($expirationMinutes) : null; @@ -102,13 +105,13 @@ private function defaultAbilities(): array { $abilities = config('sanctum.abilities.default', []); - if (! is_array($abilities)) { + if ( ! is_array($abilities)) { return []; } return array_values(array_filter( - array_map(static fn (mixed $ability): string => trim((string) $ability), $abilities), - static fn (string $ability): bool => $ability !== '', + array_map(static fn(mixed $ability): string => mb_trim((string) $ability), $abilities), + static fn(string $ability): bool => '' !== $ability, )); } } diff --git a/app/Http/Controllers/Api/V1/Auth/ResetPasswordController.php b/app/Http/Controllers/Api/V1/Auth/ResetPasswordController.php index 97d189e..429af72 100644 --- a/app/Http/Controllers/Api/V1/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Api/V1/Auth/ResetPasswordController.php @@ -31,11 +31,14 @@ #[Response(content: ['message' => 'Your password has been reset.'], status: 200, description: 'Password reset succeeded.')] #[Response( content: [ - 'message' => 'The given data was invalid.', + 'type' => 'https://apiguide.dev/errors/validation-failed', + 'title' => 'Validation Failed', + 'status' => 422, + 'detail' => 'This password reset token is invalid.', 'errors' => ['email' => ['This password reset token is invalid.']], ], status: 422, - description: 'Reset token or payload was invalid.' + description: 'Reset token or payload was invalid.', )] final class ResetPasswordController { @@ -60,10 +63,10 @@ function (User $user, string $password) use (&$resetUserId): void { $resetUserId = (string) $user->getKey(); event(new PasswordReset($user)); - } + }, ); - if ($status !== Password::PASSWORD_RESET) { + if (Password::PASSWORD_RESET !== $status) { SecurityAudit::log('auth.password_reset.failed', [ 'email_hash' => SecurityAudit::hashEmail($payload->email), 'status' => $status, diff --git a/app/Http/Controllers/Api/V1/Auth/SendEmailVerificationNotificationController.php b/app/Http/Controllers/Api/V1/Auth/SendEmailVerificationNotificationController.php index 2a55d99..55956b8 100644 --- a/app/Http/Controllers/Api/V1/Auth/SendEmailVerificationNotificationController.php +++ b/app/Http/Controllers/Api/V1/Auth/SendEmailVerificationNotificationController.php @@ -19,7 +19,16 @@ #[Authenticated] #[Response(content: ['message' => 'Verification link sent.'], status: 200, description: 'Verification email queued/sent.')] #[Response(content: ['message' => 'Email is already verified.'], status: 200, description: 'User already verified.')] -#[Response(content: ['message' => 'Unauthenticated.'], status: 401, description: 'Authentication failed.')] +#[Response( + content: [ + 'type' => 'https://apiguide.dev/errors/unauthorized', + 'title' => 'Unauthorized', + 'status' => 401, + 'detail' => 'Unauthenticated.', + ], + status: 401, + description: 'Authentication failed.', +)] final class SendEmailVerificationNotificationController { public function __invoke(Request $request): JsonResponse diff --git a/app/Http/Controllers/Api/V1/Auth/VerifyEmailController.php b/app/Http/Controllers/Api/V1/Auth/VerifyEmailController.php index 8884a3b..f28bfc8 100644 --- a/app/Http/Controllers/Api/V1/Auth/VerifyEmailController.php +++ b/app/Http/Controllers/Api/V1/Auth/VerifyEmailController.php @@ -24,7 +24,16 @@ #[UrlParam('id', type: 'string', description: 'User ULID from the signed verification link.', required: true, example: '01HZX3W3T4J8Q57XNZD5BPHJ92')] #[UrlParam('hash', type: 'string', description: 'SHA-1 hash of the email from the signed verification link.', required: true, example: '8c4f4370e5db9b5be6d0f4c95495f49f998fa32a')] #[Response(content: ['message' => 'Email verified successfully.'], status: 200, description: 'Email was verified.')] -#[Response(content: ['message' => 'Invalid verification link.'], status: 403, description: 'Signed URL was invalid, expired, or mismatched.')] +#[Response( + content: [ + 'type' => 'https://apiguide.dev/errors/forbidden', + 'title' => 'Forbidden', + 'status' => 403, + 'detail' => 'Invalid verification link.', + ], + status: 403, + description: 'Signed URL was invalid, expired, or mismatched.', +)] final class VerifyEmailController { public function __invoke(VerifyEmailRequest $request): JsonResponse @@ -33,7 +42,7 @@ public function __invoke(VerifyEmailRequest $request): JsonResponse $user = User::query()->findOrFail($payload->id); - if (! hash_equals(sha1($user->getEmailForVerification()), $payload->hash)) { + if ( ! hash_equals(sha1($user->getEmailForVerification()), $payload->hash)) { SecurityAudit::log('auth.email_verification.failed', [ 'user_id' => (string) $user->getKey(), 'reason' => 'hash_mismatch', @@ -44,7 +53,7 @@ public function __invoke(VerifyEmailRequest $request): JsonResponse $wasAlreadyVerified = $user->hasVerifiedEmail(); - if (! $wasAlreadyVerified && $user->markEmailAsVerified()) { + if ( ! $wasAlreadyVerified && $user->markEmailAsVerified()) { event(new Verified($user)); } diff --git a/app/Http/Resources/PersonalAccessTokenResource.php b/app/Http/Resources/PersonalAccessTokenResource.php index 2697e33..815853b 100644 --- a/app/Http/Resources/PersonalAccessTokenResource.php +++ b/app/Http/Resources/PersonalAccessTokenResource.php @@ -5,42 +5,30 @@ namespace App\Http\Resources; use Illuminate\Http\Request; -use Illuminate\Http\Resources\JsonApi\JsonApiResource; +use Illuminate\Http\Resources\Json\JsonResource; use Laravel\Sanctum\PersonalAccessToken; -final class PersonalAccessTokenResource extends JsonApiResource +/** + * @mixin PersonalAccessToken + */ +final class PersonalAccessTokenResource extends JsonResource { - public function toId(Request $request): ?string - { - /** @var PersonalAccessToken $token */ - $token = $this->resource; - - return (string) $token->getKey(); - } - - public function toType(Request $request): ?string - { - return 'personal-access-tokens'; - } - /** * @return array */ - public function toAttributes(Request $request): array + public function toArray(Request $request): array { - /** @var PersonalAccessToken $token */ - $token = $this->resource; - $currentTokenId = $request->user()?->currentAccessToken()?->getKey(); return [ - 'name' => $token->name, - 'abilities' => $token->abilities, - 'last_used_at' => $token->last_used_at?->toAtomString(), - 'expires_at' => $token->expires_at?->toAtomString(), - 'created_at' => $token->created_at?->toAtomString(), - 'updated_at' => $token->updated_at?->toAtomString(), - 'is_current' => $currentTokenId !== null && (string) $currentTokenId === (string) $token->getKey(), + 'id' => (string) $this->getKey(), + 'name' => $this->name, + 'abilities' => $this->abilities, + 'last_used_at' => $this->last_used_at?->toAtomString(), + 'expires_at' => $this->expires_at?->toAtomString(), + 'created_at' => $this->created_at?->toAtomString(), + 'updated_at' => $this->updated_at?->toAtomString(), + 'is_current' => null !== $currentTokenId && (string) $currentTokenId === (string) $this->getKey(), ]; } } diff --git a/app/Http/Resources/UserResource.php b/app/Http/Resources/UserResource.php index db39715..5ea33fe 100644 --- a/app/Http/Resources/UserResource.php +++ b/app/Http/Resources/UserResource.php @@ -6,37 +6,25 @@ use App\Models\User; use Illuminate\Http\Request; -use Illuminate\Http\Resources\JsonApi\JsonApiResource; +use Illuminate\Http\Resources\Json\JsonResource; -final class UserResource extends JsonApiResource +/** + * @mixin User + */ +final class UserResource extends JsonResource { - public function toId(Request $request): ?string - { - /** @var User $user */ - $user = $this->resource; - - return (string) $user->getKey(); - } - - public function toType(Request $request): ?string - { - return 'users'; - } - /** - * @return array + * @return array{id: string, name: string, email: string, email_verified_at: ?string, created_at: ?string, updated_at: ?string} */ - public function toAttributes(Request $request): array + public function toArray(Request $request): array { - /** @var User $user */ - $user = $this->resource; - return [ - 'name' => $user->name, - 'email' => $user->email, - 'email_verified_at' => $user->email_verified_at?->toAtomString(), - 'created_at' => $user->created_at?->toAtomString(), - 'updated_at' => $user->updated_at?->toAtomString(), + 'id' => (string) $this->getKey(), + 'name' => $this->name, + 'email' => $this->email, + 'email_verified_at' => $this->email_verified_at?->toAtomString(), + 'created_at' => $this->created_at?->toAtomString(), + 'updated_at' => $this->updated_at?->toAtomString(), ]; } } diff --git a/app/Support/ProblemDetailsOpenApiGenerator.php b/app/Support/ProblemDetailsOpenApiGenerator.php new file mode 100644 index 0000000..bc2992d --- /dev/null +++ b/app/Support/ProblemDetailsOpenApiGenerator.php @@ -0,0 +1,40 @@ + $pathItem + * @param array $groupedEndpoints + * @return array + */ + public function pathItem(array $pathItem, array $groupedEndpoints, OutputEndpointData $endpoint): array + { + if ( ! is_array($pathItem['responses'] ?? null)) { + return $pathItem; + } + + foreach ($pathItem['responses'] as $status => $response) { + if ((int) $status < 400 || ! is_array($response) || ! is_array($response['content']['application/json'] ?? null)) { + continue; + } + + $response['content'] = [self::MEDIA_TYPE => $response['content']['application/json']]; + $pathItem['responses'][$status] = $response; + } + + return $pathItem; + } +} diff --git a/config/scribe.php b/config/scribe.php index 5f6296b..600d6f9 100644 --- a/config/scribe.php +++ b/config/scribe.php @@ -1,17 +1,22 @@ for the generated documentation. - 'title' => config('app.name').' API Documentation', + 'title' => config('app.name') . ' API Documentation', // A short description of your API. Will be included in the docs webpage, Postman collection and OpenAPI spec. 'description' => '', @@ -168,7 +173,9 @@ // Additional generators to use when generating the OpenAPI spec. // Should extend `Knuckles\Scribe\Writing\OpenApiSpecGenerators\OpenApiGenerator`. - 'generators' => [], + 'generators' => [ + App\Support\ProblemDetailsOpenApiGenerator::class, + ], ], 'groups' => [ diff --git a/public/docs/collection.json b/public/docs/collection.json index 6c14fbd..ca50634 100644 --- a/public/docs/collection.json +++ b/public/docs/collection.json @@ -10,7 +10,7 @@ ], "info": { "name": "Laravel API Documentation", - "_postman_id": "158e8ae1-0442-4201-9f3b-bf74e85b4f13", + "_postman_id": "b96e8010-5a32-497e-b801-9f223c9e9a29", "description": "", "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json" }, @@ -56,13 +56,13 @@ { "header": [], "code": 201, - "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Justina Gaylord\",\"email\":\"lafayette.considine@example.com\",\"email_verified_at\":\"2026-10-20T09:22:40+00:00\",\"created_at\":null,\"updated_at\":null}},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", + "body": "{\"data\":{\"id\":\"\",\"name\":\"Justina Gaylord\",\"email\":\"lafayette.considine@example.com\",\"email_verified_at\":\"2026-10-20T09:25:01+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", "name": "Registration succeeded." }, { "header": [], "code": 422, - "body": "{\"message\":\"The given data was invalid.\",\"errors\":{\"email\":[\"The email has already been taken.\"]}}", + "body": "{\"type\":\"https:\\\/\\\/apiguide.dev\\\/errors\\\/validation-failed\",\"title\":\"Validation Failed\",\"status\":422,\"detail\":\"The email has already been taken.\",\"errors\":{\"email\":[\"The email has already been taken.\"]}}", "name": "Validation failed." } ] @@ -100,13 +100,13 @@ { "header": [], "code": 200, - "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Justina Gaylord\",\"email\":\"cormier.nick@example.com\",\"email_verified_at\":\"2026-10-20T09:22:40+00:00\",\"created_at\":null,\"updated_at\":null}},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", + "body": "{\"data\":{\"id\":\"\",\"name\":\"Justina Gaylord\",\"email\":\"cormier.nick@example.com\",\"email_verified_at\":\"2026-10-20T09:25:01+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", "name": "Login succeeded." }, { "header": [], "code": 422, - "body": "{\"message\":\"The given data was invalid.\",\"errors\":{\"email\":[\"The provided credentials are incorrect.\"]}}", + "body": "{\"type\":\"https:\\\/\\\/apiguide.dev\\\/errors\\\/validation-failed\",\"title\":\"Validation Failed\",\"status\":422,\"detail\":\"The provided credentials are incorrect.\",\"errors\":{\"email\":[\"The provided credentials are incorrect.\"]}}", "name": "Credentials were invalid." } ] @@ -138,13 +138,13 @@ { "header": [], "code": 200, - "body": "{\"data\":{\"id\":\"\",\"type\":\"users\",\"attributes\":{\"name\":\"Morgan Hirthe\",\"email\":\"dare.emelie@example.com\",\"email_verified_at\":\"2026-10-20T09:22:40+00:00\",\"created_at\":null,\"updated_at\":null}}}", + "body": "{\"data\":{\"id\":\"\",\"name\":\"Morgan Hirthe\",\"email\":\"dare.emelie@example.com\",\"email_verified_at\":\"2026-10-20T09:25:01+00:00\",\"created_at\":null,\"updated_at\":null}}", "name": "Authenticated user profile." }, { "header": [], "code": 401, - "body": "{\"message\":\"Unauthenticated.\"}", + "body": "{\"type\":\"https:\\\/\\\/apiguide.dev\\\/errors\\\/unauthorized\",\"title\":\"Unauthorized\",\"status\":401,\"detail\":\"Unauthenticated.\"}", "name": "Authentication failed." } ] @@ -193,8 +193,15 @@ "url": { "host": "{{baseUrl}}", "path": "v1\/auth\/tokens", - "query": [], - "raw": "{{baseUrl}}\/v1\/auth\/tokens" + "query": [ + { + "key": "cursor", + "value": "architecto", + "description": "Opaque cursor from a Link header. Omit it for the first page.", + "disabled": false + } + ], + "raw": "{{baseUrl}}\/v1\/auth\/tokens?cursor=architecto" }, "method": "GET", "header": [ @@ -214,19 +221,19 @@ { "header": [], "code": 200, - "body": "{\"data\":[{\"id\":\"1\",\"type\":\"personal-access-tokens\",\"attributes\":{\"name\":\"ios-app\",\"abilities\":[\"auth:me\",\"auth:logout\"],\"last_used_at\":null,\"expires_at\":\"2026-02-24T12:00:00+00:00\",\"created_at\":\"2026-02-23T12:00:00+00:00\",\"updated_at\":\"2026-02-23T12:00:00+00:00\",\"is_current\":true}}]}", - "name": "Token list payload." + "body": "[{\"id\":\"1\",\"name\":\"ios-app\",\"abilities\":[\"auth:me\",\"auth:logout\"],\"last_used_at\":null,\"expires_at\":\"2026-02-24T12:00:00+00:00\",\"created_at\":\"2026-02-23T12:00:00+00:00\",\"updated_at\":\"2026-02-23T12:00:00+00:00\",\"is_current\":true}]", + "name": "One page of tokens, newest first. Navigation is in RFC 8288 Link headers: rel=\"next\" and rel=\"prev\" when there is a page that way, and rel=\"first\"." }, { "header": [], "code": 401, - "body": "{\"message\":\"Unauthenticated.\"}", + "body": "{\"type\":\"https:\\\/\\\/apiguide.dev\\\/errors\\\/unauthorized\",\"title\":\"Unauthorized\",\"status\":401,\"detail\":\"Unauthenticated.\"}", "name": "Authentication failed." }, { "header": [], "code": 403, - "body": "{\"message\":\"Forbidden.\"}", + "body": "{\"type\":\"https:\\\/\\\/apiguide.dev\\\/errors\\\/forbidden\",\"title\":\"Forbidden\",\"status\":403,\"detail\":\"Forbidden.\"}", "name": "Token is missing required ability." } ] @@ -419,7 +426,7 @@ { "header": [], "code": 422, - "body": "{\"message\":\"The given data was invalid.\",\"errors\":{\"email\":[\"This password reset token is invalid.\"]}}", + "body": "{\"type\":\"https:\\\/\\\/apiguide.dev\\\/errors\\\/validation-failed\",\"title\":\"Validation Failed\",\"status\":422,\"detail\":\"This password reset token is invalid.\",\"errors\":{\"email\":[\"This password reset token is invalid.\"]}}", "name": "Reset token or payload was invalid." } ] @@ -536,7 +543,7 @@ { "header": [], "code": 403, - "body": "{\"message\":\"Invalid verification link.\"}", + "body": "{\"type\":\"https:\\\/\\\/apiguide.dev\\\/errors\\\/forbidden\",\"title\":\"Forbidden\",\"status\":403,\"detail\":\"Invalid verification link.\"}", "name": "Signed URL was invalid, expired, or mismatched." } ] @@ -580,7 +587,7 @@ { "header": [], "code": 401, - "body": "{\"message\":\"Unauthenticated.\"}", + "body": "{\"type\":\"https:\\\/\\\/apiguide.dev\\\/errors\\\/unauthorized\",\"title\":\"Unauthorized\",\"status\":401,\"detail\":\"Unauthenticated.\"}", "name": "Authentication failed." } ] diff --git a/public/docs/index.html b/public/docs/index.html index 152856e..d1d9baf 100644 --- a/public/docs/index.html +++ b/public/docs/index.html @@ -218,14 +218,11 @@

Register

{ "data": { "id": "", - "type": "users", - "attributes": { - "name": "Justina Gaylord", - "email": "lafayette.considine@example.com", - "email_verified_at": "2026-10-20T09:22:40+00:00", - "created_at": null, - "updated_at": null - } + "name": "Justina Gaylord", + "email": "lafayette.considine@example.com", + "email_verified_at": "2026-10-20T09:25:01+00:00", + "created_at": null, + "updated_at": null }, "meta": { "token": "1|example-token", @@ -240,7 +237,10 @@

Register

 
 {
-    "message": "The given data was invalid.",
+    "type": "https://apiguide.dev/errors/validation-failed",
+    "title": "Validation Failed",
+    "status": 422,
+    "detail": "The email has already been taken.",
     "errors": {
         "email": [
             "The email has already been taken."
@@ -428,14 +428,11 @@ 

Login

{ "data": { "id": "", - "type": "users", - "attributes": { - "name": "Justina Gaylord", - "email": "cormier.nick@example.com", - "email_verified_at": "2026-10-20T09:22:40+00:00", - "created_at": null, - "updated_at": null - } + "name": "Justina Gaylord", + "email": "cormier.nick@example.com", + "email_verified_at": "2026-10-20T09:25:01+00:00", + "created_at": null, + "updated_at": null }, "meta": { "token": "1|example-token", @@ -450,7 +447,10 @@

Login

 
 {
-    "message": "The given data was invalid.",
+    "type": "https://apiguide.dev/errors/validation-failed",
+    "title": "Validation Failed",
+    "status": 422,
+    "detail": "The provided credentials are incorrect.",
     "errors": {
         "email": [
             "The provided credentials are incorrect."
@@ -616,14 +616,11 @@ 

Get Current User

{ "data": { "id": "", - "type": "users", - "attributes": { - "name": "Morgan Hirthe", - "email": "dare.emelie@example.com", - "email_verified_at": "2026-10-20T09:22:40+00:00", - "created_at": null, - "updated_at": null - } + "name": "Morgan Hirthe", + "email": "dare.emelie@example.com", + "email_verified_at": "2026-10-20T09:25:01+00:00", + "created_at": null, + "updated_at": null } }
@@ -633,7 +630,10 @@

Get Current User

 
 {
-    "message": "Unauthenticated."
+    "type": "https://apiguide.dev/errors/unauthorized",
+    "title": "Unauthorized",
+    "status": 401,
+    "detail": "Unauthenticated."
 }
  
@@ -876,7 +876,7 @@

List Tokens

curl --request GET \
-    --get "http://localhost/v1/auth/tokens" \
+    --get "http://localhost/v1/auth/tokens?cursor=architecto" \
     --header "Authorization: Bearer {YOUR_BEARER_TOKEN}" \
     --header "Content-Type: application/json" \
     --header "Accept: application/json"
@@ -887,6 +887,12 @@

List Tokens

"http://localhost/v1/auth/tokens" ); +const params = { + "cursor": "architecto", +}; +Object.keys(params) + .forEach(key => url.searchParams.append(key, params[key])); + const headers = { "Authorization": "Bearer {YOUR_BEARER_TOKEN}", "Content-Type": "application/json", @@ -902,30 +908,25 @@

List Tokens

-

Example response (200, Token list payload.):

+

Example response (200, One page of tokens, newest first. Navigation is in RFC 8288 Link headers: rel="next" and rel="prev" when there is a page that way, and rel="first".):

 
-{
-    "data": [
-        {
-            "id": "1",
-            "type": "personal-access-tokens",
-            "attributes": {
-                "name": "ios-app",
-                "abilities": [
-                    "auth:me",
-                    "auth:logout"
-                ],
-                "last_used_at": null,
-                "expires_at": "2026-02-24T12:00:00+00:00",
-                "created_at": "2026-02-23T12:00:00+00:00",
-                "updated_at": "2026-02-23T12:00:00+00:00",
-                "is_current": true
-            }
-        }
-    ]
-}
+[
+    {
+        "id": "1",
+        "name": "ios-app",
+        "abilities": [
+            "auth:me",
+            "auth:logout"
+        ],
+        "last_used_at": null,
+        "expires_at": "2026-02-24T12:00:00+00:00",
+        "created_at": "2026-02-23T12:00:00+00:00",
+        "updated_at": "2026-02-23T12:00:00+00:00",
+        "is_current": true
+    }
+]
  

Example response (401, Authentication failed.):

@@ -933,7 +934,10 @@

List Tokens

 
 {
-    "message": "Unauthenticated."
+    "type": "https://apiguide.dev/errors/unauthorized",
+    "title": "Unauthorized",
+    "status": 401,
+    "detail": "Unauthenticated."
 }
  
@@ -942,7 +946,10 @@

List Tokens

 
 {
-    "message": "Forbidden."
+    "type": "https://apiguide.dev/errors/forbidden",
+    "title": "Forbidden",
+    "status": 403,
+    "detail": "Forbidden."
 }
  
@@ -1029,7 +1036,20 @@

Headers


Example: application/json

- +

Query Parameters

+
+ cursor   +string  +optional   +   + +
+

Opaque cursor from a Link header. Omit it for the first page. Example: architecto

+
+

Revoke All Tokens

@@ -1581,7 +1601,10 @@

Reset Password

 
 {
-    "message": "The given data was invalid.",
+    "type": "https://apiguide.dev/errors/validation-failed",
+    "title": "Validation Failed",
+    "status": 422,
+    "detail": "This password reset token is invalid.",
     "errors": {
         "email": [
             "This password reset token is invalid."
@@ -1963,7 +1986,10 @@ 

Verify Email

 
 {
-    "message": "Invalid verification link."
+    "type": "https://apiguide.dev/errors/forbidden",
+    "title": "Forbidden",
+    "status": 403,
+    "detail": "Invalid verification link."
 }
  
@@ -2153,7 +2179,10 @@

Send Verific
 
 {
-    "message": "Unauthenticated."
+    "type": "https://apiguide.dev/errors/unauthorized",
+    "title": "Unauthorized",
+    "status": 401,
+    "detail": "Unauthenticated."
 }
  
diff --git a/public/docs/openapi.yaml b/public/docs/openapi.yaml index 52efeac..9a03557 100644 --- a/public/docs/openapi.yaml +++ b/public/docs/openapi.yaml @@ -36,13 +36,11 @@ paths: example: data: id: '' - type: users - attributes: - name: 'Justina Gaylord' - email: lafayette.considine@example.com - email_verified_at: '2026-10-20T09:22:40+00:00' - created_at: null - updated_at: null + name: 'Justina Gaylord' + email: lafayette.considine@example.com + email_verified_at: '2026-10-20T09:25:01+00:00' + created_at: null + updated_at: null meta: token: 1|example-token token_type: Bearer @@ -54,29 +52,23 @@ paths: id: type: string example: '' - type: + name: type: string - example: users - attributes: - type: object - properties: - name: - type: string - example: 'Justina Gaylord' - email: - type: string - example: lafayette.considine@example.com - email_verified_at: - type: string - example: '2026-10-20T09:22:40+00:00' - created_at: - type: string - example: null - nullable: true - updated_at: - type: string - example: null - nullable: true + example: 'Justina Gaylord' + email: + type: string + example: lafayette.considine@example.com + email_verified_at: + type: string + example: '2026-10-20T09:25:01+00:00' + created_at: + type: string + example: null + nullable: true + updated_at: + type: string + example: null + nullable: true meta: type: object properties: @@ -93,18 +85,30 @@ paths: 422: description: 'Validation failed.' content: - application/json: + application/problem+json: schema: type: object example: - message: 'The given data was invalid.' + type: 'https://apiguide.dev/errors/validation-failed' + title: 'Validation Failed' + status: 422 + detail: 'The email has already been taken.' errors: email: - 'The email has already been taken.' properties: - message: + type: type: string - example: 'The given data was invalid.' + example: 'https://apiguide.dev/errors/validation-failed' + title: + type: string + example: 'Validation Failed' + status: + type: integer + example: 422 + detail: + type: string + example: 'The email has already been taken.' errors: type: object properties: @@ -160,13 +164,11 @@ paths: example: data: id: '' - type: users - attributes: - name: 'Justina Gaylord' - email: cormier.nick@example.com - email_verified_at: '2026-10-20T09:22:40+00:00' - created_at: null - updated_at: null + name: 'Justina Gaylord' + email: cormier.nick@example.com + email_verified_at: '2026-10-20T09:25:01+00:00' + created_at: null + updated_at: null meta: token: 1|example-token token_type: Bearer @@ -178,29 +180,23 @@ paths: id: type: string example: '' - type: + name: + type: string + example: 'Justina Gaylord' + email: + type: string + example: cormier.nick@example.com + email_verified_at: + type: string + example: '2026-10-20T09:25:01+00:00' + created_at: type: string - example: users - attributes: - type: object - properties: - name: - type: string - example: 'Justina Gaylord' - email: - type: string - example: cormier.nick@example.com - email_verified_at: - type: string - example: '2026-10-20T09:22:40+00:00' - created_at: - type: string - example: null - nullable: true - updated_at: - type: string - example: null - nullable: true + example: null + nullable: true + updated_at: + type: string + example: null + nullable: true meta: type: object properties: @@ -217,18 +213,30 @@ paths: 422: description: 'Credentials were invalid.' content: - application/json: + application/problem+json: schema: type: object example: - message: 'The given data was invalid.' + type: 'https://apiguide.dev/errors/validation-failed' + title: 'Validation Failed' + status: 422 + detail: 'The provided credentials are incorrect.' errors: email: - 'The provided credentials are incorrect.' properties: - message: + type: + type: string + example: 'https://apiguide.dev/errors/validation-failed' + title: type: string - example: 'The given data was invalid.' + example: 'Validation Failed' + status: + type: integer + example: 422 + detail: + type: string + example: 'The provided credentials are incorrect.' errors: type: object properties: @@ -321,18 +329,30 @@ paths: 422: description: 'Reset token or payload was invalid.' content: - application/json: + application/problem+json: schema: type: object example: - message: 'The given data was invalid.' + type: 'https://apiguide.dev/errors/validation-failed' + title: 'Validation Failed' + status: 422 + detail: 'This password reset token is invalid.' errors: email: - 'This password reset token is invalid.' properties: - message: + type: type: string - example: 'The given data was invalid.' + example: 'https://apiguide.dev/errors/validation-failed' + title: + type: string + example: 'Validation Failed' + status: + type: integer + example: 422 + detail: + type: string + example: 'This password reset token is invalid.' errors: type: object properties: @@ -458,13 +478,25 @@ paths: 403: description: 'Signed URL was invalid, expired, or mismatched.' content: - application/json: + application/problem+json: schema: type: object example: - message: 'Invalid verification link.' + type: 'https://apiguide.dev/errors/forbidden' + title: Forbidden + status: 403 + detail: 'Invalid verification link.' properties: - message: + type: + type: string + example: 'https://apiguide.dev/errors/forbidden' + title: + type: string + example: Forbidden + status: + type: integer + example: 403 + detail: type: string example: 'Invalid verification link.' tags: @@ -521,13 +553,11 @@ paths: example: data: id: '' - type: users - attributes: - name: 'Morgan Hirthe' - email: dare.emelie@example.com - email_verified_at: '2026-10-20T09:22:40+00:00' - created_at: null - updated_at: null + name: 'Morgan Hirthe' + email: dare.emelie@example.com + email_verified_at: '2026-10-20T09:25:01+00:00' + created_at: null + updated_at: null properties: data: type: object @@ -535,39 +565,45 @@ paths: id: type: string example: '' - type: + name: + type: string + example: 'Morgan Hirthe' + email: + type: string + example: dare.emelie@example.com + email_verified_at: + type: string + example: '2026-10-20T09:25:01+00:00' + created_at: type: string - example: users - attributes: - type: object - properties: - name: - type: string - example: 'Morgan Hirthe' - email: - type: string - example: dare.emelie@example.com - email_verified_at: - type: string - example: '2026-10-20T09:22:40+00:00' - created_at: - type: string - example: null - nullable: true - updated_at: - type: string - example: null - nullable: true + example: null + nullable: true + updated_at: + type: string + example: null + nullable: true 401: description: 'Authentication failed.' content: - application/json: + application/problem+json: schema: type: object example: - message: Unauthenticated. + type: 'https://apiguide.dev/errors/unauthorized' + title: Unauthorized + status: 401 + detail: Unauthenticated. properties: - message: + type: + type: string + example: 'https://apiguide.dev/errors/unauthorized' + title: + type: string + example: Unauthorized + status: + type: integer + example: 401 + detail: type: string example: Unauthenticated. tags: @@ -589,7 +625,7 @@ paths: 401: description: 'Authentication failed.' content: - application/json: + application/problem+json: schema: type: object example: @@ -605,106 +641,114 @@ paths: summary: 'List Tokens' operationId: listTokens description: 'List personal access tokens for the authenticated user.' - parameters: [] + parameters: + - + in: query + name: cursor + description: 'Opaque cursor from a Link header. Omit it for the first page.' + example: architecto + required: false + schema: + type: string + description: 'Opaque cursor from a Link header. Omit it for the first page.' + example: architecto responses: 200: - description: 'Token list payload.' + description: 'One page of tokens, newest first. Navigation is in RFC 8288 Link headers: rel="next" and rel="prev" when there is a page that way, and rel="first".' content: application/json: schema: - type: object + type: array + items: + type: object + properties: + id: + type: string + example: '1' + name: + type: string + example: ios-app + abilities: + type: array + example: + - 'auth:me' + - 'auth:logout' + items: + type: string + last_used_at: + type: string + example: null + nullable: true + expires_at: + type: string + example: '2026-02-24T12:00:00+00:00' + created_at: + type: string + example: '2026-02-23T12:00:00+00:00' + updated_at: + type: string + example: '2026-02-23T12:00:00+00:00' + is_current: + type: boolean + example: true example: - data: - - - id: '1' - type: personal-access-tokens - attributes: - name: ios-app - abilities: - - 'auth:me' - - 'auth:logout' - last_used_at: null - expires_at: '2026-02-24T12:00:00+00:00' - created_at: '2026-02-23T12:00:00+00:00' - updated_at: '2026-02-23T12:00:00+00:00' - is_current: true - properties: - data: - type: array - example: - - - id: '1' - type: personal-access-tokens - attributes: - name: ios-app - abilities: - - 'auth:me' - - 'auth:logout' - last_used_at: null - expires_at: '2026-02-24T12:00:00+00:00' - created_at: '2026-02-23T12:00:00+00:00' - updated_at: '2026-02-23T12:00:00+00:00' - is_current: true - items: - type: object - properties: - id: - type: string - example: '1' - type: - type: string - example: personal-access-tokens - attributes: - type: object - properties: - name: - type: string - example: ios-app - abilities: - type: array - example: - - 'auth:me' - - 'auth:logout' - items: - type: string - last_used_at: - type: string - example: null - nullable: true - expires_at: - type: string - example: '2026-02-24T12:00:00+00:00' - created_at: - type: string - example: '2026-02-23T12:00:00+00:00' - updated_at: - type: string - example: '2026-02-23T12:00:00+00:00' - is_current: - type: boolean - example: true + - + id: '1' + name: ios-app + abilities: + - 'auth:me' + - 'auth:logout' + last_used_at: null + expires_at: '2026-02-24T12:00:00+00:00' + created_at: '2026-02-23T12:00:00+00:00' + updated_at: '2026-02-23T12:00:00+00:00' + is_current: true 401: description: 'Authentication failed.' content: - application/json: + application/problem+json: schema: type: object example: - message: Unauthenticated. + type: 'https://apiguide.dev/errors/unauthorized' + title: Unauthorized + status: 401 + detail: Unauthenticated. properties: - message: + type: + type: string + example: 'https://apiguide.dev/errors/unauthorized' + title: + type: string + example: Unauthorized + status: + type: integer + example: 401 + detail: type: string example: Unauthenticated. 403: description: 'Token is missing required ability.' content: - application/json: + application/problem+json: schema: type: object example: - message: Forbidden. + type: 'https://apiguide.dev/errors/forbidden' + title: Forbidden + status: 403 + detail: Forbidden. properties: - message: + type: + type: string + example: 'https://apiguide.dev/errors/forbidden' + title: + type: string + example: Forbidden + status: + type: integer + example: 403 + detail: type: string example: Forbidden. tags: @@ -725,7 +769,7 @@ paths: 401: description: 'Authentication failed.' content: - application/json: + application/problem+json: schema: type: object example: @@ -737,7 +781,7 @@ paths: 403: description: 'Token is missing required ability.' content: - application/json: + application/problem+json: schema: type: object example: @@ -765,7 +809,7 @@ paths: 401: description: 'Authentication failed.' content: - application/json: + application/problem+json: schema: type: object example: @@ -777,7 +821,7 @@ paths: 403: description: 'Token is missing required ability.' content: - application/json: + application/problem+json: schema: type: object example: @@ -789,7 +833,7 @@ paths: 404: description: 'Token does not belong to current user or no longer exists.' content: - application/json: + application/problem+json: schema: type: object example: @@ -856,13 +900,25 @@ paths: 401: description: 'Authentication failed.' content: - application/json: + application/problem+json: schema: type: object example: - message: Unauthenticated. + type: 'https://apiguide.dev/errors/unauthorized' + title: Unauthorized + status: 401 + detail: Unauthenticated. properties: - message: + type: + type: string + example: 'https://apiguide.dev/errors/unauthorized' + title: + type: string + example: Unauthorized + status: + type: integer + example: 401 + detail: type: string example: Unauthenticated. tags: diff --git a/routes/api/v1.php b/routes/api/v1.php index f594573..ff7586c 100644 --- a/routes/api/v1.php +++ b/routes/api/v1.php @@ -36,7 +36,7 @@ Route::middleware(['auth:sanctum', 'throttle:auth-protected'])->group(function (): void { Route::get('/auth/me', MeController::class) - ->middleware('abilities:auth:me') + ->middleware(['abilities:auth:me', 'conditional']) ->name('v1.auth.me'); Route::post('/auth/logout', LogoutController::class) ->middleware('abilities:auth:logout') diff --git a/tests/Feature/AuthTokenManagementTest.php b/tests/Feature/AuthTokenManagementTest.php index f0089cf..d2e26c6 100644 --- a/tests/Feature/AuthTokenManagementTest.php +++ b/tests/Feature/AuthTokenManagementTest.php @@ -2,6 +2,7 @@ declare(strict_types=1); +use App\Http\Controllers\Api\V1\Auth\ListTokensController; use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; use Laravel\Sanctum\PersonalAccessToken; @@ -25,15 +26,15 @@ $response = $this->withToken($current->plainTextToken) ->getJson('/v1/auth/tokens') ->assertOk() - ->assertHeader('Content-Type', 'application/vnd.api+json') - ->assertJsonPath('meta.count', 2) - ->assertJsonCount(2, 'data') - ->assertJsonPath('data.0.type', 'personal-access-tokens'); + ->assertHeader('Content-Type', 'application/json') + ->assertJsonCount(2) + ->assertLinkHeader('first') + ->assertNoLinkHeader('next'); /** @var array> $data */ - $data = $response->json('data'); + $data = $response->json(); $isCurrentValues = array_map( - static fn(array $item): bool => (bool) data_get($item, 'attributes.is_current', false), + static fn(array $item): bool => (bool) ($item['is_current'] ?? false), $data, ); @@ -123,3 +124,38 @@ ->assertProblem(403) ->assertJsonPath('detail', __('api.errors.forbidden')); }); + +it('pages token lists with link headers', function (): void { + $user = User::factory()->create(); + $current = $user->createToken('current-device', ['auth:tokens:read']); + + foreach (range(1, ListTokensController::PER_PAGE) as $device) { + $user->createToken('device-' . $device); + } + + $first = $this->withToken($current->plainTextToken) + ->getJson('/v1/auth/tokens') + ->assertOk() + ->assertJsonCount(ListTokensController::PER_PAGE) + ->assertLinkHeader('first'); + + preg_match('/<([^>]+)>;\\s*rel="next"/', (string) $first->headers->get('Link'), $next); + + expect($next)->toHaveKey(1); + + $this->withToken($current->plainTextToken) + ->getJson($next[1]) + ->assertOk() + ->assertJsonCount(1) + ->assertJsonPath('0.name', 'current-device') + ->assertLinkHeader('prev'); +}); + +it('rejects token list cursors that cannot be decoded', function (): void { + $user = User::factory()->create(); + $token = $user->createToken('cursor-device', ['auth:tokens:read'])->plainTextToken; + + $this->withToken($token) + ->getJson('/v1/auth/tokens?cursor=not-a-cursor') + ->assertProblemType('https://apiguide.dev/errors/invalid-pagination-cursor', 400); +}); diff --git a/tests/Feature/AuthTokenTest.php b/tests/Feature/AuthTokenTest.php index 98d595f..ed098ee 100644 --- a/tests/Feature/AuthTokenTest.php +++ b/tests/Feature/AuthTokenTest.php @@ -22,14 +22,13 @@ $response ->assertCreated() - ->assertHeader('Content-Type', 'application/vnd.api+json') + ->assertHeader('Content-Type', 'application/json') ->assertJsonStructure([ 'meta' => ['token', 'token_type', 'expires_at'], - 'data' => ['id', 'type', 'attributes' => ['name', 'email']], + 'data' => ['id', 'name', 'email', 'email_verified_at', 'created_at', 'updated_at'], ]) ->assertJsonPath('meta.token_type', 'Bearer') - ->assertJsonPath('data.type', 'users') - ->assertJsonPath('data.attributes.email', 'jane@example.com'); + ->assertJsonPath('data.email', 'jane@example.com'); $user = User::query()->where('email', 'jane@example.com')->first(); @@ -52,10 +51,9 @@ $response ->assertOk() - ->assertHeader('Content-Type', 'application/vnd.api+json') + ->assertHeader('Content-Type', 'application/json') ->assertJsonPath('meta.token_type', 'Bearer') - ->assertJsonPath('data.type', 'users') - ->assertJsonPath('data.attributes.email', 'john@example.com'); + ->assertJsonPath('data.email', 'john@example.com'); expect(PersonalAccessToken::query()->count())->toBe(1); }); @@ -104,9 +102,23 @@ $this->withToken($token) ->getJson('/v1/auth/me') ->assertOk() - ->assertHeader('Content-Type', 'application/vnd.api+json') - ->assertJsonPath('data.type', 'users') - ->assertJsonPath('data.attributes.email', 'me@example.com'); + ->assertHeader('Content-Type', 'application/json') + ->assertJsonPath('data.email', 'me@example.com'); +}); + +it('answers a repeat me request with 304 when the etag still matches', function (): void { + $user = User::factory()->create(); + $token = $user->createToken('test-suite')->plainTextToken; + + $first = $this->withToken($token) + ->getJson('/v1/auth/me') + ->assertOk() + ->assertETag(); + + $this->withToken($token) + ->withHeaders(['If-None-Match' => (string) $first->headers->get('ETag')]) + ->getJson('/v1/auth/me') + ->assertNotModified(); }); it('revokes current token on logout', function (): void { diff --git a/tests/Feature/OpenApiContractTest.php b/tests/Feature/OpenApiContractTest.php index a95bde8..2f0f202 100644 --- a/tests/Feature/OpenApiContractTest.php +++ b/tests/Feature/OpenApiContractTest.php @@ -20,7 +20,7 @@ function generateOpenApiSpec(bool $forceGenerate = false): array { $specPath = base_path('public/docs/openapi.yaml'); - if ($forceGenerate || !File::exists($specPath)) { + if ($forceGenerate || ! File::exists($specPath)) { $exitCode = Artisan::call('scribe:generate', [ '--no-interaction' => true, ]); @@ -42,23 +42,23 @@ function generateOpenApiSpec(bool $forceGenerate = false): array */ function documentedResponseSchema(array $spec, string $path, string $method, int $status): ?array { - $operation = $spec['paths'][$path][strtolower($method)] ?? null; - if (! is_array($operation)) { + $operation = $spec['paths'][$path][mb_strtolower($method)] ?? null; + if ( ! is_array($operation)) { return null; } $response = $operation['responses'][(string) $status] ?? null; - if (! is_array($response)) { + if ( ! is_array($response)) { return null; } $content = $response['content'] ?? null; - if (! is_array($content) || $content === []) { + if ( ! is_array($content) || [] === $content) { return null; } $mediaType = $content['application/json'] ?? reset($content); - if (! is_array($mediaType)) { + if ( ! is_array($mediaType)) { return null; } @@ -75,15 +75,15 @@ function documentedResponseSchema(array $spec, string $path, string $method, int function resolveOpenApiSchema(array $spec, array $schema): array { $ref = $schema['$ref'] ?? null; - if (! is_string($ref) || ! str_starts_with($ref, '#/')) { + if ( ! is_string($ref) || ! str_starts_with($ref, '#/')) { return $schema; } - $segments = explode('/', ltrim($ref, '#/')); + $segments = explode('/', mb_ltrim($ref, '#/')); $resolved = $spec; foreach ($segments as $segment) { - if (! is_array($resolved) || ! array_key_exists($segment, $resolved)) { + if ( ! is_array($resolved) || ! array_key_exists($segment, $resolved)) { return $schema; } @@ -102,13 +102,13 @@ function assertMatchesOpenApiSchema(array $spec, array $schema, mixed $value, st { $resolvedSchema = resolveOpenApiSchema($spec, $schema); - if (($resolvedSchema['nullable'] ?? false) === true && $value === null) { + if (($resolvedSchema['nullable'] ?? false) === true && null === $value) { return; } if (isset($resolvedSchema['oneOf']) && is_array($resolvedSchema['oneOf'])) { foreach ($resolvedSchema['oneOf'] as $candidate) { - if (! is_array($candidate)) { + if ( ! is_array($candidate)) { continue; } @@ -116,7 +116,7 @@ function assertMatchesOpenApiSchema(array $spec, array $schema, mixed $value, st assertMatchesOpenApiSchema($spec, $candidate, $value, $path); return; - } catch (\Throwable) { + } catch (Throwable) { continue; } } @@ -126,7 +126,7 @@ function assertMatchesOpenApiSchema(array $spec, array $schema, mixed $value, st if (isset($resolvedSchema['anyOf']) && is_array($resolvedSchema['anyOf'])) { foreach ($resolvedSchema['anyOf'] as $candidate) { - if (! is_array($candidate)) { + if ( ! is_array($candidate)) { continue; } @@ -134,7 +134,7 @@ function assertMatchesOpenApiSchema(array $spec, array $schema, mixed $value, st assertMatchesOpenApiSchema($spec, $candidate, $value, $path); return; - } catch (\Throwable) { + } catch (Throwable) { continue; } } @@ -143,7 +143,7 @@ function assertMatchesOpenApiSchema(array $spec, array $schema, mixed $value, st } $type = $resolvedSchema['type'] ?? null; - if (! is_string($type)) { + if ( ! is_string($type)) { return; } @@ -178,17 +178,17 @@ function assertOpenApiObject(array $spec, array $schema, mixed $value, string $p } $properties = $schema['properties'] ?? []; - if (! is_array($properties)) { + if ( ! is_array($properties)) { return; } foreach ($properties as $propertyName => $propertySchema) { - if (! is_string($propertyName) || ! is_array($propertySchema) || ! array_key_exists($propertyName, $value)) { + if ( ! is_string($propertyName) || ! is_array($propertySchema) || ! array_key_exists($propertyName, $value)) { continue; } $isRequired = is_array($required) && in_array($propertyName, $required, true); - if ($value[$propertyName] === null && ! $isRequired && ($propertySchema['nullable'] ?? false) !== true) { + if (null === $value[$propertyName] && ! $isRequired && ($propertySchema['nullable'] ?? false) !== true) { continue; } @@ -207,7 +207,7 @@ function assertOpenApiArray(array $spec, array $schema, mixed $value, string $pa test()->assertTrue(array_is_list($value), sprintf('Expected list array at %s.', $path)); $itemSchema = $schema['items'] ?? null; - if (! is_array($itemSchema)) { + if ( ! is_array($itemSchema)) { return; } @@ -225,23 +225,23 @@ function assertOpenApiArray(array $spec, array $schema, mixed $value, string $pa $documentedOperations = collect($paths) ->flatMap( - fn (array $operations, string $path) => collect($operations) + fn(array $operations, string $path) => collect($operations) ->keys() - ->filter(fn (string $method) => in_array(strtoupper($method), ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS', 'HEAD', 'TRACE'], true)) - ->reject(fn (string $method) => strtoupper($method) === 'HEAD') - ->map(fn (string $method) => strtoupper($method).' '.$path) + ->filter(fn(string $method) => in_array(mb_strtoupper($method), ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS', 'HEAD', 'TRACE'], true)) + ->reject(fn(string $method) => 'HEAD' === mb_strtoupper($method)) + ->map(fn(string $method) => mb_strtoupper($method) . ' ' . $path), ) ->sort() ->values(); $routeOperations = collect(Route::getRoutes()->getRoutes()) - ->filter(fn (\Illuminate\Routing\Route $route) => str_starts_with($route->uri(), 'v1/auth')) - ->flatMap(function (\Illuminate\Routing\Route $route) { - $uri = '/'.$route->uri(); + ->filter(fn(Illuminate\Routing\Route $route) => str_starts_with($route->uri(), 'v1/auth')) + ->flatMap(function (Illuminate\Routing\Route $route) { + $uri = '/' . $route->uri(); return collect($route->methods()) - ->reject(fn (string $method) => $method === 'HEAD') - ->map(fn (string $method) => strtoupper($method).' '.$uri); + ->reject(fn(string $method) => 'HEAD' === $method) + ->map(fn(string $method) => mb_strtoupper($method) . ' ' . $uri); }) ->unique() ->sort() @@ -342,7 +342,7 @@ function assertOpenApiArray(array $spec, array $schema, mixed $value, string $pa ]; foreach ($checks as $check) { - $method = strtolower($check['method']); + $method = mb_strtolower($check['method']); $path = $check['path']; $response = $check['response']; $actualStatus = $response->status(); @@ -351,21 +351,32 @@ function assertOpenApiArray(array $spec, array $schema, mixed $value, string $pa $this->assertContains( $actualStatus, $documentedResponses, - sprintf('%s %s returned %d but OpenAPI does not declare it.', strtoupper($method), $path, $actualStatus), + sprintf('%s %s returned %d but OpenAPI does not declare it.', mb_strtoupper($method), $path, $actualStatus), ); - $schema = documentedResponseSchema($spec, $path, strtoupper($method), $actualStatus); - if ($schema === null) { + $documentedMediaTypes = array_keys($paths[$path][$method]['responses'][(string) $actualStatus]['content'] ?? []); + $actualMediaType = mb_strtolower(mb_trim(explode(';', (string) $response->headers->get('Content-Type'))[0])); + + if ([] !== $documentedMediaTypes) { + $this->assertContains( + $actualMediaType, + $documentedMediaTypes, + sprintf('%s %s returned %s but OpenAPI documents %s.', mb_strtoupper($method), $path, $actualMediaType, implode(', ', $documentedMediaTypes)), + ); + } + + $schema = documentedResponseSchema($spec, $path, mb_strtoupper($method), $actualStatus); + if (null === $schema) { continue; } $rawContent = $response->getContent(); - if ($rawContent === false || $rawContent === '') { + if (false === $rawContent || '' === $rawContent) { continue; } $payload = json_decode($rawContent, true); - $this->assertNotNull($payload, sprintf('Expected JSON response body for %s %s status %d.', strtoupper($method), $path, $actualStatus)); + $this->assertNotNull($payload, sprintf('Expected JSON response body for %s %s status %d.', mb_strtoupper($method), $path, $actualStatus)); assertMatchesOpenApiSchema($spec, $schema, $payload, '$'); } }); From 743de92494fe02404a34cde6e762fb78613b4465 Mon Sep 17 00:00:00 2001 From: Steve McDougall Date: Tue, 20 Oct 2026 10:27:24 +0100 Subject: [PATCH 04/10] chore: clean static analysis and run it in CI PHPStan at level 10 reported 72 errors that CI never ran. They are fixed with typed reads (Arr::string, config()->string(), typed model properties) rather than casts from mixed, and CI now runs Pint and PHPStan before the tests. The payloads' fromReqest is renamed fromRequest. Two errors are ignored in place with the reason: CursorPage::of() in api-toolbox types its paginator too narrowly to accept int keys, and Sanctum types currentAccessToken() as never being a TransientToken. --- .github/workflows/ci-tests.yml | 6 +++++ .scribe/endpoints.cache/00.yaml | 6 ++--- .scribe/endpoints/00.yaml | 6 ++--- .../Api/V1/Auth/DeleteAllTokensController.php | 2 +- .../Api/V1/Auth/DeleteTokenController.php | 8 +++--- .../Api/V1/Auth/ForgotPasswordController.php | 4 +-- .../Api/V1/Auth/ListTokensController.php | 5 +++- .../Api/V1/Auth/LoginController.php | 6 ++--- .../Api/V1/Auth/LogoutController.php | 12 +++++---- .../Api/V1/Auth/RegisterController.php | 6 ++--- .../Api/V1/Auth/ResetPasswordController.php | 6 +++-- ...mailVerificationNotificationController.php | 11 ++++---- .../Auth/ShowResetPasswordTokenController.php | 2 +- .../Api/V1/Auth/VerifyEmailController.php | 6 ++--- .../Middleware/EnforceTransportSecurity.php | 2 +- app/Http/Middleware/SetRequestLocale.php | 8 +++--- app/Http/Payloads/V1/DeleteTokenPayload.php | 12 ++++----- .../Payloads/V1/ForgotPasswordPayload.php | 12 ++++----- app/Http/Payloads/V1/LoginPayload.php | 16 +++++------ app/Http/Payloads/V1/RegisterPayload.php | 20 +++++++------- app/Http/Payloads/V1/ResetPasswordPayload.php | 18 ++++++------- .../V1/ShowResetPasswordTokenPayload.php | 14 +++++----- app/Http/Payloads/V1/VerifyEmailPayload.php | 14 +++++----- app/Http/Requests/Auth/DeleteTokenRequest.php | 5 +++- .../Auth/ShowResetPasswordTokenRequest.php | 5 +++- app/Http/Requests/Auth/VerifyEmailRequest.php | 5 +++- .../Resources/PersonalAccessTokenResource.php | 24 ++++++++--------- app/Http/Resources/UserResource.php | 18 ++++++------- app/Models/User.php | 6 ++++- app/Providers/AppServiceProvider.php | 15 ++++++----- .../ProblemDetailsOpenApiGenerator.php | 10 +++++-- app/Support/ProductionSecurityChecks.php | 10 +++---- config/app.php | 2 +- config/cors.php | 2 +- config/security.php | 2 +- .../0001_01_01_000000_create_users_table.php | 2 +- .../0001_01_01_000001_create_cache_table.php | 2 +- .../0001_01_01_000002_create_jobs_table.php | 2 +- ...01_create_personal_access_tokens_table.php | 2 +- lang/scribe.php | 2 ++ public/docs/collection.json | 8 +++--- public/docs/index.html | 12 ++++----- public/docs/openapi.yaml | 27 ++++++++++--------- tests/Feature/AuthAuditTrailTest.php | 18 +++++-------- tests/Feature/DeprecationTest.php | 6 ++--- .../Feature/ProductionSecurityChecksTest.php | 10 +++---- 46 files changed, 214 insertions(+), 183 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index f6e94d7..a85869b 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -31,5 +31,11 @@ jobs: cp .env.example .env php artisan key:generate + - name: Check code style + run: composer lint + + - name: Run static analysis + run: composer stan + - name: Run test suite run: php artisan test diff --git a/.scribe/endpoints.cache/00.yaml b/.scribe/endpoints.cache/00.yaml index 77a7fc4..c953ef1 100644 --- a/.scribe/endpoints.cache/00.yaml +++ b/.scribe/endpoints.cache/00.yaml @@ -80,7 +80,7 @@ endpoints: - custom: [] status: 201 - content: '{"data":{"id":"","name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:25:01+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":null,"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:27:05+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Registration succeeded.' - @@ -159,7 +159,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"","name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:25:01+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":null,"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:27:05+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Login succeeded.' - @@ -519,7 +519,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"","name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:25:01+00:00","created_at":null,"updated_at":null}}' + content: '{"data":{"id":null,"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:27:05+00:00","created_at":null,"updated_at":null}}' headers: [] description: 'Authenticated user profile.' - diff --git a/.scribe/endpoints/00.yaml b/.scribe/endpoints/00.yaml index 49bbee9..7edd57b 100644 --- a/.scribe/endpoints/00.yaml +++ b/.scribe/endpoints/00.yaml @@ -78,7 +78,7 @@ endpoints: - custom: [] status: 201 - content: '{"data":{"id":"","name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:25:01+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":null,"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:27:05+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Registration succeeded.' - @@ -157,7 +157,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"","name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:25:01+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":null,"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:27:05+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Login succeeded.' - @@ -517,7 +517,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"","name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:25:01+00:00","created_at":null,"updated_at":null}}' + content: '{"data":{"id":null,"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:27:05+00:00","created_at":null,"updated_at":null}}' headers: [] description: 'Authenticated user profile.' - diff --git a/app/Http/Controllers/Api/V1/Auth/DeleteAllTokensController.php b/app/Http/Controllers/Api/V1/Auth/DeleteAllTokensController.php index 9d065c2..1baad1d 100644 --- a/app/Http/Controllers/Api/V1/Auth/DeleteAllTokensController.php +++ b/app/Http/Controllers/Api/V1/Auth/DeleteAllTokensController.php @@ -29,7 +29,7 @@ public function __invoke(#[CurrentUser] User $user): Response $user->tokens()->delete(); SecurityAudit::log('auth.tokens.revoked_all', [ - 'user_id' => (string) $user->getKey(), + 'user_id' => $user->id, 'count' => $deletedCount, ]); diff --git a/app/Http/Controllers/Api/V1/Auth/DeleteTokenController.php b/app/Http/Controllers/Api/V1/Auth/DeleteTokenController.php index 9613db5..d92c790 100644 --- a/app/Http/Controllers/Api/V1/Auth/DeleteTokenController.php +++ b/app/Http/Controllers/Api/V1/Auth/DeleteTokenController.php @@ -30,13 +30,13 @@ final class DeleteTokenController { public function __invoke(DeleteTokenRequest $request, #[CurrentUser] User $user): Response { - $payload = DeleteTokenPayload::fromReqest($request); + $payload = DeleteTokenPayload::fromRequest($request); $token = $user->tokens()->whereKey($payload->tokenId)->first(); if ( ! $token) { SecurityAudit::log('auth.tokens.revoke_failed', [ - 'user_id' => (string) $user->getKey(), + 'user_id' => $user->id, 'token_id' => (string) $payload->tokenId, 'reason' => 'not_found', ]); @@ -45,8 +45,8 @@ public function __invoke(DeleteTokenRequest $request, #[CurrentUser] User $user) } SecurityAudit::log('auth.tokens.revoked', [ - 'user_id' => (string) $user->getKey(), - 'token_id' => (string) $token->getKey(), + 'user_id' => $user->id, + 'token_id' => (string) $token->id, ]); $token->delete(); diff --git a/app/Http/Controllers/Api/V1/Auth/ForgotPasswordController.php b/app/Http/Controllers/Api/V1/Auth/ForgotPasswordController.php index 56609a8..72b1921 100644 --- a/app/Http/Controllers/Api/V1/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Api/V1/Auth/ForgotPasswordController.php @@ -24,13 +24,13 @@ #[Response( content: ['message' => 'If the account exists, a password reset link has been sent.'], status: 200, - description: 'Password reset request accepted.' + description: 'Password reset request accepted.', )] final class ForgotPasswordController { public function __invoke(ForgotPasswordRequest $request): JsonResponse { - $payload = ForgotPasswordPayload::fromReqest($request); + $payload = ForgotPasswordPayload::fromRequest($request); $status = Password::broker()->sendResetLink([ 'email' => $payload->email, diff --git a/app/Http/Controllers/Api/V1/Auth/ListTokensController.php b/app/Http/Controllers/Api/V1/Auth/ListTokensController.php index 8ffa556..1fdf1c8 100644 --- a/app/Http/Controllers/Api/V1/Auth/ListTokensController.php +++ b/app/Http/Controllers/Api/V1/Auth/ListTokensController.php @@ -67,10 +67,13 @@ public function __invoke(Request $request, #[CurrentUser] User $user): CursorPag ->cursorPaginate(self::PER_PAGE); SecurityAudit::log('auth.tokens.listed', [ - 'user_id' => (string) $user->getKey(), + 'user_id' => $user->id, 'count' => count($tokens->items()), ]); + // CursorPage::of() asks for CursorPaginator, which no paginator with int + // keys can satisfy because TKey is invariant. Remove once api-toolbox widens the type. + // @phpstan-ignore argument.type return CursorPage::of($tokens, PersonalAccessTokenResource::class); } } diff --git a/app/Http/Controllers/Api/V1/Auth/LoginController.php b/app/Http/Controllers/Api/V1/Auth/LoginController.php index 62f0049..ed0cbc2 100644 --- a/app/Http/Controllers/Api/V1/Auth/LoginController.php +++ b/app/Http/Controllers/Api/V1/Auth/LoginController.php @@ -49,7 +49,7 @@ final class LoginController { public function __invoke(LoginRequest $request): JsonResponse { - $payload = LoginPayload::fromReqest($request); + $payload = LoginPayload::fromRequest($request); $user = User::query()->where('email', $payload->email)->first(); @@ -67,7 +67,7 @@ public function __invoke(LoginRequest $request): JsonResponse [$token, $expiresAt] = $this->issueToken($user, $payload->deviceName); SecurityAudit::log('auth.login.succeeded', [ - 'user_id' => (string) $user->getKey(), + 'user_id' => $user->id, 'email_hash' => SecurityAudit::hashEmail($payload->email), 'device_name' => $payload->deviceName, 'token_expires_at' => $expiresAt?->toAtomString(), @@ -115,7 +115,7 @@ private function defaultAbilities(): array } return array_values(array_filter( - array_map(static fn(mixed $ability): string => mb_trim((string) $ability), $abilities), + array_map(static fn(mixed $ability): string => is_string($ability) ? mb_trim($ability) : '', $abilities), static fn(string $ability): bool => '' !== $ability, )); } diff --git a/app/Http/Controllers/Api/V1/Auth/LogoutController.php b/app/Http/Controllers/Api/V1/Auth/LogoutController.php index 9f71e07..256839d 100644 --- a/app/Http/Controllers/Api/V1/Auth/LogoutController.php +++ b/app/Http/Controllers/Api/V1/Auth/LogoutController.php @@ -26,19 +26,21 @@ final class LogoutController { public function __invoke(Request $request, #[CurrentUser] User $user): Response { - /** @var PersonalAccessToken $token */ $token = $user->currentAccessToken(); - if ($token) { + // Sanctum types this as the token model, but a session-authenticated request gets a + // TransientToken, which has nothing to revoke. + // @phpstan-ignore instanceof.alwaysTrue + if ($token instanceof PersonalAccessToken) { SecurityAudit::log('auth.logout.succeeded', [ - 'user_id' => (string) $user->getKey(), - 'token_id' => (string) $token->getKey(), + 'user_id' => $user->id, + 'token_id' => (string) $token->id, ]); $token->delete(); } else { SecurityAudit::log('auth.logout.succeeded', [ - 'user_id' => (string) $user->getKey(), + 'user_id' => $user->id, 'token_id' => null, ]); } diff --git a/app/Http/Controllers/Api/V1/Auth/RegisterController.php b/app/Http/Controllers/Api/V1/Auth/RegisterController.php index a04f4cc..e309b85 100644 --- a/app/Http/Controllers/Api/V1/Auth/RegisterController.php +++ b/app/Http/Controllers/Api/V1/Auth/RegisterController.php @@ -49,7 +49,7 @@ final class RegisterController { public function __invoke(RegisterRequest $request): JsonResponse { - $payload = RegisterPayload::fromReqest($request); + $payload = RegisterPayload::fromRequest($request); $user = User::create([ 'name' => $payload->name, @@ -62,7 +62,7 @@ public function __invoke(RegisterRequest $request): JsonResponse [$token, $expiresAt] = $this->issueToken($user, $payload->deviceName); SecurityAudit::log('auth.register.succeeded', [ - 'user_id' => (string) $user->getKey(), + 'user_id' => $user->id, 'email_hash' => SecurityAudit::hashEmail($user->email), 'device_name' => $payload->deviceName, 'token_expires_at' => $expiresAt?->toAtomString(), @@ -110,7 +110,7 @@ private function defaultAbilities(): array } return array_values(array_filter( - array_map(static fn(mixed $ability): string => mb_trim((string) $ability), $abilities), + array_map(static fn(mixed $ability): string => is_string($ability) ? mb_trim($ability) : '', $abilities), static fn(string $ability): bool => '' !== $ability, )); } diff --git a/app/Http/Controllers/Api/V1/Auth/ResetPasswordController.php b/app/Http/Controllers/Api/V1/Auth/ResetPasswordController.php index 429af72..8ca5ea8 100644 --- a/app/Http/Controllers/Api/V1/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Api/V1/Auth/ResetPasswordController.php @@ -44,7 +44,7 @@ final class ResetPasswordController { public function __invoke(ResetPasswordRequest $request): JsonResponse { - $payload = ResetPasswordPayload::fromReqest($request); + $payload = ResetPasswordPayload::fromRequest($request); $resetUserId = null; $status = Password::broker()->reset( @@ -60,13 +60,15 @@ function (User $user, string $password) use (&$resetUserId): void { 'remember_token' => Str::random(60), ])->save(); - $resetUserId = (string) $user->getKey(); + $resetUserId = $user->id; event(new PasswordReset($user)); }, ); if (Password::PASSWORD_RESET !== $status) { + $status = is_string($status) ? $status : 'unknown'; + SecurityAudit::log('auth.password_reset.failed', [ 'email_hash' => SecurityAudit::hashEmail($payload->email), 'status' => $status, diff --git a/app/Http/Controllers/Api/V1/Auth/SendEmailVerificationNotificationController.php b/app/Http/Controllers/Api/V1/Auth/SendEmailVerificationNotificationController.php index 55956b8..45dbb66 100644 --- a/app/Http/Controllers/Api/V1/Auth/SendEmailVerificationNotificationController.php +++ b/app/Http/Controllers/Api/V1/Auth/SendEmailVerificationNotificationController.php @@ -4,9 +4,10 @@ namespace App\Http\Controllers\Api\V1\Auth; +use App\Models\User; use App\Support\SecurityAudit; +use Illuminate\Container\Attributes\CurrentUser; use Illuminate\Http\JsonResponse; -use Illuminate\Http\Request; use Knuckles\Scribe\Attributes\Authenticated; use Knuckles\Scribe\Attributes\Endpoint; use Knuckles\Scribe\Attributes\Group; @@ -31,13 +32,11 @@ )] final class SendEmailVerificationNotificationController { - public function __invoke(Request $request): JsonResponse + public function __invoke(#[CurrentUser] User $user): JsonResponse { - $user = $request->user(); - if ($user->hasVerifiedEmail()) { SecurityAudit::log('auth.email_verification.already_verified', [ - 'user_id' => (string) $user->getKey(), + 'user_id' => $user->id, ]); return new JsonResponse([ @@ -48,7 +47,7 @@ public function __invoke(Request $request): JsonResponse $user->sendEmailVerificationNotification(); SecurityAudit::log('auth.email_verification.notification_sent', [ - 'user_id' => (string) $user->getKey(), + 'user_id' => $user->id, ]); return new JsonResponse([ diff --git a/app/Http/Controllers/Api/V1/Auth/ShowResetPasswordTokenController.php b/app/Http/Controllers/Api/V1/Auth/ShowResetPasswordTokenController.php index d92183e..127819b 100644 --- a/app/Http/Controllers/Api/V1/Auth/ShowResetPasswordTokenController.php +++ b/app/Http/Controllers/Api/V1/Auth/ShowResetPasswordTokenController.php @@ -26,7 +26,7 @@ final class ShowResetPasswordTokenController { public function __invoke(ShowResetPasswordTokenRequest $request): JsonResponse { - $payload = ShowResetPasswordTokenPayload::fromReqest($request); + $payload = ShowResetPasswordTokenPayload::fromRequest($request); return new JsonResponse([ 'token' => $payload->token, diff --git a/app/Http/Controllers/Api/V1/Auth/VerifyEmailController.php b/app/Http/Controllers/Api/V1/Auth/VerifyEmailController.php index f28bfc8..8582d88 100644 --- a/app/Http/Controllers/Api/V1/Auth/VerifyEmailController.php +++ b/app/Http/Controllers/Api/V1/Auth/VerifyEmailController.php @@ -38,13 +38,13 @@ final class VerifyEmailController { public function __invoke(VerifyEmailRequest $request): JsonResponse { - $payload = VerifyEmailPayload::fromReqest($request); + $payload = VerifyEmailPayload::fromRequest($request); $user = User::query()->findOrFail($payload->id); if ( ! hash_equals(sha1($user->getEmailForVerification()), $payload->hash)) { SecurityAudit::log('auth.email_verification.failed', [ - 'user_id' => (string) $user->getKey(), + 'user_id' => $user->id, 'reason' => 'hash_mismatch', ]); @@ -58,7 +58,7 @@ public function __invoke(VerifyEmailRequest $request): JsonResponse } SecurityAudit::log('auth.email_verification.succeeded', [ - 'user_id' => (string) $user->getKey(), + 'user_id' => $user->id, 'already_verified' => $wasAlreadyVerified, ]); diff --git a/app/Http/Middleware/EnforceTransportSecurity.php b/app/Http/Middleware/EnforceTransportSecurity.php index 6c239d1..7987d2d 100644 --- a/app/Http/Middleware/EnforceTransportSecurity.php +++ b/app/Http/Middleware/EnforceTransportSecurity.php @@ -22,7 +22,7 @@ public function handle(Request $request, Closure $next): Response $response = $next($request); if ((bool) config('security.hsts.enabled', true) && $request->isSecure()) { - $maxAge = max((int) config('security.hsts.max_age', 31536000), 0); + $maxAge = max(config()->integer('security.hsts.max_age', 31536000), 0); $directives = ["max-age={$maxAge}"]; if ((bool) config('security.hsts.include_subdomains', true)) { diff --git a/app/Http/Middleware/SetRequestLocale.php b/app/Http/Middleware/SetRequestLocale.php index 99db4fa..c09b01f 100644 --- a/app/Http/Middleware/SetRequestLocale.php +++ b/app/Http/Middleware/SetRequestLocale.php @@ -17,14 +17,14 @@ final class SetRequestLocale public function handle(Request $request, Closure $next): Response { $supportedLocales = array_values(array_filter(array_map( - static fn (mixed $locale): string => trim((string) $locale), - (array) config('app.supported_locales', [config('app.locale')]), + static fn(mixed $locale): string => is_string($locale) ? mb_trim($locale) : '', + config()->array('app.supported_locales', [config()->string('app.locale')]), ))); $preferredLocale = $request->getPreferredLanguage($supportedLocales); - $resolvedLocale = is_string($preferredLocale) && $preferredLocale !== '' + $resolvedLocale = is_string($preferredLocale) && '' !== $preferredLocale ? $preferredLocale - : (string) config('app.fallback_locale', 'en'); + : config()->string('app.fallback_locale', 'en'); App::setLocale($resolvedLocale); diff --git a/app/Http/Payloads/V1/DeleteTokenPayload.php b/app/Http/Payloads/V1/DeleteTokenPayload.php index 1dfb058..29f5b43 100644 --- a/app/Http/Payloads/V1/DeleteTokenPayload.php +++ b/app/Http/Payloads/V1/DeleteTokenPayload.php @@ -6,6 +6,7 @@ use Illuminate\Foundation\Http\FormRequest; use Illuminate\Http\Request; +use Illuminate\Support\Arr; final readonly class DeleteTokenPayload { @@ -13,12 +14,12 @@ public function __construct( public int $tokenId, ) {} - public static function fromReqest(Request $request): self + public static function fromRequest(Request $request): self { $data = self::validatedData($request); return new self( - tokenId: (int) $data['token_id'], + tokenId: (int) Arr::string($data, 'token_id'), ); } @@ -27,10 +28,9 @@ public static function fromReqest(Request $request): self */ private static function validatedData(Request $request): array { - if ($request instanceof FormRequest) { - return $request->validated(); - } + /** @var array $data */ + $data = $request instanceof FormRequest ? $request->validated() : $request->all(); - return $request->all(); + return $data; } } diff --git a/app/Http/Payloads/V1/ForgotPasswordPayload.php b/app/Http/Payloads/V1/ForgotPasswordPayload.php index 872d880..497a9e8 100644 --- a/app/Http/Payloads/V1/ForgotPasswordPayload.php +++ b/app/Http/Payloads/V1/ForgotPasswordPayload.php @@ -6,6 +6,7 @@ use Illuminate\Foundation\Http\FormRequest; use Illuminate\Http\Request; +use Illuminate\Support\Arr; final readonly class ForgotPasswordPayload { @@ -13,12 +14,12 @@ public function __construct( public string $email, ) {} - public static function fromReqest(Request $request): self + public static function fromRequest(Request $request): self { $data = self::validatedData($request); return new self( - email: (string) $data['email'], + email: Arr::string($data, 'email'), ); } @@ -27,10 +28,9 @@ public static function fromReqest(Request $request): self */ private static function validatedData(Request $request): array { - if ($request instanceof FormRequest) { - return $request->validated(); - } + /** @var array $data */ + $data = $request instanceof FormRequest ? $request->validated() : $request->all(); - return $request->all(); + return $data; } } diff --git a/app/Http/Payloads/V1/LoginPayload.php b/app/Http/Payloads/V1/LoginPayload.php index 9ab06b8..bb31982 100644 --- a/app/Http/Payloads/V1/LoginPayload.php +++ b/app/Http/Payloads/V1/LoginPayload.php @@ -6,6 +6,7 @@ use Illuminate\Foundation\Http\FormRequest; use Illuminate\Http\Request; +use Illuminate\Support\Arr; final readonly class LoginPayload { @@ -15,14 +16,14 @@ public function __construct( public string $deviceName, ) {} - public static function fromReqest(Request $request): self + public static function fromRequest(Request $request): self { $data = self::validatedData($request); return new self( - email: (string) $data['email'], - password: (string) $data['password'], - deviceName: (string) $data['device_name'], + email: Arr::string($data, 'email'), + password: Arr::string($data, 'password'), + deviceName: Arr::string($data, 'device_name'), ); } @@ -31,10 +32,9 @@ public static function fromReqest(Request $request): self */ private static function validatedData(Request $request): array { - if ($request instanceof FormRequest) { - return $request->validated(); - } + /** @var array $data */ + $data = $request instanceof FormRequest ? $request->validated() : $request->all(); - return $request->all(); + return $data; } } diff --git a/app/Http/Payloads/V1/RegisterPayload.php b/app/Http/Payloads/V1/RegisterPayload.php index 67447db..60d72c9 100644 --- a/app/Http/Payloads/V1/RegisterPayload.php +++ b/app/Http/Payloads/V1/RegisterPayload.php @@ -6,6 +6,7 @@ use Illuminate\Foundation\Http\FormRequest; use Illuminate\Http\Request; +use Illuminate\Support\Arr; final readonly class RegisterPayload { @@ -16,16 +17,16 @@ public function __construct( public string $deviceName, ) {} - public static function fromReqest(Request $request): self + public static function fromRequest(Request $request): self { $data = self::validatedData($request); return new self( - name: (string) $data['name'], - email: (string) $data['email'], - password: (string) $data['password'], - deviceName: isset($data['device_name']) && $data['device_name'] !== '' - ? (string) $data['device_name'] + name: Arr::string($data, 'name'), + email: Arr::string($data, 'email'), + password: Arr::string($data, 'password'), + deviceName: isset($data['device_name']) && '' !== $data['device_name'] + ? Arr::string($data, 'device_name') : 'api-client', ); } @@ -35,10 +36,9 @@ public static function fromReqest(Request $request): self */ private static function validatedData(Request $request): array { - if ($request instanceof FormRequest) { - return $request->validated(); - } + /** @var array $data */ + $data = $request instanceof FormRequest ? $request->validated() : $request->all(); - return $request->all(); + return $data; } } diff --git a/app/Http/Payloads/V1/ResetPasswordPayload.php b/app/Http/Payloads/V1/ResetPasswordPayload.php index e82e26e..23f6029 100644 --- a/app/Http/Payloads/V1/ResetPasswordPayload.php +++ b/app/Http/Payloads/V1/ResetPasswordPayload.php @@ -6,6 +6,7 @@ use Illuminate\Foundation\Http\FormRequest; use Illuminate\Http\Request; +use Illuminate\Support\Arr; final readonly class ResetPasswordPayload { @@ -16,15 +17,15 @@ public function __construct( public string $passwordConfirmation, ) {} - public static function fromReqest(Request $request): self + public static function fromRequest(Request $request): self { $data = self::validatedData($request); return new self( - token: (string) $data['token'], - email: (string) $data['email'], - password: (string) $data['password'], - passwordConfirmation: (string) $data['password_confirmation'], + token: Arr::string($data, 'token'), + email: Arr::string($data, 'email'), + password: Arr::string($data, 'password'), + passwordConfirmation: Arr::string($data, 'password_confirmation'), ); } @@ -33,10 +34,9 @@ public static function fromReqest(Request $request): self */ private static function validatedData(Request $request): array { - if ($request instanceof FormRequest) { - return $request->validated(); - } + /** @var array $data */ + $data = $request instanceof FormRequest ? $request->validated() : $request->all(); - return $request->all(); + return $data; } } diff --git a/app/Http/Payloads/V1/ShowResetPasswordTokenPayload.php b/app/Http/Payloads/V1/ShowResetPasswordTokenPayload.php index 877d83c..fe5806e 100644 --- a/app/Http/Payloads/V1/ShowResetPasswordTokenPayload.php +++ b/app/Http/Payloads/V1/ShowResetPasswordTokenPayload.php @@ -6,6 +6,7 @@ use Illuminate\Foundation\Http\FormRequest; use Illuminate\Http\Request; +use Illuminate\Support\Arr; final readonly class ShowResetPasswordTokenPayload { @@ -14,13 +15,13 @@ public function __construct( public ?string $email, ) {} - public static function fromReqest(Request $request): self + public static function fromRequest(Request $request): self { $data = self::validatedData($request); return new self( - token: (string) $data['token'], - email: isset($data['email']) ? (string) $data['email'] : null, + token: Arr::string($data, 'token'), + email: isset($data['email']) ? Arr::string($data, 'email') : null, ); } @@ -29,10 +30,9 @@ public static function fromReqest(Request $request): self */ private static function validatedData(Request $request): array { - if ($request instanceof FormRequest) { - return $request->validated(); - } + /** @var array $data */ + $data = $request instanceof FormRequest ? $request->validated() : $request->all(); - return $request->all(); + return $data; } } diff --git a/app/Http/Payloads/V1/VerifyEmailPayload.php b/app/Http/Payloads/V1/VerifyEmailPayload.php index 552357e..c8aac90 100644 --- a/app/Http/Payloads/V1/VerifyEmailPayload.php +++ b/app/Http/Payloads/V1/VerifyEmailPayload.php @@ -6,6 +6,7 @@ use Illuminate\Foundation\Http\FormRequest; use Illuminate\Http\Request; +use Illuminate\Support\Arr; final readonly class VerifyEmailPayload { @@ -14,13 +15,13 @@ public function __construct( public string $hash, ) {} - public static function fromReqest(Request $request): self + public static function fromRequest(Request $request): self { $data = self::validatedData($request); return new self( - id: (string) $data['id'], - hash: (string) $data['hash'], + id: Arr::string($data, 'id'), + hash: Arr::string($data, 'hash'), ); } @@ -29,10 +30,9 @@ public static function fromReqest(Request $request): self */ private static function validatedData(Request $request): array { - if ($request instanceof FormRequest) { - return $request->validated(); - } + /** @var array $data */ + $data = $request instanceof FormRequest ? $request->validated() : $request->all(); - return $request->all(); + return $data; } } diff --git a/app/Http/Requests/Auth/DeleteTokenRequest.php b/app/Http/Requests/Auth/DeleteTokenRequest.php index a96745a..8e93ac0 100644 --- a/app/Http/Requests/Auth/DeleteTokenRequest.php +++ b/app/Http/Requests/Auth/DeleteTokenRequest.php @@ -28,8 +28,11 @@ public function rules(): array */ public function validationData(): array { - return array_merge($this->all(), [ + /** @var array $data */ + $data = array_merge($this->all(), [ 'token_id' => $this->route('token_id'), ]); + + return $data; } } diff --git a/app/Http/Requests/Auth/ShowResetPasswordTokenRequest.php b/app/Http/Requests/Auth/ShowResetPasswordTokenRequest.php index 0ccc684..4ae9fae 100644 --- a/app/Http/Requests/Auth/ShowResetPasswordTokenRequest.php +++ b/app/Http/Requests/Auth/ShowResetPasswordTokenRequest.php @@ -29,8 +29,11 @@ public function rules(): array */ public function validationData(): array { - return array_merge($this->all(), [ + /** @var array $data */ + $data = array_merge($this->all(), [ 'token' => $this->route('token'), ]); + + return $data; } } diff --git a/app/Http/Requests/Auth/VerifyEmailRequest.php b/app/Http/Requests/Auth/VerifyEmailRequest.php index 529c015..ece6521 100644 --- a/app/Http/Requests/Auth/VerifyEmailRequest.php +++ b/app/Http/Requests/Auth/VerifyEmailRequest.php @@ -30,9 +30,12 @@ public function rules(): array */ public function validationData(): array { - return array_merge($this->all(), [ + /** @var array $data */ + $data = array_merge($this->all(), [ 'id' => $this->route('id'), 'hash' => $this->route('hash'), ]); + + return $data; } } diff --git a/app/Http/Resources/PersonalAccessTokenResource.php b/app/Http/Resources/PersonalAccessTokenResource.php index 815853b..94163f0 100644 --- a/app/Http/Resources/PersonalAccessTokenResource.php +++ b/app/Http/Resources/PersonalAccessTokenResource.php @@ -8,9 +8,6 @@ use Illuminate\Http\Resources\Json\JsonResource; use Laravel\Sanctum\PersonalAccessToken; -/** - * @mixin PersonalAccessToken - */ final class PersonalAccessTokenResource extends JsonResource { /** @@ -18,17 +15,20 @@ final class PersonalAccessTokenResource extends JsonResource */ public function toArray(Request $request): array { - $currentTokenId = $request->user()?->currentAccessToken()?->getKey(); + /** @var PersonalAccessToken $token */ + $token = $this->resource; + + $currentToken = $request->user()?->currentAccessToken(); return [ - 'id' => (string) $this->getKey(), - 'name' => $this->name, - 'abilities' => $this->abilities, - 'last_used_at' => $this->last_used_at?->toAtomString(), - 'expires_at' => $this->expires_at?->toAtomString(), - 'created_at' => $this->created_at?->toAtomString(), - 'updated_at' => $this->updated_at?->toAtomString(), - 'is_current' => null !== $currentTokenId && (string) $currentTokenId === (string) $this->getKey(), + 'id' => (string) $token->id, + 'name' => $token->name, + 'abilities' => $token->abilities, + 'last_used_at' => $token->last_used_at?->toAtomString(), + 'expires_at' => $token->expires_at?->toAtomString(), + 'created_at' => $token->created_at?->toAtomString(), + 'updated_at' => $token->updated_at?->toAtomString(), + 'is_current' => $currentToken instanceof PersonalAccessToken && $currentToken->is($token), ]; } } diff --git a/app/Http/Resources/UserResource.php b/app/Http/Resources/UserResource.php index 5ea33fe..9ca2cae 100644 --- a/app/Http/Resources/UserResource.php +++ b/app/Http/Resources/UserResource.php @@ -8,9 +8,6 @@ use Illuminate\Http\Request; use Illuminate\Http\Resources\Json\JsonResource; -/** - * @mixin User - */ final class UserResource extends JsonResource { /** @@ -18,13 +15,16 @@ final class UserResource extends JsonResource */ public function toArray(Request $request): array { + /** @var User $user */ + $user = $this->resource; + return [ - 'id' => (string) $this->getKey(), - 'name' => $this->name, - 'email' => $this->email, - 'email_verified_at' => $this->email_verified_at?->toAtomString(), - 'created_at' => $this->created_at?->toAtomString(), - 'updated_at' => $this->updated_at?->toAtomString(), + 'id' => $user->id, + 'name' => $user->name, + 'email' => $user->email, + 'email_verified_at' => $user->email_verified_at?->toAtomString(), + 'created_at' => $user->created_at?->toAtomString(), + 'updated_at' => $user->updated_at?->toAtomString(), ]; } } diff --git a/app/Models/User.php b/app/Models/User.php index 047f1a5..4537a1e 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -12,10 +12,14 @@ use Illuminate\Notifications\Notifiable; use Laravel\Sanctum\HasApiTokens; +/** + * @property \Illuminate\Support\Carbon|null $email_verified_at + */ final class User extends Authenticatable implements MustVerifyEmail { - /** @use HasFactory<\Database\Factories\UserFactory> */ use HasApiTokens; + + /** @use HasFactory<\Database\Factories\UserFactory> */ use HasFactory; use HasUlids; use MustVerifyEmailTrait; diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 4770744..8251f21 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -4,6 +4,7 @@ namespace App\Providers; +use App\Models\User; use App\Support\ProductionSecurityChecks; use Illuminate\Cache\RateLimiting\Limit; use Illuminate\Http\Request; @@ -24,21 +25,21 @@ public function boot(): void { ProductionSecurityChecks::assertForEnvironment((string) app()->environment()); - RateLimiter::for('auth-register', fn (Request $request) => [ + RateLimiter::for('auth-register', fn(Request $request) => [ Limit::perMinute(10)->by($request->ip()), ]); - RateLimiter::for('auth-login', fn (Request $request) => [ - Limit::perMinute(10)->by(sprintf('%s|%s', $request->ip(), (string) $request->input('email'))), + RateLimiter::for('auth-login', fn(Request $request) => [ + Limit::perMinute(10)->by(sprintf('%s|%s', $request->ip(), $request->string('email')->value())), ]); - RateLimiter::for('auth-password', fn (Request $request) => [ - Limit::perMinute(5)->by(sprintf('%s|%s', $request->ip(), (string) $request->input('email'))), + RateLimiter::for('auth-password', fn(Request $request) => [ + Limit::perMinute(5)->by(sprintf('%s|%s', $request->ip(), $request->string('email')->value())), ]); - RateLimiter::for('auth-protected', fn (Request $request) => [ + RateLimiter::for('auth-protected', fn(Request $request) => [ Limit::perMinute(60)->by( - (string) ($request->user()?->getAuthIdentifier() ?? $request->ip()) + $request->user() instanceof User ? $request->user()->id : (string) $request->ip(), ), ]); } diff --git a/app/Support/ProblemDetailsOpenApiGenerator.php b/app/Support/ProblemDetailsOpenApiGenerator.php index bc2992d..2fb9c23 100644 --- a/app/Support/ProblemDetailsOpenApiGenerator.php +++ b/app/Support/ProblemDetailsOpenApiGenerator.php @@ -27,11 +27,17 @@ public function pathItem(array $pathItem, array $groupedEndpoints, OutputEndpoin } foreach ($pathItem['responses'] as $status => $response) { - if ((int) $status < 400 || ! is_array($response) || ! is_array($response['content']['application/json'] ?? null)) { + if ((int) $status < 400 || ! is_array($response) || ! is_array($response['content'] ?? null)) { continue; } - $response['content'] = [self::MEDIA_TYPE => $response['content']['application/json']]; + $schema = $response['content']['application/json'] ?? null; + + if ( ! is_array($schema)) { + continue; + } + + $response['content'] = [self::MEDIA_TYPE => $schema]; $pathItem['responses'][$status] = $response; } diff --git a/app/Support/ProductionSecurityChecks.php b/app/Support/ProductionSecurityChecks.php index 02a98b4..3d87044 100644 --- a/app/Support/ProductionSecurityChecks.php +++ b/app/Support/ProductionSecurityChecks.php @@ -10,7 +10,7 @@ final class ProductionSecurityChecks { public static function assertForEnvironment(string $environment): void { - if ($environment !== 'production') { + if ('production' !== $environment) { return; } @@ -18,12 +18,12 @@ public static function assertForEnvironment(string $environment): void throw new RuntimeException('In production, APP_DEBUG must be false.'); } - if (! (bool) config('security.force_https', false)) { + if ( ! (bool) config('security.force_https', false)) { throw new RuntimeException('In production, SECURITY_FORCE_HTTPS must be enabled.'); } - $appUrl = mb_strtolower((string) config('app.url', '')); - if (! str_starts_with($appUrl, 'https://')) { + $appUrl = mb_strtolower(config()->string('app.url', '')); + if ( ! str_starts_with($appUrl, 'https://')) { throw new RuntimeException('In production, APP_URL must use https://.'); } @@ -33,7 +33,7 @@ public static function assertForEnvironment(string $environment): void } $trustedHosts = config('security.trusted_hosts', []); - if (! is_array($trustedHosts) || $trustedHosts === []) { + if ( ! is_array($trustedHosts) || [] === $trustedHosts) { throw new RuntimeException('In production, TRUSTED_HOSTS must be configured.'); } } diff --git a/config/app.php b/config/app.php index dcb8cea..718ad51 100644 --- a/config/app.php +++ b/config/app.php @@ -85,7 +85,7 @@ 'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'), 'supported_locales' => array_values(array_filter(array_map( - static fn (string $locale): string => trim($locale), + static fn(string $locale): string => mb_trim($locale), explode(',', (string) env('APP_SUPPORTED_LOCALES', 'en,es')), ))), diff --git a/config/cors.php b/config/cors.php index b334dd2..2c6ee51 100644 --- a/config/cors.php +++ b/config/cors.php @@ -8,7 +8,7 @@ 'allowed_methods' => ['*'], 'allowed_origins' => array_values(array_filter(array_map( - static fn (string $origin): string => trim($origin), + static fn(string $origin): string => mb_trim($origin), explode(',', (string) env('CORS_ALLOWED_ORIGINS', 'http://localhost:3000')), ))), diff --git a/config/security.php b/config/security.php index 50b285d..f3f2582 100644 --- a/config/security.php +++ b/config/security.php @@ -15,7 +15,7 @@ 'trusted_proxies' => env('TRUSTED_PROXIES', '*'), 'trusted_hosts' => array_values(array_filter(array_map( - static fn (string $host): string => trim($host), + static fn(string $host): string => mb_trim($host), explode(',', (string) env('TRUSTED_HOSTS', '')), ))), ]; diff --git a/database/migrations/0001_01_01_000000_create_users_table.php b/database/migrations/0001_01_01_000000_create_users_table.php index b8d24df..ef196dd 100644 --- a/database/migrations/0001_01_01_000000_create_users_table.php +++ b/database/migrations/0001_01_01_000000_create_users_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/0001_01_01_000001_create_cache_table.php b/database/migrations/0001_01_01_000001_create_cache_table.php index 078faf8..2e7ee19 100644 --- a/database/migrations/0001_01_01_000001_create_cache_table.php +++ b/database/migrations/0001_01_01_000001_create_cache_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/0001_01_01_000002_create_jobs_table.php b/database/migrations/0001_01_01_000002_create_jobs_table.php index ba12f30..3e61f84 100644 --- a/database/migrations/0001_01_01_000002_create_jobs_table.php +++ b/database/migrations/0001_01_01_000002_create_jobs_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. */ diff --git a/database/migrations/2026_02_22_210901_create_personal_access_tokens_table.php b/database/migrations/2026_02_22_210901_create_personal_access_tokens_table.php index 58d6062..3495758 100644 --- a/database/migrations/2026_02_22_210901_create_personal_access_tokens_table.php +++ b/database/migrations/2026_02_22_210901_create_personal_access_tokens_table.php @@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class () extends Migration { +return new class extends Migration { /** * Run the migrations. */ diff --git a/lang/scribe.php b/lang/scribe.php index bdba874..283bbeb 100644 --- a/lang/scribe.php +++ b/lang/scribe.php @@ -1,5 +1,7 @@ [ 'search' => 'Search', diff --git a/public/docs/collection.json b/public/docs/collection.json index ca50634..8665a14 100644 --- a/public/docs/collection.json +++ b/public/docs/collection.json @@ -10,7 +10,7 @@ ], "info": { "name": "Laravel API Documentation", - "_postman_id": "b96e8010-5a32-497e-b801-9f223c9e9a29", + "_postman_id": "e43ed198-f671-4fbc-ae39-dee220c5f00c", "description": "", "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json" }, @@ -56,7 +56,7 @@ { "header": [], "code": 201, - "body": "{\"data\":{\"id\":\"\",\"name\":\"Justina Gaylord\",\"email\":\"lafayette.considine@example.com\",\"email_verified_at\":\"2026-10-20T09:25:01+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", + "body": "{\"data\":{\"id\":null,\"name\":\"Justina Gaylord\",\"email\":\"lafayette.considine@example.com\",\"email_verified_at\":\"2026-10-20T09:27:05+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", "name": "Registration succeeded." }, { @@ -100,7 +100,7 @@ { "header": [], "code": 200, - "body": "{\"data\":{\"id\":\"\",\"name\":\"Justina Gaylord\",\"email\":\"cormier.nick@example.com\",\"email_verified_at\":\"2026-10-20T09:25:01+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", + "body": "{\"data\":{\"id\":null,\"name\":\"Justina Gaylord\",\"email\":\"cormier.nick@example.com\",\"email_verified_at\":\"2026-10-20T09:27:05+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", "name": "Login succeeded." }, { @@ -138,7 +138,7 @@ { "header": [], "code": 200, - "body": "{\"data\":{\"id\":\"\",\"name\":\"Morgan Hirthe\",\"email\":\"dare.emelie@example.com\",\"email_verified_at\":\"2026-10-20T09:25:01+00:00\",\"created_at\":null,\"updated_at\":null}}", + "body": "{\"data\":{\"id\":null,\"name\":\"Morgan Hirthe\",\"email\":\"dare.emelie@example.com\",\"email_verified_at\":\"2026-10-20T09:27:05+00:00\",\"created_at\":null,\"updated_at\":null}}", "name": "Authenticated user profile." }, { diff --git a/public/docs/index.html b/public/docs/index.html index d1d9baf..d5e6236 100644 --- a/public/docs/index.html +++ b/public/docs/index.html @@ -217,10 +217,10 @@

Register

{ "data": { - "id": "", + "id": null, "name": "Justina Gaylord", "email": "lafayette.considine@example.com", - "email_verified_at": "2026-10-20T09:25:01+00:00", + "email_verified_at": "2026-10-20T09:27:05+00:00", "created_at": null, "updated_at": null }, @@ -427,10 +427,10 @@

Login

{ "data": { - "id": "", + "id": null, "name": "Justina Gaylord", "email": "cormier.nick@example.com", - "email_verified_at": "2026-10-20T09:25:01+00:00", + "email_verified_at": "2026-10-20T09:27:05+00:00", "created_at": null, "updated_at": null }, @@ -615,10 +615,10 @@

Get Current User

{ "data": { - "id": "", + "id": null, "name": "Morgan Hirthe", "email": "dare.emelie@example.com", - "email_verified_at": "2026-10-20T09:25:01+00:00", + "email_verified_at": "2026-10-20T09:27:05+00:00", "created_at": null, "updated_at": null } diff --git a/public/docs/openapi.yaml b/public/docs/openapi.yaml index 9a03557..737193c 100644 --- a/public/docs/openapi.yaml +++ b/public/docs/openapi.yaml @@ -35,10 +35,10 @@ paths: type: object example: data: - id: '' + id: null name: 'Justina Gaylord' email: lafayette.considine@example.com - email_verified_at: '2026-10-20T09:25:01+00:00' + email_verified_at: '2026-10-20T09:27:05+00:00' created_at: null updated_at: null meta: @@ -51,7 +51,8 @@ paths: properties: id: type: string - example: '' + example: null + nullable: true name: type: string example: 'Justina Gaylord' @@ -60,7 +61,7 @@ paths: example: lafayette.considine@example.com email_verified_at: type: string - example: '2026-10-20T09:25:01+00:00' + example: '2026-10-20T09:27:05+00:00' created_at: type: string example: null @@ -163,10 +164,10 @@ paths: type: object example: data: - id: '' + id: null name: 'Justina Gaylord' email: cormier.nick@example.com - email_verified_at: '2026-10-20T09:25:01+00:00' + email_verified_at: '2026-10-20T09:27:05+00:00' created_at: null updated_at: null meta: @@ -179,7 +180,8 @@ paths: properties: id: type: string - example: '' + example: null + nullable: true name: type: string example: 'Justina Gaylord' @@ -188,7 +190,7 @@ paths: example: cormier.nick@example.com email_verified_at: type: string - example: '2026-10-20T09:25:01+00:00' + example: '2026-10-20T09:27:05+00:00' created_at: type: string example: null @@ -552,10 +554,10 @@ paths: type: object example: data: - id: '' + id: null name: 'Morgan Hirthe' email: dare.emelie@example.com - email_verified_at: '2026-10-20T09:25:01+00:00' + email_verified_at: '2026-10-20T09:27:05+00:00' created_at: null updated_at: null properties: @@ -564,7 +566,8 @@ paths: properties: id: type: string - example: '' + example: null + nullable: true name: type: string example: 'Morgan Hirthe' @@ -573,7 +576,7 @@ paths: example: dare.emelie@example.com email_verified_at: type: string - example: '2026-10-20T09:25:01+00:00' + example: '2026-10-20T09:27:05+00:00' created_at: type: string example: null diff --git a/tests/Feature/AuthAuditTrailTest.php b/tests/Feature/AuthAuditTrailTest.php index 5cc7960..735f448 100644 --- a/tests/Feature/AuthAuditTrailTest.php +++ b/tests/Feature/AuthAuditTrailTest.php @@ -24,13 +24,11 @@ ])->assertOk(); Log::shouldHaveReceived('info') - ->with('security.audit', \Mockery::on(function (array $context) use ($user): bool { - return ($context['event'] ?? null) === 'auth.login.succeeded' + ->with('security.audit', Mockery::on(fn(array $context): bool => ($context['event'] ?? null) === 'auth.login.succeeded' && ($context['user_id'] ?? null) === (string) $user->getKey() && ($context['email_hash'] ?? null) === SecurityAudit::hashEmail('audit-success@example.com') && ($context['device_name'] ?? null) === 'audit-device' - && ! empty($context['request_id']); - })) + && ! empty($context['request_id']))) ->atLeast() ->once(); }); @@ -50,13 +48,11 @@ ])->assertUnprocessable(); Log::shouldHaveReceived('info') - ->with('security.audit', \Mockery::on(function (array $context): bool { - return ($context['event'] ?? null) === 'auth.login.failed' + ->with('security.audit', Mockery::on(fn(array $context): bool => ($context['event'] ?? null) === 'auth.login.failed' && ($context['email_hash'] ?? null) === SecurityAudit::hashEmail('audit-failed@example.com') && ($context['device_name'] ?? null) === 'audit-device' && ! isset($context['password']) - && ! empty($context['request_id']); - })) + && ! empty($context['request_id']))) ->atLeast() ->once(); }); @@ -72,12 +68,10 @@ ->assertNoContent(); Log::shouldHaveReceived('info') - ->with('security.audit', \Mockery::on(function (array $context) use ($user, $token): bool { - return ($context['event'] ?? null) === 'auth.logout.succeeded' + ->with('security.audit', Mockery::on(fn(array $context): bool => ($context['event'] ?? null) === 'auth.logout.succeeded' && ($context['user_id'] ?? null) === (string) $user->getKey() && ($context['token_id'] ?? null) === (string) $token->accessToken->getKey() - && ! empty($context['request_id']); - })) + && ! empty($context['request_id']))) ->atLeast() ->once(); }); diff --git a/tests/Feature/DeprecationTest.php b/tests/Feature/DeprecationTest.php index e3ff495..60cb187 100644 --- a/tests/Feature/DeprecationTest.php +++ b/tests/Feature/DeprecationTest.php @@ -9,7 +9,7 @@ use JustSteveKing\Toolbox\Deprecation\Attributes\Sunset; it('adds deprecation and sunset headers for endpoints that are still live', function (): void { - $path = '/v1/test/deprecated-'.Str::lower((string) Str::ulid()); + $path = '/v1/test/deprecated-' . Str::lower((string) Str::ulid()); Route::middleware('api')->get($path, DeprecatedEndpoint::class); @@ -20,7 +20,7 @@ }); it('returns 410 gone once the sunset date has passed', function (): void { - $path = '/v1/test/retired-'.Str::lower((string) Str::ulid()); + $path = '/v1/test/retired-' . Str::lower((string) Str::ulid()); Route::middleware('api')->get($path, RetiredEndpoint::class); @@ -32,7 +32,7 @@ }); it('serves deprecated endpoints that have no sunset date', function (): void { - $path = '/v1/test/deprecated-only-'.Str::lower((string) Str::ulid()); + $path = '/v1/test/deprecated-only-' . Str::lower((string) Str::ulid()); Route::middleware('api')->get($path, DeprecatedWithoutSunsetEndpoint::class); diff --git a/tests/Feature/ProductionSecurityChecksTest.php b/tests/Feature/ProductionSecurityChecksTest.php index 3920c26..b010b98 100644 --- a/tests/Feature/ProductionSecurityChecksTest.php +++ b/tests/Feature/ProductionSecurityChecksTest.php @@ -7,7 +7,7 @@ it('skips checks outside production environment', function (): void { config()->set('app.debug', true); - expect(fn (): null => ProductionSecurityChecks::assertForEnvironment('testing'))->not->toThrow(RuntimeException::class); + expect(fn(): null => ProductionSecurityChecks::assertForEnvironment('testing'))->not->toThrow(RuntimeException::class); }); it('fails in production when debug is enabled', function (): void { @@ -17,7 +17,7 @@ config()->set('cors.allowed_origins', ['https://app.example.com']); config()->set('security.trusted_hosts', ['api.example.com']); - expect(fn (): null => ProductionSecurityChecks::assertForEnvironment('production')) + expect(fn(): null => ProductionSecurityChecks::assertForEnvironment('production')) ->toThrow(RuntimeException::class, 'APP_DEBUG must be false'); }); @@ -28,7 +28,7 @@ config()->set('cors.allowed_origins', ['https://app.example.com']); config()->set('security.trusted_hosts', ['api.example.com']); - expect(fn (): null => ProductionSecurityChecks::assertForEnvironment('production')) + expect(fn(): null => ProductionSecurityChecks::assertForEnvironment('production')) ->toThrow(RuntimeException::class, 'SECURITY_FORCE_HTTPS must be enabled'); }); @@ -39,7 +39,7 @@ config()->set('cors.allowed_origins', ['*']); config()->set('security.trusted_hosts', []); - expect(fn (): null => ProductionSecurityChecks::assertForEnvironment('production')) + expect(fn(): null => ProductionSecurityChecks::assertForEnvironment('production')) ->toThrow(RuntimeException::class, 'CORS allowed origins must not use wildcard'); }); @@ -50,6 +50,6 @@ config()->set('cors.allowed_origins', ['https://app.example.com']); config()->set('security.trusted_hosts', ['api.example.com']); - expect(fn (): null => ProductionSecurityChecks::assertForEnvironment('production')) + expect(fn(): null => ProductionSecurityChecks::assertForEnvironment('production')) ->not->toThrow(RuntimeException::class); }); From 022e94ac17df2e136565a056e65cd66f851af330 Mon Sep 17 00:00:00 2001 From: Steve McDougall Date: Tue, 20 Oct 2026 10:28:34 +0100 Subject: [PATCH 05/10] chore: refresh Boost guidance for Laravel 13 and api-toolbox boost:update with api-toolbox opted in under "packages", so agents get its guideline and the api-toolbox-development skill. Boost's own skills move to their current set (testing-best-practices replaces pest-testing). Cloud is set off explicitly: Boost treats a missing key as on and installs a Laravel Cloud deployment skill. --- .../skills/api-toolbox-development/SKILL.md | 70 ++++++ .../references/api-lifecycle.md | 79 +++++++ .../references/caching-and-pagination.md | 90 ++++++++ .../references/problem-details.md | 92 ++++++++ .../references/signatures-and-digests.md | 101 ++++++++ .../references/testing.md | 131 +++++++++++ .../references/writes.md | 103 +++++++++ .claude/skills/infer-conventions/SKILL.md | 105 +++++++++ .../infer-conventions/references/checklist.md | 137 +++++++++++ .../skills/laravel-best-practices/SKILL.md | 215 ++++-------------- .../rules/advanced-queries.md | 44 ++-- .../rules/architecture.md | 105 +++++---- .../rules/blade-views.md | 22 +- .../laravel-best-practices/rules/caching.md | 66 ++++-- .../rules/collections.md | 56 +++-- .../laravel-best-practices/rules/config.md | 52 +++-- .../rules/db-performance.md | 93 ++++---- .../laravel-best-practices/rules/eloquent.md | 62 ++--- .../rules/error-handling.md | 39 ++-- .../rules/events-notifications.md | 26 ++- .../rules/http-client.md | 135 ++++++----- .../laravel-best-practices/rules/mail.md | 55 +++-- .../rules/migrations.md | 102 ++------- .../rules/queue-jobs.md | 131 +++++------ .../laravel-best-practices/rules/routing.md | 106 +++++---- .../rules/scheduling.md | 50 ++-- .../laravel-best-practices/rules/security.md | 128 ++++------- .../laravel-best-practices/rules/style.md | Bin 4443 -> 4380 bytes .../laravel-best-practices/rules/testing.md | 43 ---- .../rules/validation.md | 76 ++++--- .claude/skills/pest-testing/SKILL.md | 157 ------------- .../skills/testing-best-practices/SKILL.md | 58 +++++ .../rules/assertions.md | 60 +++++ .../rules/endpoint-tests.md | 47 ++++ .../rules/finding-features.md | 34 +++ .../testing-best-practices/rules/isolation.md | 52 +++++ .../testing-best-practices/rules/naming.md | 45 ++++ .../rules/performance.md | 46 ++++ .../testing-best-practices/rules/review.md | 44 ++++ .../testing-best-practices/rules/security.md | 27 +++ .../testing-best-practices/rules/test-data.md | 56 +++++ CLAUDE.md | 128 ++++++----- boost.json | 8 +- 43 files changed, 2195 insertions(+), 1081 deletions(-) create mode 100644 .claude/skills/api-toolbox-development/SKILL.md create mode 100644 .claude/skills/api-toolbox-development/references/api-lifecycle.md create mode 100644 .claude/skills/api-toolbox-development/references/caching-and-pagination.md create mode 100644 .claude/skills/api-toolbox-development/references/problem-details.md create mode 100644 .claude/skills/api-toolbox-development/references/signatures-and-digests.md create mode 100644 .claude/skills/api-toolbox-development/references/testing.md create mode 100644 .claude/skills/api-toolbox-development/references/writes.md create mode 100644 .claude/skills/infer-conventions/SKILL.md create mode 100644 .claude/skills/infer-conventions/references/checklist.md delete mode 100644 .claude/skills/laravel-best-practices/rules/testing.md delete mode 100644 .claude/skills/pest-testing/SKILL.md create mode 100644 .claude/skills/testing-best-practices/SKILL.md create mode 100644 .claude/skills/testing-best-practices/rules/assertions.md create mode 100644 .claude/skills/testing-best-practices/rules/endpoint-tests.md create mode 100644 .claude/skills/testing-best-practices/rules/finding-features.md create mode 100644 .claude/skills/testing-best-practices/rules/isolation.md create mode 100644 .claude/skills/testing-best-practices/rules/naming.md create mode 100644 .claude/skills/testing-best-practices/rules/performance.md create mode 100644 .claude/skills/testing-best-practices/rules/review.md create mode 100644 .claude/skills/testing-best-practices/rules/security.md create mode 100644 .claude/skills/testing-best-practices/rules/test-data.md diff --git a/.claude/skills/api-toolbox-development/SKILL.md b/.claude/skills/api-toolbox-development/SKILL.md new file mode 100644 index 0000000..3247307 --- /dev/null +++ b/.claude/skills/api-toolbox-development/SKILL.md @@ -0,0 +1,70 @@ +--- +name: api-toolbox-development +description: Build Laravel APIs with juststeveking/api-toolbox. Use when returning API errors (RFC 9457 problem details, make:api-problem), adding ETags, preconditions or caching, cursor pagination, idempotency keys, Prefer or async 202 operations, JSON Merge Patch, Content-Digest, signing or verifying webhooks (HTTP Message Signatures), deprecating endpoints, the API catalog, 406/415 negotiation, request IDs, or testing any of these. +--- + +# API Toolbox Development + +## When to use this skill + +Use this skill when you write or change an API endpoint in an application that requires `juststeveking/api-toolbox`, or when you test one. Each feature implements a published HTTP standard. Use the feature rather than inventing a header, query parameter or JSON shape for something a standard already covers. + +## First: which features are on + +Read `config/api-toolbox.php`. Features are listed in `features` with options passed inline: + +```php +use JustSteveKing\Toolbox\Features; + +'features' => [ + Features::problemDetails(['type_base_uri' => 'https://docs.example.com/problems']), + Features::conditionalRequests(), + Features::idempotency(['ttl' => 86400]), + // ... +], +``` + +- If the file does not exist, every stable feature is on with its defaults. `Features::rateLimitHeaders()` is experimental and is off unless listed. +- A disabled feature registers nothing: no middleware alias, route, container binding, Artisan command or test assertion. Using one of those for a disabled feature fails. To enable a feature, add it to the list; do not register its pieces by hand. +- Check at runtime with `JustSteveKing\Toolbox\Facades\ApiToolbox::enabled(Features::idempotency())`, or inject `JustSteveKing\Toolbox\Contracts\EnabledFeatures`. +- Features built on an IETF draft that is still changing are experimental and may break in a minor release. Today that is RateLimit headers only. + +## Choose the reference for the task + +| Task | Read | +|---|---| +| Returning an error, a custom error type, validation errors, `make:api-problem` | [references/problem-details.md](references/problem-details.md) | +| ETags, 304, 412, 428, `Cache-Control`, cursor pagination | [references/caching-and-pagination.md](references/caching-and-pagination.md) | +| PATCH, `Prefer`, idempotent POST, 202 Accepted and background jobs | [references/writes.md](references/writes.md) | +| Signing or verifying webhooks and requests, `Content-Digest` | [references/signatures-and-digests.md](references/signatures-and-digests.md) | +| Deprecating or sunsetting endpoints, the API catalog, 406/415, request IDs, tracing, rate limits | [references/api-lifecycle.md](references/api-lifecycle.md) | +| Writing tests for any of the above | [references/testing.md](references/testing.md) | + +## Middleware aliases + +| Alias | Feature | Does | +|---|---|---| +| `conditional` | Conditional Requests | `preconditions` then `validators` | +| `preconditions` | Conditional Requests | Evaluates `If-*` headers: 412 or 304 | +| `validators` | Conditional Requests | Adds `ETag` and `Last-Modified`; `validators:weak` for a weak hash | +| `preconditions.required` | Conditional Requests | 428 without a precondition; `preconditions.required:PUT,POST` | +| `idempotent` | Idempotency | Honours `Idempotency-Key`; `idempotent:required` for 400 without one | +| `prefer` | Preferences | `return=minimal` and `Preference-Applied`, with `Vary: Prefer` | +| `merge-patch` | Merge Patch | 415 with `Accept-Patch` for any other PATCH format | +| `digest.verify` | Digest Fields | Checks `Content-Digest`/`Repr-Digest`; `digest.verify:required` | +| `digest.respond` | Digest Fields | Adds digests a client asks for; `digest.respond:always` | +| `signature.verify` | Message Signatures | 401 without a valid signature | +| `signature.sign` | Message Signatures | Signs the response; `signature.sign:key-id` | +| `deprecation` | Deprecation | Only needed when the feature's `global` option is off | +| `api-catalog.link` | API Catalog | Adds `Link: <...>; rel="api-catalog"` | +| `produces` | Negotiation | 406; `produces:application/json` | +| `consumes` | Negotiation | 415; `consumes:application/json,application/merge-patch+json` | + +Request IDs and trace context run globally, and RateLimit headers replace Laravel's `throttle` middleware. None of them needs adding to routes. + +## Rules that apply everywhere + +- Never build error JSON by hand in an API route. Throw; the package renders `application/problem+json`. +- Every problem the package raises is typed from the apiguide.dev catalogue. Reuse `JustSteveKing\Toolbox\Support\ApiGuide` constants for your own problems where an entry fits, rather than inventing a type that means the same thing. +- Do not add `X-` headers for things these standards cover: `Idempotency-Key`, `Prefer`/`Preference-Applied`, `Deprecation`/`Sunset`, `RateLimit`/`RateLimit-Policy`, `Content-Digest`, `Signature`/`Signature-Input`, `traceparent`. +- Order of route middleware does not matter for this package's middleware: it registers its own priority, so `preconditions.required` runs before `preconditions`, and `idempotent` runs after authentication. diff --git a/.claude/skills/api-toolbox-development/references/api-lifecycle.md b/.claude/skills/api-toolbox-development/references/api-lifecycle.md new file mode 100644 index 0000000..dfd17f7 --- /dev/null +++ b/.claude/skills/api-toolbox-development/references/api-lifecycle.md @@ -0,0 +1,79 @@ +# API lifecycle: deprecation, catalog, negotiation, request IDs and rate limits + +## Deprecation and Sunset (RFC 9745, RFC 8594) + +Feature: `Features::deprecation()`. Mark a controller or a single action with attributes: + +```php +use JustSteveKing\Toolbox\Deprecation\Attributes\Deprecation; +use JustSteveKing\Toolbox\Deprecation\Attributes\Sunset; + +#[Deprecation(at: '2026-06-30T23:59:59Z', link: 'https://docs.example.com/deprecations/orders-v1')] +#[Sunset(at: '2027-01-01T00:00:00Z', link: 'https://docs.example.com/sunset-policy')] +final class OrderController +{ + #[Deprecation(at: '2026-03-01')] + public function export() { /* ... */ } +} +``` + +- These are not PHP's `#[\Deprecated]`, which would raise a PHP deprecation on every request. Import them from `JustSteveKing\Toolbox\Deprecation\Attributes`. +- Only controller routes are read. Closure routes are not, because `route:cache` breaks their attributes. Move a closure route to a controller to deprecate it. +- A date without an offset is UTC. A deprecation date can be in the future. A sunset earlier than the deprecation throws. +- `#[Deprecation(link: ...)]` with no date publishes a deprecation policy only. +- With the `global` option on (the default), nothing is added to routes. With it off, add the `deprecation` middleware. +- Reading deprecations from elsewhere, such as a manifest: bind `JustSteveKing\Toolbox\Deprecation\Contracts\DeprecationSource`, which returns a `JustSteveKing\Toolbox\Deprecation\Notice` for a route. + +## API catalog (RFC 9727) + +Feature: `Features::apiCatalog([...])`. It serves `/.well-known/api-catalog`, listing the APIs and where their OpenAPI descriptions and documentation live. + +```php +Features::apiCatalog([ + 'apis' => [ + [ + 'href' => '/api/v1', + 'service-desc' => ['href' => '/openapi.json', 'type' => 'application/vnd.oai.openapi+json'], + 'service-doc' => ['href' => 'https://docs.example.com', 'type' => 'text/html'], + 'status' => '/api/v1/health', + ], + ], + 'middleware' => ['throttle:60,1'], +]), +``` + +- `href` is the API itself. `service-desc` is a machine-readable description, `service-doc` documentation for people, `service-meta` policies and other metadata, and `status` a health endpoint. +- The catalog is public. List only APIs meant to be found, never internal ones. +- Point to it from an API root with the `api-catalog.link` middleware. +- To build it from a database or gateway, bind `JustSteveKing\Toolbox\ApiCatalog\Contracts\CatalogSource`. + +## Negotiation: 406 and 415 + +Feature: `Features::negotiation()`. + +```php +Route::post('leads', CreateLead::class)->middleware(['produces:application/json', 'consumes:application/json']); +Route::patch('leads/{lead}', UpdateLead::class)->middleware('consumes:application/merge-patch+json'); +``` + +- `produces` returns 406 when `Accept` rules out every listed type. A missing `Accept` accepts anything. +- `consumes` returns 415 when the request has content of another type, or content with no `Content-Type`. A request with no content always passes. +- `consumes:application/json` does not accept `application/merge-patch+json`. List each type a route takes. + +## Request IDs and tracing + +These are on with Negotiation and need no code. + +- Every response carries `X-Request-Id`, which can be renamed with the `request_id_header` option. A well-formed incoming ID is kept; otherwise a UUIDv7 is assigned. +- The ID is in the log context as `request_id`, and problem `instance` is `urn:uuid:`. To find the logs for a reported error, search for that ID. +- W3C `traceparent` is continued from the caller, added to the log context and to queued jobs, and sent on with Laravel HTTP client requests. Do not add these headers to outgoing requests by hand. +- Read the current ID by injecting `JustSteveKing\Toolbox\Contracts\RequestIdentifier` and calling `current()`. It returns null when request IDs are off. + +## RateLimit headers (experimental) + +Feature: `Features::rateLimitHeaders()`. It is off unless listed, and can change in a minor release. + +- Keep using Laravel's `throttle` middleware and `RateLimiter::for()`. Responses gain `RateLimit-Policy` and `RateLimit`, and a 429 becomes a `rate-limit-exceeded` problem with `Retry-After` and `Cache-Control: no-store`. +- The policy name is the limiter name. `throttle:60,1` is `"default"`. +- Applications that use `throttleWithRedis()` get no RateLimit headers. This is a known gap. +- For a billing-period allowance rather than a short window, throw a problem typed `ApiGuide::QUOTA_EXCEEDED` instead. diff --git a/.claude/skills/api-toolbox-development/references/caching-and-pagination.md b/.claude/skills/api-toolbox-development/references/caching-and-pagination.md new file mode 100644 index 0000000..3be83b0 --- /dev/null +++ b/.claude/skills/api-toolbox-development/references/caching-and-pagination.md @@ -0,0 +1,90 @@ +# Conditional requests, caching and pagination + +## Conditional requests (RFC 9110 section 13, RFC 6585) + +Feature: `Features::conditionalRequests()`. It is opt-in per route. + +Use it to prevent lost updates, where two clients edit the same resource and the second write silently overwrites the first, and to answer re-fetches with 304. + +### 1. Give the model validators + +```php +use JustSteveKing\Toolbox\ConditionalRequests\Concerns\HasModelValidators; +use JustSteveKing\Toolbox\ConditionalRequests\Contracts\HasValidators; + +final class Document extends Model implements HasValidators +{ + use HasModelValidators; +} +``` + +The strong ETag comes from the model's class, key and `updated_at`, and `Last-Modified` comes from `updated_at`. Two writes in the same second share a timestamp, so for real optimistic concurrency add an integer `version` column that every write increments, and return it: + +```php +protected function entityTagVersion(): ?string +{ + return (string) $this->version; +} +``` + +The model is found through route model binding, so the route parameter must be bound to it. + +### 2. Add the middleware + +```php +Route::middleware('conditional')->group(function () { + Route::get('documents/{document}', ShowDocument::class); + Route::put('documents/{document}', ReplaceDocument::class)->middleware('preconditions.required'); + Route::patch('documents/{document}', UpdateDocument::class)->middleware('preconditions.required'); + Route::delete('documents/{document}', DeleteDocument::class)->middleware('preconditions.required'); +}); +``` + +- `conditional` = `preconditions` + `validators`. +- `preconditions.required` returns 428 when a PUT, PATCH or DELETE has no `If-Match` or `If-Unmodified-Since`. Name other methods with `preconditions.required:PUT,POST`. +- Laravel 13's `#[Middleware('conditional')]` controller attribute also works. + +### What clients see + +- `GET` returns `ETag` and `Last-Modified`. A repeat with `If-None-Match` returns 304 with no body. +- `PATCH` with a stale `If-Match` returns 412 `precondition-failed`, carrying the current `ETag` to re-fetch. +- A write without a precondition on a `preconditions.required` route returns 428 `precondition-required`. +- `PUT` with `If-None-Match: *` creates without overwriting. +- Without a bound model, a GET's ETag is a hash of the response content. Use `validators:weak` for a weak one. + +Do not add a `version` field to request bodies for locking, and do not compare timestamps in controllers. Preconditions are checked before the controller runs. + +## Caching directives + +Use Laravel's own `cache.headers` middleware beside `conditional`, and leave its `etag` option off, because `conditional` already sends the ETag: + +```php +Route::get('documents/{document}', ShowDocument::class)->middleware([ + 'conditional', + 'cache.headers:public;max_age=60;stale_while_revalidate=30;stale_if_error=86400', +]); +``` + +## Cursor pagination with Link headers (RFC 8288) + +Feature: `Features::pagination()`. + +```php +use JustSteveKing\Toolbox\Pagination\CursorPage; + +public function index(Request $request) +{ + return CursorPage::of( + Post::query()->where('published', true)->orderBy('id')->cursorPaginate(20)->withQueryString(), + PostResource::class, + ); +} +``` + +- The body is a plain JSON array of the items. Navigation is in `Link` headers: `next` and `prev` when they exist, and `first` always. There is no `last`. +- Call `withQueryString()` so filters survive into the links. +- The resource class is optional. +- Use `cursorPaginate()`, not `paginate()`. `CursorPage` takes a `CursorPaginator`. +- A cursor that cannot be decoded is a 400 `invalid-pagination-cursor` for every cursor paginator in the app, not a silent first page. + +Clients read `Link: <...>; rel="next"` rather than `links.next` in the body. Do not also add `links` or `meta` to the body. diff --git a/.claude/skills/api-toolbox-development/references/problem-details.md b/.claude/skills/api-toolbox-development/references/problem-details.md new file mode 100644 index 0000000..c7c5c2b --- /dev/null +++ b/.claude/skills/api-toolbox-development/references/problem-details.md @@ -0,0 +1,92 @@ +# Problem Details (RFC 9457) + +Feature: `Features::problemDetails()`. Errors are rendered as `application/problem+json` when the request expects JSON, or when its path matches the `paths` option (default `['api/*']`). Requests using `application/vnd.api+json` are left alone, because JSON:API has its own error format. + +## What is rendered without any code + +| Exception | Status | `type` | +|---|---|---| +| `ValidationException` | 422 | `https://apiguide.dev/errors/validation-failed`, with `errors` keyed by field | +| `AuthenticationException` | 401 | `https://apiguide.dev/errors/unauthorized`, plus a `WWW-Authenticate` challenge (`Bearer` by default) | +| `abort()`, `ModelNotFoundException`, authorization and any HTTP exception | its own | the apiguide.dev entry for the status (404 is `resource-not-found`), or `about:blank` | +| Anything else | 500 | `https://apiguide.dev/errors/internal-server-error`, with no message unless `app.debug` is on | + +So `abort(404)`, `$request->validate()`, `Gate::authorize()` and `findOrFail()` need no extra work. Do not catch them to build a JSON error. + +## Your own problem types + +Generate the class. Do not write it by hand: + +```bash +php artisan make:api-problem OutOfCredit --title="You do not have enough credit." --status=403 --no-interaction +php artisan make:api-problem Billing/CardDeclined --title="The card was declined." --status=402 --no-interaction +php artisan make:api-problem AccountFrozen --apiguide=account-frozen --no-interaction +``` + +- The class goes in `app/Problems`. `Billing/CardDeclined` makes `App\Problems\Billing\CardDeclined`. +- `--type` takes a slug or an absolute URI. It defaults to the class name in kebab case, resolved against the `type_base_uri` option. +- `--apiguide` sets the type, title and status from an apiguide.dev entry. It cannot be combined with `--title`, `--status` or `--type`. +- Under `--no-interaction` the command fails if the title or status is missing, because RFC 9457 section 4 requires both. + +The result: + +```php +use JustSteveKing\Toolbox\ProblemDetails\Attributes\ProblemType; +use JustSteveKing\Toolbox\ProblemDetails\ProblemException; + +#[ProblemType('out-of-credit', title: 'You do not have enough credit.', status: 403)] +final class OutOfCredit extends ProblemException {} +``` + +Throw it with the details of this occurrence: + +```php +throw new OutOfCredit( + detail: 'Your current balance is 30, but that costs 50.', + extensions: ['balance' => 30, 'accounts' => ['/account/12345']], + instance: '/account/12345/msgs/abc', +); +``` + +- Type, title and status are fixed on the class; detail, extensions and instance vary per occurrence. Do not put changing text in the title. +- An extension key named `type`, `title`, `status`, `detail` or `instance` throws, because it would replace a standard member. +- `#[ProblemType]` can sit on an abstract parent and be inherited. +- With Negotiation on, `instance` defaults to the request ID as `urn:uuid:...`. A value you pass is kept. + +## Using the apiguide.dev catalogue + +`JustSteveKing\Toolbox\Support\ApiGuide` has a constant per catalogue entry, such as `ApiGuide::ACCOUNT_FROZEN`, `ApiGuide::QUOTA_EXCEEDED` and `ApiGuide::RESOURCE_NOT_FOUND`. `ApiGuide::types()` lists every type, and `ApiGuide::title($type)` and `ApiGuide::status($type)` give the documented title and status. + +```php +use JustSteveKing\Toolbox\Support\ApiGuide; + +#[ProblemType(ApiGuide::QUOTA_EXCEEDED, title: 'Quota Exceeded', status: 429)] +final class MonthlyQuotaExceeded extends ProblemException {} +``` + +Use a catalogue entry when it means what your error means. Otherwise give your own type a slug and point `type_base_uri` at your documentation. + +## Mapping exceptions you do not own + +Map them in `bootstrap/app.php` rather than catching them in controllers: + +```php +// bootstrap/app.php +->withExceptions(function (Exceptions $exceptions): void { + $exceptions->map(PaymentGatewayTimeout::class, fn (PaymentGatewayTimeout $e) => new UpstreamUnavailable(detail: 'The payment provider did not answer.')); +}) +``` + +Your own `render` callbacks run before the package's, so the application can always override a response. + +## Options + +| Option | Default | Meaning | +|---|---|---| +| `type_base_uri` | `/problems` | Base for slug types | +| `paths` | `['api/*']` | Paths that always get problem details, whatever `Accept` says | +| `apiguide` | `true` | Type plain HTTP errors and validation from the catalogue; `false` uses `about:blank` | +| `www_authenticate` | `Bearer` | The challenge sent with a 401; `false` for none | +| `instance_from_request_id` | `true` | `instance` from the request ID | + +To resolve types another way, bind `JustSteveKing\Toolbox\ProblemDetails\Contracts\TypeResolver`. diff --git a/.claude/skills/api-toolbox-development/references/signatures-and-digests.md b/.claude/skills/api-toolbox-development/references/signatures-and-digests.md new file mode 100644 index 0000000..806d125 --- /dev/null +++ b/.claude/skills/api-toolbox-development/references/signatures-and-digests.md @@ -0,0 +1,101 @@ +# Message signatures and digests + +## HTTP Message Signatures (RFC 9421) + +Feature: `Features::messageSignatures([...])`. This is the standard way to sign webhooks and API requests. Use it instead of an HMAC in a custom header. + +### Configure keys + +Keys are configured by key ID. Keep secrets in `.env` and keys in files: + +```php +Features::messageSignatures([ + 'keys' => [ + 'webhooks' => ['algorithm' => 'hmac-sha256', 'secret' => env('WEBHOOK_SECRET')], + 'partner' => ['algorithm' => 'ed25519', 'public_key' => storage_path('keys/partner.pem')], + 'server' => ['algorithm' => 'ecdsa-p256-sha256', 'private_key' => storage_path('keys/server.pem')], + ], + 'verify' => [ + 'required' => ['@method', '@authority', '@path'], + 'max_age' => 300, + ], + 'sign' => ['key' => 'server'], +]), +``` + +- Algorithms: `hmac-sha256` (with `secret`; prefix with `base64:` for an encoded secret), `ed25519`, `ecdsa-p256-sha256`, `ecdsa-p384-sha384`, `rsa-v1_5-sha256` and `rsa-pss-sha512`. +- The algorithm belongs to the key. A request cannot choose it. +- Generate an Ed25519 key pair with `openssl genpkey -algorithm ed25519 -out private.pem` and `openssl pkey -in private.pem -pubout -out public.pem`. +- To load keys per client from a database or a JWKS endpoint, bind `JustSteveKing\Toolbox\MessageSignatures\Contracts\KeyResolver`. + +### Sending a signed webhook + +```php +use Illuminate\Support\Facades\Http; + +Http::withSignature('webhooks')->post($endpoint, $payload); +``` + +This signs the method, the target URI, `Content-Type` and a `Content-Digest` of the body, and adds the digest for you. Deliver webhooks from a queued job, and put `$tries` and `$backoff` on the job for retries: + +```php +final class SendWebhook implements ShouldQueue +{ + use Queueable; + + public int $tries = 5; + + public array $backoff = [10, 60, 300]; + + public function __construct(public string $url, public array $payload) {} + + public function handle(): void + { + Http::withSignature('webhooks')->post($this->url, $this->payload)->throw(); + } +} +``` + +Other components, a label and parameters: `Http::withSignature('partner', ['@method', '@authority'], 'partner-sig', ['tag' => 'orders'])`. + +### Verifying incoming requests + +```php +use JustSteveKing\Toolbox\MessageSignatures\VerifiedSignature; + +Route::post('webhooks/orders', HandleOrderWebhook::class)->middleware('signature.verify'); + +// In the handler: +$signer = VerifiedSignature::of($request)?->keyId; +``` + +- A request passes when one signature from a known key covers the required components, plus `content-digest` when there is a body, matches, matches the body, and is fresh: `created` no older than `max_age`. +- A failure is a 401 `unauthorized` problem carrying `Accept-Signature`. A malformed signature header is a 400. +- Nonce uniqueness is not tracked. A short `max_age` limits replay; track nonces yourself if a replay inside that window matters. +- Do not read the `Signature` header in the controller or verify an HMAC by hand. + +### Signing responses + +```php +Route::get('orders/{order}', ShowOrder::class)->middleware('signature.sign'); // the sign.key option +Route::get('reports/{report}', ShowReport::class)->middleware('signature.sign:server'); // a named key +``` + +### Moving from juststeveking/laravel-webhooks + +Replace `Webhook::to($url)->with($payload)->send()` with `Http::withSignature('webhooks')->post($url, $payload)`, and queued sends with a queued job like the one above. Receivers that check the old `Signature` header must move to RFC 9421; `signature.verify` is that receiver. + +## Digest Fields (RFC 9530) + +Feature: `Features::digests()`. Integrity checks on bodies, with sha-256 or sha-512 only. + +```php +Route::put('files/{file}', StoreFile::class)->middleware('digest.verify'); // check when sent +Route::put('ledger/{entry}', StoreEntry::class)->middleware('digest.verify:required'); // 400 without one +Route::get('files/{file}', ShowFile::class)->middleware('digest.respond'); // when the client asks +Route::get('ledger/{entry}', ShowEntry::class)->middleware('digest.respond:always'); // on every response +``` + +- A failure is a 400 typed `digest-mismatched-values`, `digest-invalid-values` or `digest-unsupported-algorithms` (`ApiGuide::DIGEST_MISMATCHED_VALUES` and the others). +- `digest.respond` answers `Want-Content-Digest` and `Want-Repr-Digest`. HEAD, 204, 304 and streamed responses get no digest. +- Message signatures already add and check `Content-Digest`. You do not need `digest.verify` on a `signature.verify` route. diff --git a/.claude/skills/api-toolbox-development/references/testing.md b/.claude/skills/api-toolbox-development/references/testing.md new file mode 100644 index 0000000..61fd243 --- /dev/null +++ b/.claude/skills/api-toolbox-development/references/testing.md @@ -0,0 +1,131 @@ +# Testing API Toolbox features + +The package adds assertions to Laravel's `TestResponse`, and matching Pest expectations. They check the exact syntax each standard requires, not only that a header exists. Use them instead of `assertHeader()` or `assertJsonPath()` on these headers and problem members. + +They are registered only while `APP_ENV=testing`, and only for enabled features. If an assertion is "not found", its feature is disabled in `config/api-toolbox.php`. + +## Problem Details + +```php +$this->postJson('/api/charges', ['amount' => 5000]) + ->assertProblemType('https://docs.example.com/problems/out-of-credit', 403) + ->assertJsonPath('balance', 30); + +$this->getJson('/api/orders/999')->assertProblem(404); + +expect($this->getJson('/api/orders/999'))->toBeProblem(404); +``` + +For a type from the catalogue, compare with the constant: `->assertProblemType(ApiGuide::ACCOUNT_FROZEN)`. Validation errors are `->assertProblemType(ApiGuide::VALIDATION_FAILED, 422)->assertJsonValidationErrors(['email'])`. + +## Conditional requests + +```php +$etag = $this->getJson("/api/documents/{$document->id}")->assertETag(weak: false)->headers->get('ETag'); + +$this->getJson("/api/documents/{$document->id}", ['If-None-Match' => $etag])->assertNotModified(); + +$document->touch(); + +$this->patchJson("/api/documents/{$document->id}", ['title' => 'New'], ['If-Match' => $etag])->assertPreconditionFailed(); + +$this->patchJson("/api/documents/{$document->id}", ['title' => 'New'])->assertPreconditionRequired(); +``` + +`assertCacheControl(['public', 'max-age' => '60'])` checks `Cache-Control` directives. + +## Idempotency + +```php +$first = $this->postJson('/api/charges', $payload, ['Idempotency-Key' => '"abc"']); +$retry = $this->postJson('/api/charges', $payload, ['Idempotency-Key' => '"abc"']); + +$retry->assertIdempotentReplay($first); +expect(Charge::count())->toBe(1); +``` + +## Preferences and async operations + +```php +// A 200 becomes 204; a 201 stays 201 with its Location, but with no body. +$this->patchJson("/api/items/{$item->id}", $data, ['Prefer' => 'return=minimal']) + ->assertNoContent() + ->assertPreferenceApplied('return', 'minimal'); + +Queue::fake(); +$monitor = $this->postJson('/api/reports', $data, ['Prefer' => 'respond-async'])->assertOperationAccepted(); +$this->getJson($monitor)->assertOk()->assertJsonPath('status', 'pending'); +``` + +`assertOperationAccepted()` checks for a 202 with `Location` and `Retry-After`, and returns the monitor URL. + +## Digests, signatures and Merge Patch + +```php +$this->getJson('/api/ledger/1')->assertReprDigest(); +$this->getJson('/api/files/1', ['Want-Content-Digest' => 'sha-256=10'])->assertContentDigest(); +$this->patchJson('/api/posts/1', [], ['Content-Type' => 'application/json'])->assertStatus(415)->assertAcceptsPatch(); +``` + +To test a `signature.verify` route, sign the request in the test with the package's `Signer`. The key must have a `secret` or `private_key` in the test configuration: + +```php +use JustSteveKing\Toolbox\MessageSignatures\Messages\IncomingRequest; +use JustSteveKing\Toolbox\MessageSignatures\Signer; +use JustSteveKing\Toolbox\Support\ApiGuide; +use Symfony\Component\HttpFoundation\Request as SymfonyRequest; + +it('accepts a signed webhook', function () { + $body = '{"event":"order.paid","id":42}'; + $digest = 'sha-256=:'.base64_encode(hash('sha256', $body, true)).':'; + + $request = SymfonyRequest::create('http://localhost/webhooks/orders', 'POST', content: $body); + $request->headers->set('Content-Type', 'application/json'); + $request->headers->set('Content-Digest', $digest); + + $fields = app(Signer::class)->sign( + new IncomingRequest($request), + 'webhooks', + ['@method', '@authority', '@path', 'content-digest', 'content-type'], + )->fields(); + + $this->call('POST', '/webhooks/orders', server: [ + 'CONTENT_TYPE' => 'application/json', + 'HTTP_ACCEPT' => 'application/json', + 'HTTP_CONTENT_DIGEST' => $digest, + 'HTTP_SIGNATURE_INPUT' => $fields['Signature-Input'], + 'HTTP_SIGNATURE' => $fields['Signature'], + ], content: $body)->assertOk(); +}); + +it('refuses an unsigned webhook', function () { + $this->postJson('/webhooks/orders', ['event' => 'order.paid']) + ->assertProblemType(ApiGuide::UNAUTHORIZED, 401); +}); +``` + +The URL signed must match the URL called, including the host (`localhost` in tests). + +## Deprecation, links, catalog, negotiation and rate limits + +```php +$this->getJson('/api/v1/orders') + ->assertDeprecated('2026-06-30T23:59:59Z', 'https://docs.example.com/deprecations/orders-v1') + ->assertSunset('2027-01-01'); + +$this->getJson('/api/v2/orders')->assertNotDeprecated(); + +$this->getJson('/api/posts')->assertLinkHeader('next')->assertNoLinkHeader('prev'); + +$this->get('/.well-known/api-catalog')->assertApiCatalog('https://example.com/api/v1'); + +$this->getJson('/api/orders', ['traceparent' => '00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01']) + ->assertTraceparent('4bf92f3577b34da6a3ce929d0e0e4736') + ->assertRequestId(); + +$this->getJson('/api/orders')->assertRateLimitHeaders('api', 59); +``` + +## Pest expectations + +Each assertion has an expectation on a `TestResponse`: `toBeProblem`, `toHaveProblemType`, `toBeDeprecated`, `toHaveSunset`, `toHaveETag`, `toBeNotModified`, `toBePreconditionFailed`, `toBePreconditionRequired`, `toHaveCacheControl`, `toBeIdempotentReplayOf`, `toHaveRateLimitHeaders`, `toHaveTraceparent`, `toHaveRequestId`, `toHavePreferenceApplied`, `toHaveContentDigest`, `toHaveReprDigest`, `toHaveLink` and `toBeApiCatalog`. diff --git a/.claude/skills/api-toolbox-development/references/writes.md b/.claude/skills/api-toolbox-development/references/writes.md new file mode 100644 index 0000000..1adca2b --- /dev/null +++ b/.claude/skills/api-toolbox-development/references/writes.md @@ -0,0 +1,103 @@ +# Writes: Merge Patch, Prefer, idempotency and async operations + +## JSON Merge Patch for PATCH (RFC 7396) + +Feature: `Features::mergePatch()`. A member present in the patch changes, a member set to `null` is removed, and a member absent is left alone, all the way down nested objects. + +```php +use JustSteveKing\Toolbox\MergePatch\MergePatch; + +Route::patch('posts/{post}', function (Post $post, MergePatch $patch) { + $fields = ['title', 'summary', 'tags']; + $document = $patch->applyTo($post->only($fields)); + + Validator::make($document, [ + 'title' => ['required', 'string'], + 'summary' => ['nullable', 'string'], + 'tags' => ['array'], + ])->validate(); + + $post->update($patch->changesTo($post->only($fields))); + + return new PostResource($post); +})->middleware('merge-patch'); +``` + +- **Validate the merged document from `applyTo()`, not the request input.** In a patch, `null` means "remove", so the resource's rules would misread it, and `required` would fail on every field the client left out. +- `changesTo()` returns only the touched members, with removed ones as `null`. That is what `update()` wants. +- Inject `MergePatch`. Do not use `$request->all()`: it cannot tell `{}` from `[]`. +- The `merge-patch` middleware answers other PATCH formats with 415 and `Accept-Patch`, and malformed JSON with 400 `malformed-request-body`. +- Clients send `Content-Type: application/merge-patch+json`. + +## Prefer (RFC 7240) + +Feature: `Features::preferences()`. Add the `prefer` middleware to write routes: + +```php +Route::middleware('prefer')->group(function () { + Route::post('items', CreateItem::class); + Route::patch('items/{item}', UpdateItem::class); +}); +``` + +- `Prefer: return=minimal` empties a successful write response: 200 becomes 204, while 201 stays 201 with its `Location`. The controller does nothing different. +- `Vary: Prefer` and `Preference-Applied` are added for you. +- Read preferences by injecting `JustSteveKing\Toolbox\Preferences\Preferences`: `respondAsync()`, `returnMinimal()`, `handlingStrict()` and `wait()`. Record one you honoured yourself with `$preferences->applied('wait', '10')`. +- Strict input: add `use HonoursHandlingPreference;` (`JustSteveKing\Toolbox\Preferences\Validation\HonoursHandlingPreference`) to a FormRequest. Under `Prefer: handling=strict`, fields with no rule then fail validation instead of being dropped. + +Use `Prefer` instead of query parameters such as `?return=none` or `?async=1`. + +## Idempotency-Key for POST and PATCH + +Feature: `Features::idempotency()`. + +```php +Route::post('charges', CreateCharge::class)->middleware('idempotent'); // honoured when sent +Route::post('payouts', CreatePayout::class)->middleware(['auth:sanctum', 'idempotent:required']); // 400 without a key +``` + +- A retry with the same key and payload gets the stored response without the action running again. The same key with a different payload is 422. A retry while the first request is still running is 409 with `Retry-After`. +- Keys are scoped to the authenticated user, or to the IP when there is none. The middleware is ordered after authentication automatically. +- Validation errors are stored and replayed. 5xx responses and 429s are not stored, so those can be retried. +- **The cache store must support atomic locks:** Redis, Memcached, database, file, DynamoDB or array. The package refuses APC, session, storage and null stores. Set `'store' => 'redis'` in the options if the default store lacks locks. +- Publish your `ttl` (default 86400 seconds) in your API documentation. The draft requires an API to state its idempotency policy. + +Do not build a dedupe table or check for duplicate requests in the controller. + +## Async operations: 202 Accepted and a status monitor + +Feature: `Features::asyncOperations()`. Any queued job that uses Laravel's `Queueable` trait works. + +```php +use JustSteveKing\Toolbox\AsyncOperations\Operations; +use JustSteveKing\Toolbox\Preferences\Preferences; + +public function store(StoreReportRequest $request, Operations $operations, Preferences $preferences) +{ + if ($preferences->respondAsync()) { + return $operations->dispatch(new GenerateReport($request->validated())); + } + + return new ReportResource((new GenerateReport($request->validated()))->handle()); +} +``` + +Or always dispatch: `return $operations->dispatch(new GenerateReport(...));`. + +- `dispatch()` returns a 202 with `Location` pointing to the status monitor (`api/operations/{id}` by default), and `Retry-After`. +- In the job, say where the result lives: + +```php +use JustSteveKing\Toolbox\AsyncOperations\CurrentOperation; + +public function handle(CurrentOperation $operation): void +{ + $report = Report::create(/* ... */); + + $operation->resultAt(route('reports.show', $report)); +} +``` + +- The monitor answers 200 with the status while the job is pending or running, 303 to the result when it has succeeded, 200 with an `error` problem when it has failed, and 404 for an unknown operation or one started by someone else. +- Status lives in the cache for `ttl` seconds (default 86400). +- The monitor route runs behind the `middleware` option (default `['api']`). Add your auth middleware there if operations must be private. diff --git a/.claude/skills/infer-conventions/SKILL.md b/.claude/skills/infer-conventions/SKILL.md new file mode 100644 index 0000000..ae4f10e --- /dev/null +++ b/.claude/skills/infer-conventions/SKILL.md @@ -0,0 +1,105 @@ +--- +name: infer-conventions +description: "Use this skill to analyze how a Laravel application is actually written and record its conventions as shared rules. Trigger when the user wants to detect, infer, document, or standardize project conventions or coding style, set up or grow `.ai/rules`, resolve mixed or conflicting patterns (e.g. \"are we using Form Requests or inline validation?\"), or onboard agents and teammates to \"how we do things here\". Covers: a systematic sweep of ~49 Laravel convention dimensions (validation, models, architecture, testing, frontend, database, API responses), open-ended house-pattern discovery, conflict reporting, and recording rules scoped to the right paths via the Boost `record-rule` MCP tool. Only run this skill when the user explicitly asks for it; never start a sweep as part of another task. Do not use for one-off code review, enforcing formatting a linter already handles, or editing `.ai/rules` files by hand." +disable-model-invocation: true +license: MIT +metadata: + author: laravel +--- + +# Infer Conventions + +Learn how this application writes Laravel, then record what you learn as durable, path-scoped rules other agents will read. You are documenting reality, not improving it. + +## Ground Rules (read before you start) + +- Consistency first. The codebase's majority style is the convention. Never judge it, never propose a "better" pattern, never record what the code should do. If the app validates inline everywhere, that is the rule, even if Form Requests would be nicer. +- Skip what an active tool produces, keep what a tool would fight. Inspect the project's Pint and Rector configuration first; a Rector transformation is tooling-owned only when its package and relevant rule or set are installed and enabled. Active tools may rewrite code toward one canonical form: `$casts` to `casts()`, `$fillable` to attributes, magic accessors to the `Attribute` class, pipe-string rules to arrays, `$signature` to `#[Signature]`, named migrations to anonymous, and many more. When the app already sits at an active tool's target form, the tool owns it, so record nothing. But when the app deliberately holds a form an active tool would refactor away, such as legacy `getXxxAttribute()` accessors the `Attribute` class would replace, no tool can reproduce that choice and an agent defaults the other way. That against-the-grain hold is exactly what to record. +- Record decisions, not defaults. A consistent pattern earns a rule only when it reflects a choice: the app took one valid option where the framework or common practice offered others, or the pattern would surprise a competent agent. Framework defaults steer nothing, so skip them: anonymous migrations, `$signature` commands, `ShouldQueue` jobs, `casts()` on Laravel 11+, named routes, Rule objects in `app/Rules`, and `Mail::fake()` or `Bus::fake()` to isolate framework services. A real fork is not enough on its own. Weigh the side the app took, and record only the side an agent would not reach for by itself: inline closures everywhere, legacy accessors, a bespoke query layer. Watch for the false fork too. "No Mockery" next to facade fakes is not a choice against Mockery, because they double different things. The test for every candidate: without this rule, would the next agent plausibly write it differently? Only "yes" earns a rule. +- Architecture choices are the gold. Record presence and deliberate absence. The structural pattern the app commits to is the highest-signal convention and the one no tool can decide: Action classes and how they are invoked (`handle` / `execute` / `__invoke`), service objects, dedicated query objects exposing `builder()`, DTOs (spatie/laravel-data vs readonly classes), Form Request validation vs inline, an events and listeners spine vs direct calls, and domain or module folders. Also record a consistent non-pattern, such as "query Eloquent directly in controllers, no repository layer", so the next agent matches the app's altitude instead of over-engineering. +- Never duplicate `.ai/rules`. Read `.ai/rules/index.md` and the area files before the sweep. A dimension already covered there is marked done and skipped. +- Evidence or silence. A convention needs at least 3 consistent examples and no meaningful rival to become a candidate. Every Step 1 verdict applies this bar. +- The recorded rule states the convention, nothing else. One or two imperative lines: this project does X, so do X here. Keep detection evidence out. No counts, ratios, current usage, file lists, or example paths, because that is proof for the confirm step, not part of the rule. One short syntax fragment at most, and point to `search-docs` for API details. + +## Process + +Each step ends on a checkable completion criterion. Do not advance until it holds. + +Fan out when you can. The sweep is embarrassingly parallel. If your environment can spawn subagents (a Task, dispatch, or equivalent tool), do Step 0 yourself, then hand each checklist group (A to J) and the architecture map to its own subagent. Each subagent runs the greps, reads a few representative files, and returns structured verdicts (dimension, verdict, evidence, proposed glob / title / note). You aggregate, dedupe, then run Steps 3 to 5. It is far faster on a real app. No subagents available? Run the steps in sequence, with the same bar and the same output. + +### Step 0: Orient + +Read `composer.json` (installed packages tell you which checklist groups apply), the `pint.json` / PHPStan / Rector config, `.ai/rules/index.md` if present, and most important, map the `app/` tree. List every directory under `app/` (and any `Modules/`, `src/`, `packages/`, or domain root). Every folder beyond Laravel's default skeleton (`Http`, `Models`, `Providers`, `Console`, `Exceptions`) is a structural pattern the app committed to and a high-value rule waiting to be written: `Actions`, `Services`, `Data` or DTOs, `Queries`, `Repositories`, `ViewModels`, `Pipelines`, `Support`, `Enums`, `Contracts`, `Observers`, or `Domain` and module roots. Note each one. You will confirm how it is used in Step 2. + +This app has no Livewire/Inertia/Flux packages installed. Treat the frontend group as likely API-only: confirm from `resources/views` before spending time there, and skip the Livewire/Inertia/Flux dimensions. + +Done when: you have the applicable checklist groups, the dimensions already recorded in `.ai/rules`, and a list of every non-default `app/` directory mapped to the pattern it represents. + +### Step 1: Predefined sweep + +Open `references/checklist.md` and work every applicable dimension using its search hints. Give each exactly one verdict: + +- Pattern. Clears the bar, rival under ~20% of sites, and reflects a real choice (passes the decisions-not-defaults test). A recording candidate. Cite 2 to 3 example files. +- Conflict. Both styles present in meaningful numbers. Report the split with counts and example files. Never record a preferred winner while the code remains mixed, even in yolo, because that would describe an aspiration rather than reality. Record only if the user identifies a stable path or context boundary that explains both styles; otherwise defer until the code is reconciled. +- Default. Consistent, but a framework or common-practice default the agent already writes unprompted. Skip it as a no-op, not a convention. +- No signal. Under the bar: feature unused, or too few examples. Skip silently (one summary line at most). +- Tooling-owned or Already-recorded. Skip per the ground rules. + +Done when: every applicable dimension carries exactly one of those verdicts. + +### Step 2: Open-ended pass + +First, close out the architecture map from Step 0. For every non-default `app/` directory you listed, confirm how the pattern is used and apply the same evidence and decisions-not-defaults tests as Step 1. Generator-standard or sparsely used directories such as `Rules`, `Observers`, `Mail`, and `Notifications` are signals to inspect, not automatic conventions. Make genuine structural patterns candidates: Action classes invoked via `handle` / `execute` / `__invoke`, Services constructor-injected, `Queries` objects exposing `builder(): Builder`, DTOs as readonly classes or spatie/laravel-data, module or domain folders as the unit of organization. Scope each qualifying pattern to its own directory glob. Also record a consistent deliberate absence, such as "no repository layer, controllers query Eloquent directly", so the next agent matches the app's altitude. + +Then find what else makes this codebase itself: base or abstract classes most code extends, traits used everywhere, tenancy or authorization scoping woven through queries, naming schemes, and custom helpers. Same evidence bar, cite files. Record every genuine structural pattern, and cap the other house findings at ~5 so the pass stays high-signal. + +Done when: every non-default `app/` directory from Step 0 has a verdict, and the pass has produced its cited house findings (or concluded there are none). + +### Step 3: Confirm + +Present every candidate in one batch. Per item: dimension, verdict, evidence (counts and files), and the exact proposed `glob` or `globs` / `title` / `note`. Conflicts are presented as questions about an existing context boundary or deferred cleanup, not as a choice of future style. + +Default mode is confirm: record only what the user approves. Switch to yolo only when the invocation said so ("yolo", "don't ask", "just record them"), then record all pattern candidates without asking. Conflicts still go to the user in yolo. + +Done when: every candidate is approved, rejected, or (conflicts) decided. + +### Step 4: Record + +Make one `record-rule` call for each glob an approved convention applies to. Choose the most specific globs that cover the cited evidence from the mapping table below; if a convention spans models and migrations, record it under both domains so agents discover it from either path. The `note` is the bare convention: strip every trace of detection (see the ground rule). If `record-rule` is unavailable (rules disabled), report the full rule text so the user can enable `BOOST_RULES_ENABLED` or add it by hand. + +Record this: + +> Accessors and mutators: use the legacy magic-method style (`getXxxAttribute()` / `setXxxAttribute()`), not the `Attribute` class. Match it in models. + +Not this: + +> Accessors/mutators use the legacy magic-method style; the `Attribute`-class style is not used anywhere (13 legacy, 0 Attribute-class), e.g. `app/Models/Post.php`. Match the legacy style in existing models. + +Done when: every approved item has a successful tool response, and any failure is reported with its rule text. + +### Step 5: Summarize + +List recorded rules (file and title), conflicts the user deferred, notable no-signals, and remind the user to commit `.ai/rules` so their team and agents share the conventions. + +## Glob mapping + +Attach each rule to the most specific path that covers its evidence. Never a lazy `app/**` when a subtree fits. Match the glob to where the code actually lives, which is not the same in a default skeleton and in a modular or DDD layout. Use the Step 0 `app/` map to pick the real path. + +Examples: + +- Models: `app/Models/**` in a default app, or `app/Modules/Blog/Models/**` / `src/Domain/Blog/**` in a modular one. +- Controllers, routing, validation, responses: `app/Http/**`, or `app/Modules/*/Http/**` when each module owns its HTTP layer. +- Actions, Services, DTOs: `app/Actions/**`, `app/Services/**`, `app/Data/**`, or the module path the app actually uses. +- Tests: `tests/**`. +- Migrations and database: `database/migrations/**`. +- Truly app-wide (rare, e.g. auth retrieval): `app/**`. + +`record-rule` takes one glob. When a convention genuinely spans two domains (e.g. UUID keys touch models and migrations), call it once per domain with the same title and note; mentioning another path in the note does not make the rule discoverable there. + +## Edge cases + +- Rules disabled or `record-rule` missing: detection is read-only, so Steps 0 to 3 still run, and recording falls back to the manual path in Step 4. +- Tiny or fresh app: most dimensions land on no-signal. Say so honestly ("not enough code to infer conventions yet") and record nothing. +- Huge app: each dimension is a bounded grep plus a handful of file reads. Sample representative files, do not read everything. +- Re-runs: reading `.ai/rules` in Step 0 makes re-runs incremental, so only new or undecided dimensions surface. +- Non-standard layout (modules, DDD): the open-ended pass catches the layout itself as convention #1. Adapt the globs in the mapping table to the observed paths. diff --git a/.claude/skills/infer-conventions/references/checklist.md b/.claude/skills/infer-conventions/references/checklist.md new file mode 100644 index 0000000..87df48c --- /dev/null +++ b/.claude/skills/infer-conventions/references/checklist.md @@ -0,0 +1,137 @@ +# Detection Checklist + +Every dimension here is a genuine fork: Laravel offers two or more valid approaches, the app's choice changes what the next agent writes, and no active project tool can pick for you. Left out on purpose: pure formatting (Pint owns it), any form an installed and enabled Rector rule rewrites to one canonical shape (`$casts` to `casts()`, `$fillable` to attributes, pipe-string rules to arrays, named to anonymous migrations, `$signature` to `#[Signature]`), and framework defaults any agent writes unprompted (`ShouldQueue` jobs, relation return types, `HasFactory`). + +Each item gives the fork, then a hint (a grep or dir to spot which side the app takes). Hints are only a start. Read the matched files, never record on a raw count. Apply the ground rules to every verdict: a consistent choice that is a default or a tool's target form is not a pattern. Rows tagged (architecture) are the highest-signal, so record presence and deliberate absence. + +--- + +## A. Validation & HTTP input + +1. Validation entry point: inline `$request->validate()` vs Form Request classes vs `Validator::make()`. + - Hint: `ls app/Http/Requests`; grep -- `->validate(` / `Validator::make(` in `app/Http/Controllers`. +2. Custom rule location: invokable rule objects in `app/Rules` vs inline closures vs `Validator::extend()` in a provider. Rule objects are the default `make:rule` path, so record only if the app leans on closures or `Validator::extend` instead. "No rule objects" alone is just no-signal. + - Hint: `ls app/Rules`; grep `Validator::extend` in `app/Providers`. +3. Typed input retrieval: typed getters (`$request->string()`, `->integer()`, `->enum()`, `->date()`) vs raw `$request->input()` / dynamic properties. + - Hint: grep -- `->string(` / `->integer(` / `->enum(` vs `->input(` in `app/Http`. +4. Custom messages/attributes: `lang/*/validation.php` vs Form Request `messages()` / `attributes()` methods. + - Hint: `ls lang`; grep `function messages`, `function attributes` in `app/Http/Requests`. + +## B. Controllers & routing + +5. Controller shape: invokable single-action (`__invoke`) vs resource controllers vs plain multi-method. + - Hint: grep `__invoke` in controllers; `Route::resource` / `apiResource` vs verb routes. +6. Business-logic location (architecture): fat controllers vs delegated to Actions / Services / Jobs. + - Hint: read a few controller methods; `ls app/Actions app/Services`. +7. Route handler style: closures in `routes/*.php` vs controller classes. + - Hint: count `function ()` vs `::class` in `routes/web.php`, `routes/api.php`. +8. Middleware assignment: route/group `->middleware()` vs controller `HasMiddleware::middleware()` vs `#[Middleware]` attribute. + - Hint: grep -- `implements HasMiddleware`, `#[Middleware(` in controllers vs `->middleware(` in routes. +9. Route model binding: implicit (type-hinted models) vs explicit `Route::bind` vs manual `findOrFail`. + - Hint: typed model params in signatures vs `findOrFail(` in controllers; grep `Route::bind`. +10. Rate limiting: named `RateLimiter::for()` + `throttle:name` vs inline `throttle:60,1`. + - Hint: grep `RateLimiter::for` in providers vs `throttle:` in route files. + +## C. Authorization + +11. Authorization home: Gates (`Gate::define`) vs Policy classes in `app/Policies`. + - Hint: `ls app/Policies`; grep `Gate::define` in `app/Providers`. +12. Authorization call site: `$this->authorize()` / `Gate::authorize()` vs `$user->can()` vs `can` middleware vs `#[Authorize]` vs `@can` in Blade. + - Hint: grep -- `authorize(`, `->can(`, `middleware('can:`, `#[Authorize(`, `@can(`. + +## D. Eloquent & models + +13. Mass assignment: `$fillable` allow-list vs `$guarded` block-list. + - Hint: grep `protected $fillable` / `protected $guarded` in `app/Models`. +14. Accessors/mutators: modern `Attribute` class vs legacy `getXxxAttribute()` / `setXxxAttribute()`. Record a legacy hold, it goes against the tool's grain. + - Hint: grep `: Attribute` / `Attribute::make` vs `function get[A-Z].*Attribute` in `app/Models`. +15. Primary keys: auto-increment vs `HasUuids` vs `HasUlids`. + - Hint: grep `HasUuids` / `HasUlids` in `app/Models`; migration `id()` vs `uuid('id')`. +16. Custom casts: dedicated `CastsAttributes` classes (`app/Casts`) vs inline `Attribute` vs built-in cast strings. + - Hint: `ls app/Casts`; grep `Cast::class`, `AsStringable::class` in models. +17. Data/query layer (architecture): Eloquent directly in controllers vs repositories vs dedicated query objects (e.g. classes exposing `builder(): Builder`). + - Hint: `ls app/Repositories app/Queries`; see where non-trivial queries are built. +18. Query scopes: local `scope`/`#[Scope]` methods vs dedicated builder classes. + - Hint: grep `function scope` / `#[Scope]` in models; `ls app/*/Builders`. +19. Model events: observers (`app/Observers`, `#[ObservedBy]`) vs `booted()` closures vs event classes. + - Hint: `ls app/Observers`; grep `booted`, `::observe`, `#[ObservedBy]`. +20. Eager-load posture: explicit per-query `->with()` vs model-level `$with` defaults. Treat `preventLazyLoading()` separately as a development guard because it can complement either posture. + - Hint: grep -- `protected $with`, `->with(`, and separately `preventLazyLoading` in `app/`. + +## E. Architecture & organization + +21. Action/Service structure (architecture): Action classes (invoked via `handle` / `execute` / `__invoke`) vs service objects vs neither. Cross-check the Step 0 `app/` map: any `Actions`/`Services`/`Pipelines`/`Jobs`-as-actions folder is this pattern, so record how it is invoked. + - Hint: `ls app/` (the whole tree, not just `Actions`/`Services`); grep the invocation method in the folder you find. +22. DTOs (architecture): spatie/laravel-data vs plain readonly classes vs arrays everywhere. + - Hint: `ls app/Data`; grep `extends Data`, `readonly class` in `app/`. +23. Dependency acquisition: constructor/method injection vs `app()` / `resolve()` / `App::make()` service location. + - Hint: grep `app(` / `resolve(` / `::make(` in `app/` vs promoted constructor deps. +24. Decoupling: events + listeners vs direct service calls. + - Hint: `ls app/Events app/Listeners`; grep `event(`, `::dispatch(`. +25. Helper vs facade idiom: global helpers (`config()`, `auth()`, `response()`) vs facades (`Config::`, `Auth::`, `Response::`). + - Hint: ratio of `config(` vs `Config::` (etc.) across `app/`. +26. Namespace layout (architecture): default `app/` skeleton vs domain/module folders (`app/Domain/**`, modules). + - Hint: `ls app/`, look for `Domain/`, `Modules/`, bounded-context folders. +27. Enums: backed vs pure; case naming; where they live. + - Hint: `ls app/Enums`; grep `enum .*: string`, `enum .*: int`. + +## F. Frontend & views + +No Livewire/Inertia/Flux package is installed. This app may be API-only. Confirm from `resources/views` before sweeping, and treat the Livewire/Flux dimensions as not applicable. + +28. Frontend stack: Blade+Livewire vs Inertia (Vue/React/Svelte) vs Blade-only / API + separate SPA. + - Hint: `composer.json` + `package.json`; `ls resources/js/pages`, `resources/views`. +29. Blade composition: class `` components vs anonymous components (`@props`) vs `@include` partials. + - Hint: `ls app/View/Components`; grep `constrained()` vs `foreignIdFor(Model::class)` vs manual `foreign()->references()->on()`. + - Hint: grep -- `foreignId(`, `foreignIdFor(`, `->foreign(` in `database/migrations`. +34. `down()` methods: real reverse logic vs omitted / one-way migrations. + - Hint: grep `function down` vs the migration count. +35. Enum storage: DB `enum()` column vs `string()` + PHP-enum cast on the model. + - Hint: grep -- `->enum(` in migrations vs string columns cast to enums. +36. Transactions: `DB::transaction(fn ...)` closure vs manual `beginTransaction` / `commit` / `rollBack`. + - Hint: grep `DB::transaction`, `beginTransaction` in `app/`. +37. Idempotent writes: `upsert` / `updateOrCreate` / `firstOrCreate` vs find-then-save. + - Hint: grep `upsert(`, `updateOrCreate(`, `firstOrCreate(` in `app/`. + +## H. Testing + +38. Framework: Pest (`it()` / `test()` / `expect()`) vs PHPUnit classes. + - Hint: `ls tests/Pest.php`; grep `it(` / `test(` vs `extends TestCase`. +39. DB reset: `RefreshDatabase` vs `DatabaseTruncation` vs `DatabaseMigrations`. + - Hint: grep those trait names in `tests/`. +40. Fixtures: compare how equivalent test-owned records are created, such as factories vs manual inserts. Track seeders separately for shared reference data because `$this->seed()` commonly and legitimately coexists with factories. + - Hint: grep `::factory(` and direct inserts in `tests/`; separately inspect `$this->seed(` calls and what those seeders provide. +41. Collaborator isolation: how the app doubles its own classes, Mockery `mock()` / `spy()` vs real integration. Ignore facade fakes like `Mail::fake()` here, they isolate framework services by default and are not a fork against Mockery. + - Hint: grep -- `->mock(`, `->spy(`, `Mockery::` in `tests/`. +42. Endpoint assertions: array `assertJson([...])` / `assertJsonFragment` vs fluent `AssertableJson`. + - Hint: grep `AssertableJson`, `assertJsonFragment` in `tests/`. + +## I. Responses & API resources + +43. Response shape: API Resource classes vs `response()->json()` vs returning models/arrays directly. + - Hint: `ls app/Http/Resources`; grep -- `JsonResource`, `->json(` in controllers. +44. Resource relationship inclusion: `whenLoaded()` guards vs unconditional relationship access. Do not count ordinary scalar attributes as rivals to conditional relationships, and evaluate general `when()` fields separately. + - Hint: compare relationship fields using `whenLoaded(` with unconditional relationship property access in `app/Http/Resources`. +45. Pagination contracts: within comparable endpoint categories, length-aware `paginate()` vs `simplePaginate()` vs `cursorPaginate()`. These have different totals, navigation, ordering, and performance contracts, so record only a stable path-scoped API policy, never a project-wide majority. + - Hint: grep those in `app/`, then group matches by endpoint type and client contract before comparing them. +46. Web redirects/URLs: `route('name')` vs `url('/path')` vs `action([...])`. + - Hint: grep `route('`, `url('/`, `action([` in `app/Http` and views. + +## J. Strings, collections & dates + +47. Iteration idiom: `collect()->map()->filter()` pipelines vs `array_map` / `foreach`. + - Hint: grep -- `collect(`, `->map(` vs `array_map`, `foreach` density in `app/`. +48. String API: fluent `Str::of()->...` (Stringable) vs static `Str::` vs native (`trim`, `strtoupper`). + - Hint: grep `Str::of(` vs `Str::` vs native string funcs. +49. Dates: compare equivalent construction call styles (`now()` / `today()` helpers vs `Carbon::`) separately from the application's mutable/immutable date policy. `Date::use(CarbonImmutable::class)` can make helpers return immutable dates, so those signals are complementary rather than conflicting. + - Hint: grep `now(` and `Carbon::` for call style; separately inspect `CarbonImmutable` and `Date::use` for mutability policy. + +--- + +Genuine forks only. Every row survived the "no tool can decide this, and it isn't the default" filter. Give each applicable dimension exactly one verdict: pattern, conflict, default, no-signal, tooling-owned, or already-recorded. The rows tagged (architecture) are where the highest-value rules come from. diff --git a/.claude/skills/laravel-best-practices/SKILL.md b/.claude/skills/laravel-best-practices/SKILL.md index 99018f3..311ab84 100644 --- a/.claude/skills/laravel-best-practices/SKILL.md +++ b/.claude/skills/laravel-best-practices/SKILL.md @@ -8,183 +8,52 @@ metadata: # Laravel Best Practices -Best practices for Laravel, prioritized by impact. Each rule teaches what to do and why. For exact API syntax, verify with `search-docs`. +Best practices for Laravel, organized as an index of rule files. Each rule file teaches what to do and why. For exact API syntax, verify with `search-docs`. ## Consistency First -Before applying any rule, check what the application already does. Laravel offers multiple valid approaches — the best choice is the one the codebase already uses, even if another pattern would be theoretically better. Inconsistency is worse than a suboptimal pattern. +Before applying any rule, check what the application already does. Laravel offers multiple valid approaches, and the best choice is the one the codebase already uses, even if another pattern would be theoretically better. Inconsistency is worse than a suboptimal pattern. -Check sibling files, related controllers, models, or tests for established patterns. If one exists, follow it — don't introduce a second way. These rules are defaults for when no pattern exists yet, not overrides. - -## Quick Reference - -### 1. Database Performance → `rules/db-performance.md` - -- Eager load with `with()` to prevent N+1 queries -- Enable `Model::preventLazyLoading()` in development -- Select only needed columns, avoid `SELECT *` -- `chunk()` / `chunkById()` for large datasets -- Index columns used in `WHERE`, `ORDER BY`, `JOIN` -- `withCount()` instead of loading relations to count -- `cursor()` for memory-efficient read-only iteration -- Never query in Blade templates - -### 2. Advanced Query Patterns → `rules/advanced-queries.md` - -- `addSelect()` subqueries over eager-loading entire has-many for a single value -- Dynamic relationships via subquery FK + `belongsTo` -- Conditional aggregates (`CASE WHEN` in `selectRaw`) over multiple count queries -- `setRelation()` to prevent circular N+1 queries -- `whereIn` + `pluck()` over `whereHas` for better index usage -- Two simple queries can beat one complex query -- Compound indexes matching `orderBy` column order -- Correlated subqueries in `orderBy` for has-many sorting (avoid joins) - -### 3. Security → `rules/security.md` - -- Define `$fillable` or `$guarded` on every model, authorize every action via policies or gates -- No raw SQL with user input — use Eloquent or query builder -- `{{ }}` for output escaping, `@csrf` on all POST/PUT/DELETE forms, `throttle` on auth and API routes -- Validate MIME type, extension, and size for file uploads -- Never commit `.env`, use `config()` for secrets, `encrypted` cast for sensitive DB fields - -### 4. Caching → `rules/caching.md` - -- `Cache::remember()` over manual get/put -- `Cache::flexible()` for stale-while-revalidate on high-traffic data -- `Cache::memo()` to avoid redundant cache hits within a request -- Cache tags to invalidate related groups -- `Cache::add()` for atomic conditional writes -- `once()` to memoize per-request or per-object lifetime -- `Cache::lock()` / `lockForUpdate()` for race conditions -- Failover cache stores in production - -### 5. Eloquent Patterns → `rules/eloquent.md` - -- Correct relationship types with return type hints -- Local scopes for reusable query constraints -- Global scopes sparingly — document their existence -- Attribute casts in the `casts()` method -- Cast date columns, use Carbon instances in templates -- `whereBelongsTo($model)` for cleaner queries -- Never hardcode table names — use `(new Model)->getTable()` or Eloquent queries - -### 6. Validation & Forms → `rules/validation.md` - -- Form Request classes, not inline validation -- Array notation `['required', 'email']` for new code; follow existing convention -- `$request->validated()` only — never `$request->all()` -- `Rule::when()` for conditional validation -- `after()` instead of `withValidator()` - -### 7. Configuration → `rules/config.md` - -- `env()` only inside config files -- `App::environment()` or `app()->isProduction()` -- Config, lang files, and constants over hardcoded text - -### 8. Testing Patterns → `rules/testing.md` - -- `LazilyRefreshDatabase` over `RefreshDatabase` for speed -- `assertModelExists()` over raw `assertDatabaseHas()` -- Factory states and sequences over manual overrides -- Use fakes (`Event::fake()`, `Exceptions::fake()`, etc.) — but always after factory setup, not before -- `recycle()` to share relationship instances across factories - -### 9. Queue & Job Patterns → `rules/queue-jobs.md` - -- `retry_after` must exceed job `timeout`; use exponential backoff `[1, 5, 10]` -- `ShouldBeUnique` to prevent duplicates; `WithoutOverlapping::untilProcessing()` for concurrency -- Always implement `failed()`; with `retryUntil()`, set `$tries = 0` -- `RateLimited` middleware for external API calls; `Bus::batch()` for related jobs -- Horizon for complex multi-queue scenarios - -### 10. Routing & Controllers → `rules/routing.md` - -- Implicit route model binding -- Scoped bindings for nested resources -- `Route::resource()` or `apiResource()` -- Methods under 10 lines — extract to actions/services -- Type-hint Form Requests for auto-validation - -### 11. HTTP Client → `rules/http-client.md` - -- Explicit `timeout` and `connectTimeout` on every request -- `retry()` with exponential backoff for external APIs -- Check response status or use `throw()` -- `Http::pool()` for concurrent independent requests -- `Http::fake()` and `preventStrayRequests()` in tests - -### 12. Events, Notifications & Mail → `rules/events-notifications.md`, `rules/mail.md` - -- Event discovery over manual registration; `event:cache` in production -- `ShouldDispatchAfterCommit` / `afterCommit()` inside transactions -- Queue notifications and mailables with `ShouldQueue` -- On-demand notifications for non-user recipients -- `HasLocalePreference` on notifiable models -- `assertQueued()` not `assertSent()` for queued mailables -- Markdown mailables for transactional emails - -### 13. Error Handling → `rules/error-handling.md` - -- `report()`/`render()` on exception classes or in `bootstrap/app.php` — follow existing pattern -- `ShouldntReport` for exceptions that should never log -- Throttle high-volume exceptions to protect log sinks -- `dontReportDuplicates()` for multi-catch scenarios -- Force JSON rendering for API routes -- Structured context via `context()` on exception classes - -### 14. Task Scheduling → `rules/scheduling.md` - -- `withoutOverlapping()` on variable-duration tasks -- `onOneServer()` on multi-server deployments -- `runInBackground()` for concurrent long tasks -- `environments()` to restrict to appropriate environments -- `takeUntilTimeout()` for time-bounded processing -- Schedule groups for shared configuration - -### 15. Architecture → `rules/architecture.md` - -- Single-purpose Action classes; dependency injection over `app()` helper -- Prefer official Laravel packages and follow conventions, don't override defaults -- Default to `ORDER BY id DESC` or `created_at DESC`; `mb_*` for UTF-8 safety -- `defer()` for post-response work; `Context` for request-scoped data; `Concurrency::run()` for parallel execution - -### 16. Migrations → `rules/migrations.md` - -- Generate migrations with `php artisan make:migration` -- `constrained()` for foreign keys -- Never modify migrations that have run in production -- Add indexes in the migration, not as an afterthought -- Mirror column defaults in model `$attributes` -- Reversible `down()` by default; forward-fix migrations for intentionally irreversible changes -- One concern per migration — never mix DDL and DML - -### 17. Collections → `rules/collections.md` - -- Higher-order messages for simple collection operations -- `cursor()` vs. `lazy()` — choose based on relationship needs -- `lazyById()` when updating records while iterating -- `toQuery()` for bulk operations on collections - -### 18. Blade & Views → `rules/blade-views.md` - -- `$attributes->merge()` in component templates -- Blade components over `@include`; `@pushOnce` for per-component scripts -- View Composers for shared view data -- `@aware` for deeply nested component props - -### 19. Conventions & Style → `rules/style.md` - -- Follow Laravel naming conventions for all entities -- Prefer Laravel helpers (`Str`, `Arr`, `Number`, `Uri`, `Str::of()`, `$request->string()`) over raw PHP functions -- No JS/CSS in Blade, no HTML in PHP classes -- Code should be readable; comments only for config files +Check sibling files, related controllers, models, or tests for established patterns. If one exists, follow it. Don't introduce a second way. These rules are defaults for when no pattern exists yet, not overrides. ## How to Apply -Always use a sub-agent to read rule files and explore this skill's content. - -1. Identify the file type and select relevant sections (e.g., migration → §16, controller → §1, §3, §5, §6, §10) -2. Check sibling files for existing patterns — follow those first per Consistency First -3. Verify API syntax with `search-docs` for the installed Laravel version \ No newline at end of file +1. Check the changed files, nearby code, project configuration, and relevant tests for established patterns. Deviate only for a correctness or security defect, and call the deviation out. +2. Map every affected concern to the rule index below. Read each mapped rule file before editing. Skip unrelated rule files. +3. Make the smallest coherent change. Keep the application's architecture and naming instead of introducing a second pattern for the same job. +4. Verify version-sensitive Laravel APIs for the installed version with `search-docs`, or inspect the installed framework when it is unavailable. +5. Run the narrowest relevant tests first, then the project's formatting and static-analysis checks when the change warrants them. +6. Re-read the diff against every mapped rule before finishing. + +## Rule Index + +Cross-cutting changes often need more than one rule file. + +| Concern | Read | +| --- | --- | +| Query count, eager loading, indexes, large datasets | [`rules/db-performance.md`](rules/db-performance.md) | +| Subqueries, aggregates, complex ordering and query plans | [`rules/advanced-queries.md`](rules/advanced-queries.md) | +| Models, relationships, scopes, casts | [`rules/eloquent.md`](rules/eloquent.md) | +| Authentication, authorization, input safety, secrets, uploads | [`rules/security.md`](rules/security.md) | +| Form Requests and validation rules | [`rules/validation.md`](rules/validation.md) | +| Controllers, route binding, resources, middleware | [`rules/routing.md`](rules/routing.md) | +| Schema changes, columns, foreign keys, indexes | [`rules/migrations.md`](rules/migrations.md) | +| Jobs, retries, uniqueness, batches, Horizon | [`rules/queue-jobs.md`](rules/queue-jobs.md) | +| Cache lifetime, invalidation, locks, memoization | [`rules/caching.md`](rules/caching.md) | +| Outbound requests, retries, timeouts, fakes | [`rules/http-client.md`](rules/http-client.md) | +| Exceptions, reporting, rendering, log context | [`rules/error-handling.md`](rules/error-handling.md) | +| Events and notifications | [`rules/events-notifications.md`](rules/events-notifications.md) | +| Mailables and mail assertions | [`rules/mail.md`](rules/mail.md) | +| Scheduled tasks and overlap protection | [`rules/scheduling.md`](rules/scheduling.md) | +| Collections, lazy iteration, bulk operations | [`rules/collections.md`](rules/collections.md) | +| Blade components, attributes, composers | [`rules/blade-views.md`](rules/blade-views.md) | +| Environment values and application configuration | [`rules/config.md`](rules/config.md) | +| Tests: coverage, factories, fakes, and assertions | the `testing-best-practices` skill | +| Naming, helpers, file boundaries, PHP style | [`rules/style.md`](rules/style.md) | +| Actions, services, dependencies, application structure | [`rules/architecture.md`](rules/architecture.md) | + +## Decision Rules + +- Prefer framework features and existing application abstractions over new helpers or dependencies. +- Avoid speculative abstractions. Extract code when it creates a clear domain boundary, removes meaningful duplication, or makes behavior independently testable. +- Keep database access out of Blade views and prevent hidden N+1 queries across controllers, resources, jobs, and serialization. diff --git a/.claude/skills/laravel-best-practices/rules/advanced-queries.md b/.claude/skills/laravel-best-practices/rules/advanced-queries.md index 920714a..54dd783 100644 --- a/.claude/skills/laravel-best-practices/rules/advanced-queries.md +++ b/.claude/skills/laravel-best-practices/rules/advanced-queries.md @@ -1,8 +1,8 @@ -# Advanced Query Patterns +# Advanced Query Best Practices -## Use `addSelect()` Subqueries for Single Values from Has-Many +## Select Single Relationship Values with Subqueries -Instead of eager-loading an entire has-many relationship for a single value (like the latest timestamp), use a correlated subquery via `addSelect()`. This pulls the value directly in the main SQL query — zero extra queries. +When only one value from a has-many relationship is needed, consider a correlated subquery with `addSelect()` instead of loading the entire relationship. This selects the value as part of the main query without an additional relationship query. ```php public function scopeWithLastLoginAt($query): void @@ -16,14 +16,14 @@ public function scopeWithLastLoginAt($query): void } ``` -## Create Dynamic Relationships via Subquery FK +## Create Dynamic Relationships with a Subquery Foreign Key -Extend the `addSelect()` pattern to fetch a foreign key via subquery, then define a `belongsTo` relationship on that virtual attribute. This provides a fully-hydrated related model without loading the entire collection. +The same pattern can select a foreign key and expose the selected model through a `belongsTo` relationship. Eager loading that relationship still executes a separate query, but it avoids loading the full has-many collection. ```php public function lastLogin(): BelongsTo { - return $this->belongsTo(Login::class); + return $this->belongsTo(Login::class, 'last_login_id'); } public function scopeWithLastLogin($query): void @@ -37,9 +37,9 @@ public function scopeWithLastLogin($query): void } ``` -## Use Conditional Aggregates Instead of Multiple Count Queries +## Combine Related Counts with Conditional Aggregates -Replace N separate `count()` queries with a single query using `CASE WHEN` inside `selectRaw()`. Use `toBase()` to skip model hydration when you only need scalar values. +Combine several counts over the same filtered data set into one query by using conditional aggregates. Use `toBase()` when only scalar values are needed and model hydration provides no benefit. Confirm the expression syntax against the application's database engine. ```php $statuses = Feature::toBase() @@ -49,50 +49,50 @@ $statuses = Feature::toBase() ->first(); ``` -## Use `setRelation()` to Prevent Circular N+1 +## Reuse Loaded Parent Models with `setRelation()` -When a parent model is eager-loaded with its children, and the view also needs `$child->parent`, use `setRelation()` to inject the already-loaded parent rather than letting Eloquent fire N additional queries. +When a parent and its children are already loaded and code also accesses `$child->parent`, set the inverse relationship to the existing parent instance. This avoids an additional lazy-loading query for each child. ```php $feature->load('comments.user'); $feature->comments->each->setRelation('feature', $feature); ``` -## Prefer `whereIn` + Subquery Over `whereHas` +## Compare `whereHas()` with an `IN` Subquery -`whereHas()` emits a correlated `EXISTS` subquery that re-executes per row. Using `whereIn()` with a `select('id')` subquery lets the database use an index lookup instead, without loading data into PHP memory. +`whereHas()` typically produces an `EXISTS` subquery, while `whereIn()` can express the same filter with an `IN` subquery. Either form may be faster depending on the database engine, indexes, cardinality, and query plan. Measure both forms with representative data; neither subquery loads its result set into PHP memory. -Incorrect (correlated EXISTS re-executes per row): +Option using `EXISTS`: ```php $query->whereHas('company', fn ($q) => $q->where('name', 'like', $term)); ``` -Correct (index-friendly subquery, no PHP memory overhead): +Option using `IN`: ```php $query->whereIn('company_id', Company::where('name', 'like', $term)->select('id')); ``` -## Sometimes Two Simple Queries Beat One Complex Query +## Measure Two Simple Queries Against One Complex Query -Running a small, targeted secondary query and passing its results via `whereIn` is often faster than a single complex correlated subquery or join. The additional round-trip is worthwhile when the secondary query is highly selective and uses its own index. +Two targeted queries can outperform one complex correlated subquery or join when the first query is highly selective. They also add a database round trip, can transfer a large identifier list, and do not provide a single-query consistency snapshot. Decide from query plans and production-like measurements. -## Use Compound Indexes Matching `orderBy` Column Order +## Design Composite Indexes for the Query -When ordering by multiple columns, create a single compound index in the same column order as the `ORDER BY` clause. Individual single-column indexes cannot combine for multi-column sorts — the database will filesort without a compound index. +For common multi-column sorts, consider a composite index whose column order supports the query's filters and ordering. Database engines may combine indexes or choose an explicit sort, so matching the `ORDER BY` list alone does not guarantee that an index will be used. Verify the query plan. ```php // Migration $table->index(['last_name', 'first_name']); -// Query — column order must match the index +// Query that this index may support User::query()->orderBy('last_name')->orderBy('first_name')->paginate(); ``` -## Use Correlated Subqueries for Has-Many Ordering +## Consider a Correlated Subquery for Has-Many Ordering -When sorting by a value from a has-many relationship, avoid joins (they duplicate rows). Use a correlated subquery inside `orderBy()` instead, paired with an `addSelect` scope for eager loading. +When sorting by one value from a has-many relationship, a direct join can duplicate parent rows unless it first reduces the related table to one row per parent. A correlated subquery in `orderBy()` is often simpler, but its performance depends on the query plan and supporting indexes. ```php public function scopeOrderByLastLogin($query): void @@ -103,4 +103,4 @@ public function scopeOrderByLastLogin($query): void ->take(1) ); } -``` \ No newline at end of file +``` diff --git a/.claude/skills/laravel-best-practices/rules/architecture.md b/.claude/skills/laravel-best-practices/rules/architecture.md index 1650564..d0a9a55 100644 --- a/.claude/skills/laravel-best-practices/rules/architecture.md +++ b/.claude/skills/laravel-best-practices/rules/architecture.md @@ -1,15 +1,15 @@ # Architecture Best Practices -## Single-Purpose Action Classes +## Extract Focused Business Operations -Extract discrete business operations into invokable Action classes. +Extract a discrete business operation into an action class when doing so makes the operation easier to reuse or test. An action class has no special meaning to Laravel; follow the project's naming and invocation conventions. ```php class CreateOrderAction { public function __construct(private InventoryService $inventory) {} - public function execute(array $data): Order + public function handle(array $data): Order { $order = Order::create($data); $this->inventory->reserve($order); @@ -19,11 +19,12 @@ class CreateOrderAction } ``` -## Use Dependency Injection +## Inject Required Dependencies -Always use constructor injection. Avoid `app()` or `resolve()` inside classes. +Prefer constructor injection for dependencies required throughout an object's lifetime. Method injection is appropriate for dependencies needed by one controller action, listener, job handler, or other container-invoked method. Avoid `app()` and `resolve()` when normal injection can make a dependency explicit. + +Hidden dependency: -Incorrect: ```php class OrderController extends Controller { @@ -36,24 +37,24 @@ class OrderController extends Controller } ``` -Correct: +Injected dependency: + ```php class OrderController extends Controller { - public function __construct(private OrderService $service) {} - - public function store(StoreOrderRequest $request) + public function store(StoreOrderRequest $request, OrderService $service) { - return $this->service->create($request->validated()); + return $service->create($request->validated()); } } ``` -## Code to Interfaces +## Depend on Contracts at Boundaries + +Depend on contracts at system boundaries, such as payment gateways, notification channels, and external services, when testability or interchangeable implementations justify the abstraction. -Depend on contracts at system boundaries (payment gateways, notification channels, external APIs) for testability and swappability. +Concrete boundary dependency: -Incorrect (concrete dependency): ```php class OrderService { @@ -61,7 +62,8 @@ class OrderService } ``` -Correct (interface dependency): +Contract boundary dependency: + ```php interface PaymentGateway { @@ -80,86 +82,99 @@ Bind in a service provider: $this->app->bind(PaymentGateway::class, StripeGateway::class); ``` -## Default Sort by Descending +## Specify a Deterministic Sort Order -When no explicit order is specified, sort by `id` or `created_at` descending. Explicit ordering prevents cross-database inconsistencies between MySQL and Postgres. +Without an explicit `ORDER BY`, row order is undefined. Choose an order that matches the feature, and add a unique tie-breaker when stable pagination matters. + +Unspecified order: -Incorrect: ```php $posts = Post::paginate(); ``` -Correct: +Newest first with a stable tie-breaker: + ```php -$posts = Post::latest()->paginate(); +$posts = Post::query() + ->orderByDesc('created_at') + ->orderByDesc('id') + ->paginate(); ``` ## Use Atomic Locks for Race Conditions -Prevent race conditions with `Cache::lock()` or `lockForUpdate()`. +Use a lock when concurrent execution must be serialized. `Cache::lock()` provides an atomic lock when the configured cache store supports locks. `lockForUpdate()` locks selected database rows and must run inside a database transaction. These mechanisms solve different coordination problems. Set the lease (`10` below) longer than the callback can ever run: once it expires, another process can acquire the lock while the first is still working. ```php Cache::lock('order-processing-'.$order->id, 10)->block(5, function () use ($order) { $order->process(); }); -// Or at query level -$product = Product::where('id', $id)->lockForUpdate()->first(); +// Or at query level, inside a transaction +DB::transaction(function () use ($id) { + $product = Product::where('id', $id)->lockForUpdate()->first(); + + // Read and update the product while the database lock is held. +}); ``` ## Use `mb_*` String Functions -When no Laravel helper exists, prefer `mb_strlen`, `mb_strtolower`, etc. for UTF-8 safety. Standard PHP string functions count bytes, not characters. +When no Laravel helper exists, prefer multibyte-aware functions such as `mb_strlen()` and `mb_strtolower()` for UTF-8 text. For example, `strlen()` counts bytes, while `strtolower()` is not multibyte-aware. Incorrect: + ```php -strlen('José'); // 5 (bytes, not characters) -strtolower('MÜNCHEN'); // 'mÜnchen' — fails on multibyte +strlen('José'); // 5 bytes, not 4 characters +strtolower('MÜNCHEN'); // Does not lowercase Ü ``` Correct: + ```php -mb_strlen('José'); // 4 (characters) -mb_strtolower('MÜNCHEN'); // 'münchen' +mb_strlen('José'); // 4 characters +mb_strtolower('MÜNCHEN'); // 'münchen' // Prefer Laravel's Str helpers when available -Str::length('José'); // 4 -Str::lower('MÜNCHEN'); // 'münchen' +Str::length('José'); // 4 +Str::lower('MÜNCHEN'); // 'münchen' ``` ## Use `defer()` for Post-Response Work -For lightweight tasks that don't need to survive a crash (logging, analytics, cleanup), use `defer()` instead of dispatching a job. The callback runs after the HTTP response is sent — no queue overhead. +For lightweight work that does not need retries or crash durability, consider `defer()` instead of dispatching a job. During an HTTP request, the callback normally runs after the response has been sent but remains in the same PHP process. + +Queued and durable: -Incorrect (job overhead for trivial work): ```php dispatch(new LogPageView($page)); ``` -Correct (runs after response, same process): +Deferred in the current process: + ```php defer(fn () => PageView::create(['page_id' => $page->id, 'user_id' => auth()->id()])); ``` -Use jobs when the work must survive process crashes or needs retry logic. Use `defer()` for fire-and-forget work. +Use a queued job when the work needs retries, queue controls, or durability across process failures. ## Use `Context` for Request-Scoped Data -The `Context` facade passes data through the entire request lifecycle — middleware, controllers, jobs, logs — without passing arguments manually. +The `Context` facade makes contextual data available across the current execution lifecycle without manually passing arguments through every layer. ```php // In middleware Context::add('tenant_id', $request->header('X-Tenant-ID')); -// Anywhere later — controllers, jobs, log context +// Later in the same execution lifecycle $tenantId = Context::get('tenant_id'); ``` -Context data automatically propagates to queued jobs and is included in log entries. Use `Context::addHidden()` for sensitive data that should be available in queued jobs but excluded from log context. If data must not leave the current process, do not store it in `Context`. +Visible context is added to log context, and both visible and hidden context are captured and restored for queued jobs. Use `Context::addHidden()` for data that should propagate to queued jobs without appearing in logs. Do not place secrets in context unless that propagation is intended. ## Use `Concurrency::run()` for Parallel Execution -Run independent operations in parallel using child processes — no async libraries needed. +Run independent operations concurrently through Laravel's configured concurrency driver. ```php use Illuminate\Support\Facades\Concurrency; @@ -170,13 +185,14 @@ use Illuminate\Support\Facades\Concurrency; ]); ``` -Each closure runs in a separate process with full Laravel access. Use for independent database queries, API calls, or computations that would otherwise run sequentially. +With a process-based driver, each closure runs in a separate PHP process that boots the application. Use concurrency when independent database queries, HTTP client calls, or computations benefit enough to offset process and serialization overhead. The `sync` driver executes closures sequentially and is useful primarily during testing. -## Convention Over Configuration +## Follow Framework Conventions -Follow Laravel conventions. Don't override defaults unnecessarily. +Follow Laravel conventions unless the domain or an existing schema requires an override. + +Customized schema: -Incorrect: ```php class Customer extends Model { @@ -190,7 +206,8 @@ class Customer extends Model } ``` -Correct: +Conventional schema: + ```php class Customer extends Model { @@ -199,4 +216,4 @@ class Customer extends Model return $this->belongsToMany(Role::class); } } -``` \ No newline at end of file +``` diff --git a/.claude/skills/laravel-best-practices/rules/blade-views.md b/.claude/skills/laravel-best-practices/rules/blade-views.md index c6f8aaf..4ea2c6c 100644 --- a/.claude/skills/laravel-best-practices/rules/blade-views.md +++ b/.claude/skills/laravel-best-practices/rules/blade-views.md @@ -1,8 +1,8 @@ -# Blade & Views Best Practices +# Blade and View Best Practices ## Use `$attributes->merge()` in Component Templates -Hardcoding classes prevents consumers from adding their own. `merge()` combines class attributes cleanly. +Use the component attribute bag so callers can add attributes. `merge()` combines default attributes with caller-provided values; class values receive special merging behavior. ```blade
merge(['class' => 'alert alert-'.$type]) }}> @@ -12,25 +12,25 @@ Hardcoding classes prevents consumers from adding their own. `merge()` combines ## Use `@pushOnce` for Per-Component Scripts -If a component renders inside a `@foreach`, `@push` inserts the script N times. `@pushOnce` guarantees it's included exactly once. +If a component renders repeatedly, `@push` adds its script on every render. Use a consistently named `@pushOnce` block to add that content once per rendered response. -## Prefer Blade Components Over `@include` +## Prefer Components for Explicit Interfaces -`@include` shares all parent variables implicitly (hidden coupling). Components have explicit props, attribute bags, and slots. +Use a Blade component when a reusable interface benefits from explicit props, an attribute bag, or slots. An include remains suitable for a small partial that intentionally uses the current view data; pass an explicit data array when implicit variable sharing would obscure its dependencies. -## Use View Composers for Shared View Data +## Share Compatible View Data with a View Composer -If every controller rendering a sidebar must pass `$categories`, that's duplicated code. A View Composer centralizes it. +Use a view composer to centralize data needed whenever one or more named Blade views are rendered. Keep the composer compatible with every view it targets, and avoid broad wildcards when views require different data shapes. A view composer runs when Laravel renders the matching view; it does not supply data to JSON, streamed, or other non-view responses. -## Use Blade Fragments for Partial Re-Renders (htmx/Turbo) +## Return Blade Fragments for Partial Rendering -A single view can return either the full page or just a fragment, keeping routing clean. +A route can return either a full view or a named fragment for clients such as htmx or Turbo. ```php return view('dashboard', compact('users')) ->fragmentIf($request->hasHeader('HX-Request'), 'user-list'); ``` -## Use `@aware` for Deeply Nested Component Props +## Share Parent Component Props with `@aware` -Avoids re-passing parent props through every level of nested components. \ No newline at end of file +Use `@aware` when a nested component needs a prop explicitly passed to an ancestor component. It does not expose an ancestor's default prop value unless that value was passed through the attribute bag. diff --git a/.claude/skills/laravel-best-practices/rules/caching.md b/.claude/skills/laravel-best-practices/rules/caching.md index eb3ef3e..cd2ffd6 100644 --- a/.claude/skills/laravel-best-practices/rules/caching.md +++ b/.claude/skills/laravel-best-practices/rules/caching.md @@ -1,10 +1,13 @@ # Caching Best Practices -## Use `Cache::remember()` Instead of Manual Get/Put +## Use `Cache::remember()` for Cache-Aside Reads -Atomic pattern prevents race conditions and removes boilerplate. +`Cache::remember()` implements a cache-aside read without a separate truthiness check. It does not prevent concurrent requests from computing the same missing value; use an atomic lock when duplicate computation must be prevented. + +The manual version below incorrectly treats valid falsy values, such as `false` or `0`, as cache misses. Incorrect: + ```php $val = Cache::get('stats'); if (! $val) { @@ -14,27 +17,42 @@ if (! $val) { ``` Correct: + ```php $val = Cache::remember('stats', 60, fn () => $this->computeStats()); ``` -## Use `Cache::flexible()` for Stale-While-Revalidate +## Consider `Cache::flexible()` for Stale-While-Revalidate + +For frequently read keys, `Cache::flexible()` can serve stale data during a defined stale period and register a deferred refresh. During an HTTP request, that refresh normally runs after the response; it is not a durable background job. Once the stale period has elapsed, the request recomputes the value synchronously. + +Synchronous expiration: + +```php +Cache::remember('users', 300, fn () => User::all()); +``` + +Stale-while-revalidate tradeoff: -On high-traffic keys, one user always gets a slow response when the cache expires. `flexible()` serves slightly stale data while refreshing in the background. +```php +Cache::flexible('users', [300, 600], fn () => User::all()); +``` -Incorrect: `Cache::remember('users', 300, fn () => User::all());` +This value is fresh for five minutes and may be served stale until ten minutes after it was cached. -Correct: `Cache::flexible('users', [300, 600], fn () => User::all());` — fresh for 5 min, stale-but-served up to 10 min, refreshes via deferred function. +## Use `Cache::memo()` to Avoid Redundant Hits Within an Execution -## Use `Cache::memo()` to Avoid Redundant Hits Within a Request +If the same cache key is read repeatedly during one request or job, `memo()` decorates a cache store and retains resolved values in memory for that execution. -If the same cache key is read multiple times per request (e.g., a service called from multiple places), `memo()` stores the resolved value in memory. +```php +$settings = Cache::memo()->get('settings'); +``` -`Cache::memo()->get('settings');` — 5 calls = 1 Redis round-trip instead of 5. +Repeated reads through the same memoized store avoid additional store lookups. Writes through the memoized store update or invalidate its in-memory values as appropriate. ## Use Cache Tags to Invalidate Related Groups -Without tags, invalidating a group of entries requires tracking every key. Tags let you flush atomically. Only works with `redis`, `memcached`, `dynamodb` — not `file` or `database`. +Tags group related entries for invalidation without tracking each key. Cache tags are not supported by the `file`, `dynamodb`, or `database` drivers; confirm support before choosing a store. ```php Cache::tags(['user-1'])->flush(); @@ -42,15 +60,27 @@ Cache::tags(['user-1'])->flush(); ## Use `Cache::add()` for Atomic Conditional Writes -`add()` only writes if the key does not exist — atomic, no race condition between checking and writing. +`add()` atomically writes a value only when the key does not already exist. + +Incorrect: + +```php +if (! Cache::has('lock')) { + Cache::put('lock', true, 10); +} +``` + +Correct: -Incorrect: `if (! Cache::has('lock')) { Cache::put('lock', true, 10); }` +```php +Cache::add('lock', true, 10); +``` -Correct: `Cache::add('lock', true, 10);` +Use `Cache::lock()` rather than an ordinary cache key when lock ownership and safe release are required. -## Use `once()` for Per-Request Memoization +## Use `once()` for In-Process Memoization -`once()` memoizes a function's return value for the lifetime of the object (or request for closures). Unlike `Cache::memo()`, it doesn't hit the cache store at all — pure in-memory. +`once()` memoizes a callback's return value for the current request or job. Calls made from an object instance are scoped to that instance. Unlike `Cache::memo()`, `once()` does not read from an external cache store. ```php public function roles(): Collection @@ -59,12 +89,12 @@ public function roles(): Collection } ``` -Multiple calls return the cached result without re-executing. Use `once()` for expensive computations called multiple times per request. Use `Cache::memo()` when you also want cross-request caching. +Repeated calls return the memoized result without rerunning the callback. Use `once()` for repeated computation within one execution. Use `Cache::memo()` to memoize access to an underlying store that can also persist values across executions. ## Configure Failover Cache Stores in Production -If Redis goes down, the app falls back to a secondary store automatically. +The failover driver tries each configured store in order when a store operation throws an exception. It does not consult later stores for an ordinary cache miss, and data is not replicated between stores. ```php 'failover' => ['driver' => 'failover', 'stores' => ['redis', 'database']], -``` \ No newline at end of file +``` diff --git a/.claude/skills/laravel-best-practices/rules/collections.md b/.claude/skills/laravel-best-practices/rules/collections.md index 14f683d..211fec1 100644 --- a/.claude/skills/laravel-best-practices/rules/collections.md +++ b/.claude/skills/laravel-best-practices/rules/collections.md @@ -2,43 +2,71 @@ ## Use Higher-Order Messages for Simple Operations -Incorrect: +Explicit closure: + ```php $users->each(function (User $user) { $user->markAsVip(); }); ``` -Correct: `$users->each->markAsVip();` +Concise equivalent: + +```php +$users->each->markAsVip(); +``` -Works with `each`, `map`, `sum`, `filter`, `reject`, `contains`, etc. +Higher-order messages are available for supported collection methods such as `each`, `map`, `filter`, and `sum`. Use an explicit closure when arguments or nontrivial logic would be clearer. -## Choose `cursor()` vs. `lazy()` Correctly +## Choose Between `cursor()` and `lazy()` -- `cursor()` — one model in memory, but cannot eager-load relationships (N+1 risk). -- `lazy()` — chunked pagination returning a flat LazyCollection, supports eager loading. +`cursor()` executes one query and hydrates models individually, but it cannot eager load relationships. The database driver's result buffering can still consume substantial memory for very large results. Use it for low-memory, attribute-only iteration when one long-running query is acceptable. -Incorrect: `User::with('roles')->cursor()` — eager loading silently ignored. +`lazy()` executes multiple chunked queries and returns a flat `LazyCollection`. It supports eager loading relationships for each chunk and avoids holding one database cursor open for the entire iteration. -Correct: `User::with('roles')->lazy()` for relationship access; `User::cursor()` for attribute-only work. +With relationships: + +```php +User::with('roles')->lazy()->each(function (User $user) { + // The roles for this chunk have been eager loaded. +}); +``` + +Without relationships: + +```php +User::cursor()->each(function (User $user) { + // Process model attributes. +}); +``` ## Use `lazyById()` When Updating Records While Iterating -`lazy()` uses offset pagination — updating records during iteration can skip or double-process. `lazyById()` uses `id > last_id`, safe against mutation. +`lazy()` uses offset pagination, so updates to columns that affect the query can shift rows and cause records to be skipped or processed twice. `lazyById()` paginates by a monotonic key and is safer when updating other columns during iteration. Do not change the pagination key itself while iterating. ## Use `toQuery()` for Bulk Operations on Collections -Avoids manual `whereIn` construction. +Use `toQuery()` to build a query from the models in an Eloquent collection instead of manually constructing a `whereIn` clause. + +Manual query: + +```php +User::whereIn('id', $users->modelKeys())->update(['active' => false]); +``` + +Collection query: -Incorrect: `User::whereIn('id', $users->pluck('id'))->update([...]);` +```php +$users->toQuery()->update(['active' => false]); +``` -Correct: `$users->toQuery()->update([...]);` +`toQuery()` requires a non-empty Eloquent collection whose models are of the same type. Like other bulk Eloquent updates, it does not dispatch per-model update events, so use it only when those events are not required. ## Use `#[CollectedBy]` for Custom Collection Classes -More declarative than overriding `newCollection()`. +The `#[CollectedBy]` attribute declares the custom collection class without requiring a `newCollection()` override. ```php #[CollectedBy(UserCollection::class)] class User extends Model {} -``` \ No newline at end of file +``` diff --git a/.claude/skills/laravel-best-practices/rules/config.md b/.claude/skills/laravel-best-practices/rules/config.md index 8fd8f53..82691c4 100644 --- a/.claude/skills/laravel-best-practices/rules/config.md +++ b/.claude/skills/laravel-best-practices/rules/config.md @@ -1,73 +1,85 @@ # Configuration Best Practices -## `env()` Only in Config Files +## Read Environment Variables in Configuration Files -Direct `env()` calls return `null` when config is cached. +Call `env()` only from configuration files. After configuration is cached, Laravel does not load the application's `.env` file, so application code should read configuration values through `config()`. Incorrect: + ```php $key = env('API_KEY'); ``` Correct: + ```php // config/services.php -'key' => env('API_KEY'), +return [ + 'key' => env('API_KEY'), +]; // Application code $key = config('services.key'); ``` -## Use Encrypted Env or External Secrets +## Protect Production Secrets -Never store production secrets in plain `.env` files in version control. +Do not commit plaintext production secrets. Laravel can encrypt an environment file so its encrypted form can be stored safely, while deployment platforms can supply secrets through their native secret stores. Incorrect: -```bash -# .env committed to repo or shared in Slack - -STRIPE_SECRET=sk_live_abc123 -AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI +```bash +# A plaintext .env file committed to the repository +STRIPE_SECRET= +AWS_SECRET_ACCESS_KEY= ``` -Correct: +Encrypted environment file: + ```bash php artisan env:encrypt --env=production --readable php artisan env:decrypt --env=production ``` -For cloud deployments, prefer the platform's native secret store (AWS Secrets Manager, Vault, etc.) and inject at runtime. +For hosted deployments, consider the platform's native secret store, such as AWS Secrets Manager or Vault, and inject secrets at runtime. ## Use `App::environment()` for Environment Checks Incorrect: + ```php if (env('APP_ENV') === 'production') { + // ... +} ``` Correct: + ```php if (app()->isProduction()) { -// or + // ... +} + if (App::environment('production')) { + // ... +} ``` -## Use Constants and Language Files +## Name Repeated Domain Values -Use class constants instead of hardcoded magic strings for model states, types, and statuses. +Use an enum or class constant when a domain value is repeated or represents a constrained set. A one-off string literal does not always need a named constant. ```php -// Incorrect +// Repeated literal return $this->type === 'normal'; -// Correct +// Named domain value return $this->type === self::TYPE_NORMAL; ``` -If the application already uses language files for localization, use `__()` for user-facing strings too. Do not introduce language files purely for English-only apps — simple string literals are fine there. +If the application supports localization, put user-facing strings in language files and retrieve them with `__()`. Simple literals are reasonable for applications that intentionally do not support multiple languages. ```php -// Only when lang files already exist in the project +// In a localized application return back()->with('message', __('app.article_added')); -``` \ No newline at end of file +``` diff --git a/.claude/skills/laravel-best-practices/rules/db-performance.md b/.claude/skills/laravel-best-practices/rules/db-performance.md index 8fb7193..3f33977 100644 --- a/.claude/skills/laravel-best-practices/rules/db-performance.md +++ b/.claude/skills/laravel-best-practices/rules/db-performance.md @@ -1,10 +1,11 @@ # Database Performance Best Practices -## Always Eager Load Relationships +## Eager Load Relationships Before Iterating -Lazy loading causes N+1 query problems — one query per loop iteration. Always use `with()` to load relationships upfront. +When a relationship will be accessed for many models, eager load it with `with()` to avoid running one initial query plus one relationship query per model, commonly called an N+1 query pattern. Lazy loading is reasonable when the relationship may not be needed or only one model is involved. + +Lazy-loaded version: -Incorrect (N+1 — executes 1 + N queries): ```php $posts = Post::all(); foreach ($posts as $post) { @@ -12,7 +13,8 @@ foreach ($posts as $post) { } ``` -Correct (2 queries total): +Eager-loaded version: + ```php $posts = Post::with('author')->get(); foreach ($posts as $post) { @@ -20,7 +22,7 @@ foreach ($posts as $post) { } ``` -Constrain eager loads to select only needed columns (always include the foreign key): +Constrain eager loads when large columns are unnecessary. Include the related model's primary key and every column Eloquent needs to match the relationship. In this example, `users.id` and `posts.user_id` match posts to users, while selecting `posts.id` preserves each related model's primary key: ```php $users = User::with(['posts' => function ($query) { @@ -42,31 +44,34 @@ public function boot(): void } ``` -Throws `LazyLoadingViolationException` when a relationship is accessed without being eager-loaded. +By default, accessing an unloaded relationship then throws a `LazyLoadingViolationException`. Applications can customize violation handling with `handleLazyLoadingViolationUsing()`. ## Select Only Needed Columns -Avoid `SELECT *` — especially when tables have large text or JSON columns. +Select only the columns the operation needs when omitting large text, binary, or JSON columns provides a meaningful benefit. + +All columns: -Incorrect: ```php $posts = Post::with('author')->get(); ``` -Correct: +Selected columns: + ```php $posts = Post::select('id', 'title', 'user_id', 'created_at') ->with(['author:id,name,avatar']) ->get(); ``` -When selecting columns on eager-loaded relationships, always include the foreign key column or the relationship won't match. +When limiting selected columns, retain every key Eloquent needs for matching. A `belongsTo` relationship needs its foreign key on the parent query and the owner's key on the related query. A `hasMany` relationship needs the parent's local key and the related model's foreign key. -## Chunk Large Datasets +## Process Large Data Sets Incrementally -Never load thousands of records at once. Use chunking for batch processing. +Use chunking or lazy iteration when loading an entire result set would exceed the application's practical memory budget. + +Loads the complete result set: -Incorrect: ```php $users = User::all(); foreach ($users as $user) { @@ -74,7 +79,8 @@ foreach ($users as $user) { } ``` -Correct: +Processes bounded chunks: + ```php User::where('subscribed', true)->chunk(200, function ($users) { foreach ($users as $user) { @@ -83,7 +89,7 @@ User::where('subscribed', true)->chunk(200, function ($users) { }); ``` -Use `chunkById()` when modifying records during iteration — standard `chunk()` uses OFFSET which shifts when rows change: +Use `chunkById()` when updates can change which rows match the query. Standard `chunk()` uses offset pagination, whose result positions can shift as rows change: ```php User::where('active', false)->chunkById(200, function ($users) { @@ -91,11 +97,14 @@ User::where('active', false)->chunkById(200, function ($users) { }); ``` -## Add Database Indexes +For read-only, attribute-only iteration, `cursor()` hydrates models individually from one query, although some database drivers still buffer raw results. Use `lazy()` when relationships must be eager loaded in chunks, and use `lazyById()` or `chunkById()` when updates can affect query membership. See the collection rules for detailed tradeoffs. + +## Add Indexes for Measured Query Patterns -Index columns that appear in `WHERE`, `ORDER BY`, `JOIN`, and `GROUP BY` clauses. +Design indexes around frequent, performance-sensitive query patterns. A column's presence in `WHERE`, `ORDER BY`, `JOIN`, or `GROUP BY` does not by itself justify an index; selectivity, write cost, existing indexes, and the database query plan all matter. + +Schema without an application-specific query index: -Incorrect: ```php Schema::create('orders', function (Blueprint $table) { $table->id(); @@ -105,24 +114,26 @@ Schema::create('orders', function (Blueprint $table) { }); ``` -Correct: +Schema optimized for `WHERE status = ? ORDER BY created_at`: + ```php Schema::create('orders', function (Blueprint $table) { $table->id(); - $table->foreignId('user_id')->index()->constrained(); - $table->string('status')->index(); + $table->foreignId('user_id')->constrained(); + $table->string('status'); $table->timestamps(); $table->index(['status', 'created_at']); }); ``` -Add composite indexes for common query patterns (e.g., `WHERE status = ? ORDER BY created_at`). +Confirm composite index column order and effectiveness with production-like data and the database's query-plan tools. Also check whether the database already created an index to support a foreign key before adding another one. + +## Count Relationships Without Loading Them -## Use `withCount()` for Counting Relations +Use `withCount()` when only relationship counts are needed; loading and hydrating every related model wastes memory. -Never load entire collections just to count them. +Loads related models: -Incorrect: ```php $posts = Post::all(); foreach ($posts as $post) { @@ -130,7 +141,8 @@ foreach ($posts as $post) { } ``` -Correct: +Selects relationship counts: + ```php $posts = Post::withCount('comments')->get(); foreach ($posts as $post) { @@ -149,39 +161,24 @@ $posts = Post::withCount([ ])->get(); ``` -## Use `cursor()` for Memory-Efficient Iteration +## Keep Queries Out of Blade Templates -For read-only iteration over large result sets, `cursor()` loads one record at a time via a PHP generator. +Prepare data before rendering a Blade template, such as in a controller, query service, or view composer. This keeps query behavior visible and testable. -Incorrect: -```php -$users = User::where('active', true)->get(); -``` - -Correct: -```php -foreach (User::where('active', true)->cursor() as $user) { - ProcessUser::dispatch($user->id); -} -``` +Query in the template: -Use `cursor()` for read-only iteration. Use `chunk()` / `chunkById()` when modifying records. - -## No Queries in Blade Templates - -Never execute queries in Blade templates. Pass data from controllers. - -Incorrect: ```blade @foreach (User::all() as $user) {{ $user->profile->name }} @endforeach ``` -Correct: +Data prepared before rendering: + ```php // Controller $users = User::with('profile')->get(); + return view('users.index', compact('users')); ``` @@ -189,4 +186,4 @@ return view('users.index', compact('users')); @foreach ($users as $user) {{ $user->profile->name }} @endforeach -``` \ No newline at end of file +``` diff --git a/.claude/skills/laravel-best-practices/rules/eloquent.md b/.claude/skills/laravel-best-practices/rules/eloquent.md index 09cd66a..5a89510 100644 --- a/.claude/skills/laravel-best-practices/rules/eloquent.md +++ b/.claude/skills/laravel-best-practices/rules/eloquent.md @@ -1,8 +1,8 @@ # Eloquent Best Practices -## Use Correct Relationship Types +## Define Precise Relationship Types -Use `hasMany`, `belongsTo`, `morphMany`, etc. with proper return type hints. +Define the relationship that matches the database association, and declare its concrete return type. ```php public function comments(): HasMany @@ -20,7 +20,8 @@ public function author(): BelongsTo Extract reusable query constraints into local scopes to avoid duplication. -Incorrect: +Duplicated constraints: + ```php $active = User::where('verified', true)->whereNotNull('activated_at')->get(); $articles = Article::whereHas('user', function ($q) { @@ -28,9 +29,11 @@ $articles = Article::whereHas('user', function ($q) { })->get(); ``` -Correct: +Reusable local scope: + ```php -public function scopeActive(Builder $query): Builder +#[Scope] +protected function active(Builder $query): Builder { return $query->where('verified', true)->whereNotNull('activated_at'); } @@ -44,7 +47,8 @@ $articles = Article::whereHas('user', fn ($q) => $q->active())->get(); Global scopes silently modify every query on the model, making debugging difficult. Prefer local scopes and reserve global scopes for truly universal constraints like soft deletes or multi-tenancy. -Incorrect (global scope for a conditional filter): +Global scope tradeoff: + ```php class PublishedScope implements Scope { @@ -53,12 +57,15 @@ class PublishedScope implements Scope $builder->where('published', true); } } -// Now admin panels, reports, and background jobs all silently skip drafts + +// Admin panels, reports, and jobs now omit drafts unless the scope is removed. ``` -Correct (local scope you opt into): +Explicit local scope: + ```php -public function scopePublished(Builder $query): Builder +#[Scope] +protected function published(Builder $query): Builder { return $query->where('published', true); } @@ -82,16 +89,18 @@ protected function casts(): array } ``` -## Cast Date Columns Properly +## Cast Date and Time Attributes + +Cast a date or timestamp attribute when application code should treat it as a Carbon instance. Eloquent already casts the conventional `created_at` and `updated_at` timestamps. -Always cast date columns. Use Carbon instances in templates instead of formatting strings manually. +Manual parsing in the template: -Incorrect: ```blade -{{ Carbon::createFromFormat('Y-d-m H-i', $order->ordered_at)->toDateString() }} +{{ Carbon::parse($order->ordered_at)->toDateString() }} ``` -Correct: +Model cast: + ```php protected function casts(): array { @@ -108,24 +117,27 @@ protected function casts(): array ## Use `whereBelongsTo()` for Relationship Queries -Cleaner than manually specifying foreign keys. +`whereBelongsTo()` expresses the relationship constraint without manually specifying its foreign key. + +Foreign key constraint: -Incorrect: ```php Post::where('user_id', $user->id)->get(); ``` -Correct: +Relationship-aware constraint: + ```php Post::whereBelongsTo($user)->get(); Post::whereBelongsTo($user, 'author')->get(); ``` -## Avoid Hardcoded Table Names in Queries +## Keep Application Queries Model-Aware -Never use string literals for table names in raw queries, joins, or subqueries. Hardcoded table names make it impossible to find all places a model is used and break refactoring (e.g., renaming a table requires hunting through every raw string). +Prefer Eloquent models and relationships for model-backed application queries. They preserve casts, scopes, and model table configuration. The query builder and raw SQL legitimately require table names, so use them when their lower-level behavior is intentional. + +Lower-level alternatives: -Incorrect: ```php DB::table('users')->where('active', true)->get(); @@ -134,15 +146,13 @@ $query->join('companies', 'companies.id', '=', 'users.company_id'); DB::select('SELECT * FROM orders WHERE status = ?', ['pending']); ``` -Correct — reference the model's table: -```php -DB::table((new User)->getTable())->where('active', true)->get(); +Model-aware queries: -// Even better — use Eloquent or the query builder instead of raw SQL +```php User::where('active', true)->get(); Order::where('status', 'pending')->get(); ``` -Prefer Eloquent queries and relationships over `DB::table()` whenever possible — they already reference the model's table. When `DB::table()` or raw joins are unavoidable, always use `(new Model)->getTable()` to keep the reference traceable. +When a query builder operation should follow a model's configured table name, use `(new User)->getTable()`. For complex joins or raw SQL, explicit table names may be clearer; keep those references covered by tests when schema changes are possible. -**Exception — migrations:** In migrations, hardcoded table names via `DB::table('settings')` are acceptable and preferred. Models change over time but migrations are frozen snapshots — referencing a model that is later renamed or deleted would break the migration. \ No newline at end of file +In migrations, use explicit table names rather than application models. Migrations are historical snapshots, while models and their scopes can change after a migration is deployed. diff --git a/.claude/skills/laravel-best-practices/rules/error-handling.md b/.claude/skills/laravel-best-practices/rules/error-handling.md index bb8e7a3..afcdf4a 100644 --- a/.claude/skills/laravel-best-practices/rules/error-handling.md +++ b/.claude/skills/laravel-best-practices/rules/error-handling.md @@ -1,15 +1,18 @@ # Error Handling Best Practices -## Exception Reporting and Rendering +## Choose Where to Report and Render Exceptions -There are two valid approaches — choose one and apply it consistently across the project. +Laravel supports exception-specific methods and centralized handler callbacks. Follow the pattern already established by the project. -**Co-location on the exception class** — keeps behavior alongside the exception definition, easier to find: +Exception methods keep behavior beside the exception definition: ```php class InvalidOrderException extends Exception { - public function report(): void { /* custom reporting */ } + public function report(): void + { + // Send the exception to a custom reporter. + } public function render(Request $request): Response { @@ -18,38 +21,40 @@ class InvalidOrderException extends Exception } ``` -**Centralized in `bootstrap/app.php`** — all exception handling in one place, easier to see the full picture: +Centralized callbacks in `bootstrap/app.php` keep the application's exception policy together: ```php ->withExceptions(function (Exceptions $exceptions) { - $exceptions->report(function (InvalidOrderException $e) { /* ... */ }); + $exceptions->report(function (InvalidOrderException $e) { + // Send the exception to a custom reporter. + }); $exceptions->render(function (InvalidOrderException $e, Request $request) { return response()->view('errors.invalid-order', status: 422); }); }) ``` -Check the existing codebase and follow whichever pattern is already established. +An exception's `report()` method suppresses Laravel's default reporting unless it returns `false`. A report callback allows default reporting unless it returns `false` or is chained with `stop()`. Use `ShouldntReport` or `dontReport()` when the handler should not report an exception at all. By contrast, returning `false` from a `render()` method or render callback defers to Laravel's default rendering. -## Use `ShouldntReport` for Exceptions That Should Never Log +## Mark Exceptions the Handler Should Not Report -More discoverable than listing classes in `dontReport()`. +Implementing `ShouldntReport` prevents Laravel's exception handler from reporting that exception type and keeps the policy visible on the class. It does not prevent application code from logging the exception explicitly. ```php class PodcastProcessingException extends Exception implements ShouldntReport {} ``` -## Throttle High-Volume Exceptions +## Throttle High-Volume Exception Reports -A single failing integration can flood error tracking. Use `throttle()` to rate-limit per exception type. +A failing integration can flood logs or error tracking. Configure `throttle()` with a `Lottery` or `Limit` result to sample or rate-limit matching exception reports. Choose keys deliberately when separate exception classes, tenants, or integrations need independent limits. -## Enable `dontReportDuplicates()` +## Prevent Duplicate Reports of One Exception Instance -Prevents the same exception instance from being logged multiple times when `report($e)` is called in multiple catch blocks. +Enable `dontReportDuplicates()` when the same exception object may pass through multiple `report($exception)` calls. It deduplicates by object identity, not by exception class or message. -## Force JSON Error Rendering for API Routes +## Define JSON Rendering for API Routes -Laravel auto-detects `Accept: application/json` but API clients may not set it. Explicitly declare JSON rendering for API routes. +Laravel normally uses request content negotiation to decide whether to render an exception as JSON. If the application's API contract requires JSON regardless of the `Accept` header, define that policy explicitly for the relevant routes. ```php $exceptions->shouldRenderJsonWhen(function (Request $request, Throwable $e) { @@ -59,7 +64,7 @@ $exceptions->shouldRenderJsonWhen(function (Request $request, Throwable $e) { ## Add Context to Exception Classes -Attach structured data to exceptions at the source via a `context()` method — Laravel includes it automatically in the log entry. +Attach structured data to an exception through `context()`. Laravel merges that data into the exception's log context when the handler reports it. ```php class InvalidOrderException extends Exception @@ -69,4 +74,4 @@ class InvalidOrderException extends Exception return ['order_id' => $this->orderId]; } } -``` \ No newline at end of file +``` diff --git a/.claude/skills/laravel-best-practices/rules/events-notifications.md b/.claude/skills/laravel-best-practices/rules/events-notifications.md index bc43f19..a8cce31 100644 --- a/.claude/skills/laravel-best-practices/rules/events-notifications.md +++ b/.claude/skills/laravel-best-practices/rules/events-notifications.md @@ -1,24 +1,24 @@ -# Events & Notifications Best Practices +# Events and Notifications Best Practices ## Rely on Event Discovery -Laravel auto-discovers listeners by reading `handle(EventType $event)` type-hints. No manual registration needed in `AppServiceProvider`. +Laravel discovers listeners in the configured listener directories by inspecting type-hinted event arguments on `handle()` or `__invoke()` methods. Register listeners manually only when discovery is disabled, the listener is outside those directories, or explicit registration is clearer. -## Run `event:cache` in Production Deploy +## Cache Event Discovery During Production Deployment -Event discovery scans the filesystem per-request in dev. Cache it in production: `php artisan optimize` or `php artisan event:cache`. +Cache discovered listeners during production deployment with `php artisan optimize` or `php artisan event:cache`. Rebuild the cache whenever listener definitions change. ## Use `ShouldDispatchAfterCommit` Inside Transactions -Without it, a queued listener may process before the DB transaction commits, reading data that doesn't exist yet. +When an event is dispatched inside a database transaction, `ShouldDispatchAfterCommit` delays dispatch until all open database transactions commit. If a transaction rolls back, Laravel discards the event. This affects synchronous and queued listeners; it is not limited to queue timing. ```php class OrderShipped implements ShouldDispatchAfterCommit {} ``` -## Always Queue Notifications +## Queue Slow Notifications -Notifications often hit external APIs (email, SMS, Slack). Without `ShouldQueue`, they block the HTTP response. +Queue notifications that call external services, such as email, text messaging, or Slack, when they do not need to complete before the response. Keep a notification synchronous when immediate completion or failure feedback is part of the operation. ```php class InvoicePaid extends Notification implements ShouldQueue @@ -27,13 +27,17 @@ class InvoicePaid extends Notification implements ShouldQueue } ``` -## Use `afterCommit()` on Notifications in Transactions +## Dispatch Queued Notifications After Commit -Same race condition as events — the queued notification job may run before the transaction commits. +A queued notification sent inside a database transaction can run before the transaction commits. Call `afterCommit()` on the queued notification, or enable the queue connection's `after_commit` option, when its delivery depends on committed data. This setting has no scheduling effect on a synchronous notification. + +```php +$user->notify((new InvoicePaid($invoice))->afterCommit()); +``` ## Route Notification Channels to Dedicated Queues -Mail and database notifications have different priorities. Use `viaQueues()` to route them to separate queues. +Different notification channels can have different latency and priority requirements. Implement `viaQueues()` when channels should use separate queues. ## Use On-Demand Notifications for Non-User Recipients @@ -45,4 +49,4 @@ Notification::route('mail', 'admin@example.com')->notify(new SystemAlert()); ## Implement `HasLocalePreference` on Notifiable Models -Laravel automatically uses the user's preferred locale for all notifications and mailables — no per-call `locale()` needed. \ No newline at end of file +Implement `HasLocalePreference::preferredLocale()` on a notifiable model when notifications and mailables should use the recipient's locale. Laravel also preserves that locale for queued delivery. An explicit `locale()` call can still override the preference for an individual notification. diff --git a/.claude/skills/laravel-best-practices/rules/http-client.md b/.claude/skills/laravel-best-practices/rules/http-client.md index 0a7876e..cc8fdd6 100644 --- a/.claude/skills/laravel-best-practices/rules/http-client.md +++ b/.claude/skills/laravel-best-practices/rules/http-client.md @@ -1,86 +1,100 @@ # HTTP Client Best Practices -## Always Set Explicit Timeouts +## Set Explicit Timeouts -The default timeout is 30 seconds — too long for most API calls. Always set explicit `timeout` and `connectTimeout` to fail fast. +Laravel's HTTP client has a 30-second response timeout by default. Choose response and connection timeouts that fit the service and the calling request or job. Remember that retries can multiply the total elapsed time. + +Less resilient: -Incorrect: ```php $response = Http::get('https://api.example.com/users'); ``` -Correct: +Preferred: + ```php -$response = Http::timeout(5) - ->connectTimeout(3) +$response = Http::connectTimeout(3) + ->timeout(5) ->get('https://api.example.com/users'); ``` -For service-specific clients, define timeouts in a macro: +Define shared settings in a macro or a dedicated client: ```php Http::macro('github', function () { return Http::baseUrl('https://api.github.com') - ->timeout(10) ->connectTimeout(3) + ->timeout(10) ->withToken(config('services.github.token')); }); $response = Http::github()->get('/repos/laravel/framework'); ``` -## Use Retry with Backoff for External APIs +## Retry Only Safe Operations -External APIs have transient failures. Use `retry()` with increasing delays. +Retry transient connection failures, rate-limit responses, and server errors with an appropriate delay. Retry idempotent requests such as `GET` when the operation can safely run more than once. Retry a state-changing request only when the remote API supports an idempotency key or provides equivalent duplicate protection. -Incorrect: -```php -$response = Http::post('https://api.stripe.com/v1/charges', $data); +Unsafe without an idempotency guarantee: -if ($response->failed()) { - throw new PaymentFailedException('Charge failed'); -} +```php +$response = Http::retry([100, 500, 1000]) + ->post('https://api.example.com/v1/charges', $data); ``` -Correct: +Safe for an idempotent request: + ```php -$response = Http::retry([100, 500, 1000]) +$response = Http::connectTimeout(3) ->timeout(10) - ->post('https://api.stripe.com/v1/charges', $data); + ->retry([100, 500, 1000], 0, function (Throwable $exception) { + return $exception instanceof ConnectionException + || ($exception instanceof RequestException + && ($exception->response->serverError() || $exception->response->status() === 429)); + }) + ->get('https://api.example.com/data'); ``` -Only retry on specific errors: +For a supported state-changing API, send a stable idempotency key for every attempt: ```php -$response = Http::retry(3, 100, function (Exception $exception, PendingRequest $request) { - return $exception instanceof ConnectionException - || ($exception instanceof RequestException && $exception->response->serverError()); -})->post('https://api.example.com/data'); +$response = Http::withHeaders(['Idempotency-Key' => $paymentAttempt->uuid]) + ->connectTimeout(3) + ->timeout(10) + ->retry([100, 500, 1000], 0, function (Throwable $exception) { + return $exception instanceof ConnectionException + || ($exception instanceof RequestException + && ($exception->response->serverError() || $exception->response->status() === 429)); + }) + ->post('https://api.example.com/v1/charges', $data); ``` ## Handle Errors Explicitly -The HTTP Client does not throw on 4xx/5xx by default. Always check status or use `throw()`. +The HTTP client returns responses for `4xx` and `5xx` status codes instead of throwing by default. Inspect the expected statuses or call `throw()` before consuming a success payload. + +Unsafe when a success payload is expected: -Incorrect: ```php -$response = Http::get('https://api.example.com/users/1'); -$user = $response->json(); // Could be an error body +$user = Http::get('https://api.example.com/users/1')->json(); ``` -Correct: +Preferred: + ```php -$response = Http::timeout(5) +$user = Http::connectTimeout(3) + ->timeout(5) ->get('https://api.example.com/users/1') - ->throw(); - -$user = $response->json(); + ->throw() + ->json(); ``` -For graceful degradation: +Handle expected alternatives explicitly when graceful degradation is required: ```php -$response = Http::get('https://api.example.com/users/1'); +$response = Http::connectTimeout(3) + ->timeout(5) + ->get('https://api.example.com/users/1'); if ($response->successful()) { return $response->json(); @@ -93,46 +107,30 @@ if ($response->notFound()) { $response->throw(); ``` -## Use Request Pooling for Concurrent Requests - -When making multiple independent API calls, use `Http::pool()` instead of sequential calls. +## Pool Independent Requests -Incorrect: -```php -$users = Http::get('https://api.example.com/users')->json(); -$posts = Http::get('https://api.example.com/posts')->json(); -$comments = Http::get('https://api.example.com/comments')->json(); -``` +Use `Http::pool()` when several independent requests can run concurrently. Pooling changes execution time, not error handling; inspect or throw for each response as needed. -Correct: ```php use Illuminate\Http\Client\Pool; $responses = Http::pool(fn (Pool $pool) => [ - $pool->as('users')->get('https://api.example.com/users'), - $pool->as('posts')->get('https://api.example.com/posts'), - $pool->as('comments')->get('https://api.example.com/comments'), + $pool->as('users')->connectTimeout(3)->timeout(5) + ->get('https://api.example.com/users'), + $pool->as('posts')->connectTimeout(3)->timeout(5) + ->get('https://api.example.com/posts'), ]); -$users = $responses['users']->json(); -$posts = $responses['posts']->json(); +$users = $responses['users']->throw()->json(); +$posts = $responses['posts']->throw()->json(); ``` -## Fake HTTP Calls in Tests - -Never make real HTTP requests in tests. Use `Http::fake()` and `preventStrayRequests()`. +## Fake HTTP Requests in Tests -Incorrect: -```php -it('syncs user from API', function () { - $service = new UserSyncService; - $service->sync(1); // Hits the real API -}); -``` +Use `Http::fake()` for external integrations, and use `Http::preventStrayRequests()` when an unexpected real request should fail the test. Also test timeouts, connection failures, and error responses that the application handles. -Correct: ```php -it('syncs user from API', function () { +it('syncs a user from the API', function () { Http::preventStrayRequests(); Http::fake([ @@ -142,19 +140,18 @@ it('syncs user from API', function () { ]), ]); - $service = new UserSyncService; - $service->sync(1); + (new UserSyncService)->sync(1); - Http::assertSent(function (Request $request) { - return $request->url() === 'https://api.example.com/users/1'; - }); + Http::assertSent(fn (Request $request) => + $request->url() === 'https://api.example.com/users/1' + ); }); ``` -Test failure scenarios too: +For example, fake a connection failure when testing the integration's failure path: ```php Http::fake([ 'api.example.com/*' => Http::failedConnection(), ]); -``` \ No newline at end of file +``` diff --git a/.claude/skills/laravel-best-practices/rules/mail.md b/.claude/skills/laravel-best-practices/rules/mail.md index c7f6796..f631043 100644 --- a/.claude/skills/laravel-best-practices/rules/mail.md +++ b/.claude/skills/laravel-best-practices/rules/mail.md @@ -1,27 +1,54 @@ # Mail Best Practices -## Implement `ShouldQueue` on the Mailable Class +## Queue Slow Mail Delivery -Makes queueing the default regardless of how the mailable is dispatched. No need to remember `Mail::queue()` at every call site — `Mail::send()` also queues it. +Implement `ShouldQueue` on a mailable when delivery should normally happen in the background. Laravel queues that mailable even when the call site uses `Mail::send()`. -## Use `afterCommit()` on Mailables Inside Transactions +```php +class OrderShipped extends Mailable implements ShouldQueue +{ + use Queueable, SerializesModels; +} +``` -A queued mailable dispatched inside a transaction may process before the commit. Use `$this->afterCommit()` in the constructor. +Keep mail synchronous when the caller must know immediately whether delivery was accepted, or when no queue worker is available. -## Use `assertQueued()` Not `assertSent()` for Queued Mailables +## Dispatch Queued Mail After Commit -`Mail::assertSent()` only catches synchronous mail. Queued mailables silently pass `assertSent`, giving false confidence. +A queued mailable dispatched during a database transaction can be processed before the transaction commits. Call `afterCommit()` on the mailable, or enable the queue connection's `after_commit` option, when the mail depends on committed records. -Incorrect: `Mail::assertSent(OrderShipped::class);` when mailable implements `ShouldQueue`. +```php +Mail::to($user)->send( + (new OrderShipped($order))->afterCommit() +); +``` -Correct: `Mail::assertQueued(OrderShipped::class);` +If the transaction rolls back, an after-commit mailable is not dispatched. This setting affects queued mail only; it does not defer synchronous delivery. -## Use Markdown Mailables for Transactional Emails +## Assert the Delivery Mode -Markdown mailables auto-generate both HTML and plain-text versions, use responsive components, and allow global style customization. Generate with `--markdown` flag. +Use `Mail::assertQueued()` for queued mailables and `Mail::assertSent()` for synchronously sent mailables. -## Separate Content Tests from Sending Tests +Incorrect for a mailable that implements `ShouldQueue`: -Content tests: instantiate the mailable directly, call `assertSeeInHtml()`. -Sending tests: use `Mail::fake()` and `assertSent()`/`assertQueued()`. -Don't mix them — it conflates concerns and makes tests brittle. \ No newline at end of file +```php +Mail::assertSent(OrderShipped::class); +``` + +Correct: + +```php +Mail::assertQueued(OrderShipped::class); +``` + +## Use Markdown Mailables When They Fit + +Markdown mailables render HTML and plain-text versions from Laravel's mail components and support publishable themes. They are useful for conventional transactional messages, but a custom HTML and text pair may be more appropriate for a specialized design. + +```bash +php artisan make:mail OrderShipped --markdown=mail.orders.shipped +``` + +## Separate Content and Delivery Tests + +Test rendered content by instantiating the mailable and using assertions such as `assertSeeInHtml()` and `assertSeeInText()`. Test delivery separately with `Mail::fake()` and `assertSent()` or `assertQueued()` so failures identify the affected behavior. diff --git a/.claude/skills/laravel-best-practices/rules/migrations.md b/.claude/skills/laravel-best-practices/rules/migrations.md index de25aa3..3345402 100644 --- a/.claude/skills/laravel-best-practices/rules/migrations.md +++ b/.claude/skills/laravel-best-practices/rules/migrations.md @@ -2,76 +2,51 @@ ## Generate Migrations with Artisan -Always use `php artisan make:migration` for consistent naming and timestamps. +Use `php artisan make:migration` to generate the timestamped filename and migration structure. -Incorrect (manually created file): -```php -// database/migrations/posts_migration.php ← wrong naming, no timestamp -``` - -Correct (Artisan-generated): ```bash php artisan make:migration create_posts_table php artisan make:migration add_slug_to_posts_table ``` -## Use `constrained()` for Foreign Keys +## Define Foreign-Key Constraints Deliberately -Automatic naming and referential integrity. +Use `constrained()` when its naming conventions and default actions match the relationship. Specify the table or delete behavior when they do not. ```php $table->foreignId('user_id')->constrained()->cascadeOnDelete(); - -// Non-standard names $table->foreignId('author_id')->constrained('users'); ``` -## Never Modify Deployed Migrations +Do not add a duplicate single-column index without checking the database driver's treatment of foreign-key indexes and the indexes already created by the migration. -Once a migration has run in production, treat it as immutable. Create a new migration to change the table. +## Treat Deployed Migrations as Immutable -Incorrect (editing a deployed migration): -```php -// 2024_01_01_create_posts_table.php — already in production -$table->string('slug')->unique(); // ← added after deployment -``` +After a migration has run in a shared or production environment, create a new migration for subsequent changes. Editing the old file makes fresh installations differ from upgraded installations. -Correct (new migration to alter): -```php -// 2024_03_15_add_slug_to_posts_table.php -Schema::table('posts', function (Blueprint $table) { - $table->string('slug')->unique()->after('title'); -}); -``` +For a local migration that has not been shared or deployed, editing and rerunning it may be simpler. -## Add Indexes in the Migration +## Design Indexes for Real Queries -Add indexes when creating the table, not as an afterthought. Columns used in `WHERE`, `ORDER BY`, and `JOIN` clauses need indexes. +Add indexes based on query patterns, selectivity, write cost, and the database's ability to use composite indexes. A column appearing in `WHERE`, `ORDER BY`, or `JOIN` does not automatically need its own index. -Incorrect: -```php -Schema::create('orders', function (Blueprint $table) { - $table->id(); - $table->foreignId('user_id')->constrained(); - $table->string('status'); - $table->timestamps(); -}); -``` +Declare each selected index in the schema migration that creates or changes the relevant table. Confirm important indexes with representative data and the database's query plan, and avoid redundant indexes whose leading columns duplicate an existing index without serving a distinct query. See the database performance and advanced query rules for index selection and column-order guidance. + +## Stage Changes That Affect Existing Rows + +Adding a required or unique column to a populated table often needs multiple deployment-safe steps. Add a nullable column, deploy code that can handle both states, backfill existing rows in bounded chunks, then add the required constraint or index after the data is valid. + +Do not assume this migration is safe on a populated table: -Correct: ```php -Schema::create('orders', function (Blueprint $table) { - $table->id(); - $table->foreignId('user_id')->constrained()->index(); - $table->string('status')->index(); - $table->timestamp('shipped_at')->nullable()->index(); - $table->timestamps(); -}); +$table->string('slug')->unique(); ``` -## Mirror Defaults in Model `$attributes` +Large backfills are usually better implemented as an observable, restartable command or job than inside a schema migration. Small deterministic data changes may be reasonable in a migration when their locking, transaction, and deployment behavior is understood. + +## Mirror Defaults Only When Unsaved Models Need Them -When a column has a database default, mirror it in the model so new instances have correct values before saving. +A database default is applied when a row is inserted, not when a model is instantiated. Mirror the value in the model's `$attributes` only when application code must observe that default before persistence, and keep both definitions synchronized. ```php // Migration @@ -83,39 +58,10 @@ protected $attributes = [ ]; ``` -## Write Reversible `down()` Methods by Default - -Implement `down()` for schema changes that can be safely reversed so `migrate:rollback` works in CI and failed deployments. - -```php -public function down(): void -{ - Schema::table('posts', function (Blueprint $table) { - $table->dropColumn('slug'); - }); -} -``` +## Make Rollbacks Honest -For intentionally irreversible migrations (e.g., destructive data backfills), leave a clear comment and require a forward fix migration instead of pretending rollback is supported. +Implement `down()` when the change can be safely reversed. A rollback that drops populated columns or cannot restore transformed data is destructive even if it is syntactically reversible; document that limitation and prefer a forward-fix migration in production. ## Keep Migrations Focused -One concern per migration. Never mix DDL (schema changes) and DML (data manipulation). - -Incorrect (partial failure creates unrecoverable state): -```php -public function up(): void -{ - Schema::create('settings', function (Blueprint $table) { ... }); - DB::table('settings')->insert(['key' => 'version', 'value' => '1.0']); -} -``` - -Correct (separate migrations): -```php -// Migration 1: create_settings_table -Schema::create('settings', function (Blueprint $table) { ... }); - -// Migration 2: seed_default_settings -DB::table('settings')->insert(['key' => 'version', 'value' => '1.0']); -``` \ No newline at end of file +Keep each migration small enough to reason about, deploy, and reverse. Separate long-running backfills from schema changes when doing so reduces locks and supports phased deployment, but do not split related operations merely to enforce a blanket separation between data definition and data manipulation. diff --git a/.claude/skills/laravel-best-practices/rules/queue-jobs.md b/.claude/skills/laravel-best-practices/rules/queue-jobs.md index d4575aa..011828a 100644 --- a/.claude/skills/laravel-best-practices/rules/queue-jobs.md +++ b/.claude/skills/laravel-best-practices/rules/queue-jobs.md @@ -1,82 +1,82 @@ -# Queue & Job Best Practices +# Queue and Job Best Practices -## Set `retry_after` Greater Than `timeout` +## Keep Reservation Time Longer Than Execution Time -If `retry_after` is shorter than the job's `timeout`, the queue worker re-dispatches the job while it's still running, causing duplicate execution. +For queue drivers that use Laravel's `retry_after` setting, configure it to exceed the longest worker or job timeout by a safety margin. When a reservation expires, another worker can reserve the same job while the first process is still running. Keep the worker's `--timeout` several seconds shorter than `retry_after`. -Incorrect (`retry_after` ≤ `timeout`): ```php -class ProcessReport implements ShouldQueue -{ - public $timeout = 120; -} +// Job +public $timeout = 120; -// config/queue.php — retry_after: 90 ← job retried while still running! +// config/queue.php for the connection +'retry_after' => 150, ``` -Correct (`retry_after` > `timeout`): -```php -class ProcessReport implements ShouldQueue -{ - public $timeout = 120; -} +Amazon Simple Queue Service uses its visibility timeout instead of Laravel's `retry_after`; configure that timeout at the queue level. Because workers can also stop after side effects but before acknowledging a job, make important jobs idempotent even with correct timeout settings. -// config/queue.php — retry_after: 180 ← safely longer than any job timeout -``` - -## Use Exponential Backoff +## Back Off Transient Failures -Use progressively longer delays between retries to avoid hammering failing services. +Use progressively longer delays when a dependency needs time to recover. Do not retry permanent validation or business-rule failures. -Incorrect (fixed retry interval): ```php class SyncWithStripe implements ShouldQueue { - public $tries = 3; - // Default: retries immediately, overwhelming the API -} -``` + public $tries = 4; -Correct (exponential backoff): -```php -class SyncWithStripe implements ShouldQueue -{ - public $tries = 3; public $backoff = [1, 5, 10]; } ``` -## Implement `ShouldBeUnique` +Rate-limiting and exception-throttling middleware can release jobs back to the queue. Released attempts may still count toward the maximum attempt limit, so configure `$tries` or `retryUntil()` to allow the intended retry window. -Prevent duplicate job processing. +## Use Unique Jobs for Dispatch Deduplication + +Implement `ShouldBeUnique` when only one queued instance of a logical job should exist. Uniqueness uses a cache lock and is not a substitute for idempotent processing or a database constraint. ```php class GenerateInvoice implements ShouldQueue, ShouldBeUnique { + public $uniqueFor = 3600; + public function uniqueId(): string { - return $this->order->id; + return (string) $this->order->id; } +} +``` - public $uniqueFor = 3600; +All dispatching processes must use a shared cache that supports locks. Unique-job constraints do not apply to jobs within batches. + +Use `ShouldBeUniqueUntilProcessing` only when the lock should be released immediately before processing begins, allowing another instance to be dispatched while the first is running: + +```php +class UpdateSearchIndex implements ShouldQueue, ShouldBeUniqueUntilProcessing +{ + // ... } ``` -## Always Implement `failed()` +## Handle Terminal Failure When Needed + +Implement `failed()` when the application must update state, alert an operator, or record domain-specific context after all attempts are exhausted. Logging every failure in each job may duplicate the queue system's failure reporting. -Handle errors explicitly — don't rely on silent failure. +Laravel invokes `failed()` on a new job instance, so mutations made to the job during `handle()` are not available there. ```php public function failed(?Throwable $exception): void { $this->podcast->update(['status' => 'failed']); - Log::error('Processing failed', ['id' => $this->podcast->id, 'error' => $exception->getMessage()]); + + Log::error('Podcast processing failed', [ + 'podcast_id' => $this->podcast->id, + 'exception' => $exception, + ]); } ``` -## Rate Limit External API Calls in Jobs +## Rate Limit External Calls -Use `RateLimited` middleware to throttle jobs calling third-party APIs. +Use queue middleware such as `RateLimited` when jobs share a third-party API quota. Define the named limiter and choose release delays and attempt limits together. ```php public function middleware(): array @@ -85,62 +85,33 @@ public function middleware(): array } ``` -## Batch Related Jobs +## Batch Jobs for Group Coordination -Use `Bus::batch()` when jobs should succeed or fail together. +Use `Bus::batch()` to monitor a group of jobs and run callbacks when the batch completes or encounters failures. A batch is not a database transaction: completed jobs are not rolled back when another job fails. By default, one failed job cancels the batch; call `allowFailures()` only when partial failure is acceptable. ```php Bus::batch([ new ImportCsvChunk($chunk1), new ImportCsvChunk($chunk2), ]) -->then(fn (Batch $batch) => Notification::send($user, new ImportComplete)) -->catch(fn (Batch $batch, Throwable $e) => Log::error('Batch failed')) -->dispatch(); + ->then(fn (Batch $batch) => Notification::send($user, new ImportComplete)) + ->catch(fn (Batch $batch, Throwable $exception) => Log::error('Import batch failed', [ + 'exception' => $exception, + ])) + ->dispatch(); ``` -## `retryUntil()` Needs `$tries = 0` +## Configure Time-Based Retry Limits Deliberately -When using time-based retry limits, set `$tries = 0` to avoid premature failure. +Use `retryUntil()` as the time-based alternative to a maximum attempt count. Laravel may attempt the job any number of times until this deadline, subject to other failure conditions such as maximum exceptions. The method takes precedence over attempt-based limits, so setting `$tries = 0` is not required. ```php -public $tries = 0; - -public function retryUntil(): DateTime +public function retryUntil(): DateTimeInterface { return now()->addHours(4); } ``` -## Use `WithoutOverlapping::untilProcessing()` - -Prevents concurrent execution while allowing new instances to queue. - -```php -public function middleware(): array -{ - return [new WithoutOverlapping($this->product->id)->untilProcessing()]; -} -``` - -Without `untilProcessing()`, the lock extends through queue wait time. With it, the lock releases when processing starts. - -## Use Horizon for Complex Queue Scenarios +## Use Horizon for Redis Queue Operations -Use Laravel Horizon when you need monitoring, auto-scaling, failure tracking, or multiple queues with different priorities. - -```php -// config/horizon.php -'environments' => [ - 'production' => [ - 'supervisor-1' => [ - 'connection' => 'redis', - 'queue' => ['high', 'default', 'low'], - 'balance' => 'auto', - 'minProcesses' => 1, - 'maxProcesses' => 10, - 'tries' => 3, - ], - ], -], -``` \ No newline at end of file +Laravel Horizon provides monitoring, balancing, metrics, and supervisor configuration for Redis queues. It does not support non-Redis queue drivers. diff --git a/.claude/skills/laravel-best-practices/rules/routing.md b/.claude/skills/laravel-best-practices/rules/routing.md index e288375..604a8d9 100644 --- a/.claude/skills/laravel-best-practices/rules/routing.md +++ b/.claude/skills/laravel-best-practices/rules/routing.md @@ -1,98 +1,106 @@ -# Routing & Controllers Best Practices +# Routing and Controller Best Practices ## Use Implicit Route Model Binding -Let Laravel resolve models automatically from route parameters. +Let Laravel resolve models from route parameters when the default lookup and missing-model behavior fit the endpoint. + +Instead of manual lookup: -Incorrect: ```php -public function show(int $id) +public function show(int $id): View { $post = Post::findOrFail($id); + + return view('posts.show', ['post' => $post]); } ``` -Correct: +Use route model binding: + ```php -public function show(Post $post) +public function show(Post $post): View { return view('posts.show', ['post' => $post]); } ``` -## Use Scoped Bindings for Nested Resources +## Scope Nested Bindings -Enforce parent-child relationships automatically. +Use scoped bindings when a nested resource must belong to its parent. This constrains model resolution; it does not replace authorization. ```php Route::get('/users/{user}/posts/{post}', function (User $user, Post $post) { - // $post is automatically scoped to $user + // The resolved post belongs to the resolved user. })->scopeBindings(); ``` -## Use Resource Controllers +## Use Resource Routes for Resourceful Actions -Use `Route::resource()` or `apiResource()` for RESTful endpoints. +Use `Route::resource()` or `Route::apiResource()` when the endpoint follows Laravel's resource-controller actions. Define explicit routes when the behavior does not fit that vocabulary. ```php Route::resource('posts', PostController::class); -Route::apiResource('api/posts', Api\PostController::class); + +// Alternatively, for an API-only resource: +Route::apiResource('posts', ApiPostController::class); ``` -## Keep Controllers Thin +`apiResource()` omits the HTML-oriented `create` and `edit` routes. It does not itself add an `/api` prefix; that prefix comes from the application's API route configuration. + +## Organize Controllers Around Resources + +As a general default, organize each controller around one resource and use Laravel's standard resource actions: `index`, `show`, `create`, `store`, `edit`, `update`, and `destroy`. This keeps routes predictable and prevents controllers from accumulating unrelated behavior. -Aim for under 10 lines per method. Extract business logic to action or service classes. +When a controller needs a custom action such as `publish`, `approve`, or `archive`, first consider whether that behavior represents a separate resource. A focused resource controller gives the behavior its own authorization, validation, and middleware boundary. + +Custom action on the primary controller: -Incorrect: ```php -public function store(Request $request) -{ - $validated = $request->validate([...]); - if ($request->hasFile('image')) { - $request->file('image')->move(public_path('images')); - } - $post = Post::create($validated); - $post->tags()->sync($validated['tags']); - event(new PostCreated($post)); - return redirect()->route('posts.show', $post); -} +Route::post('/podcasts/{podcast}/publish', [PodcastController::class, 'publish']); ``` -Correct: +The published podcast modeled as a resource: + ```php -public function store(StorePostRequest $request, CreatePostAction $create) -{ - $post = $create->execute($request->validated()); +Route::post('/published-podcasts/{podcast}', [PublishedPodcastController::class, 'store']) + ->name('published-podcasts.store'); - return redirect()->route('posts.show', $post); -} +Route::delete('/published-podcasts/{podcast}', [PublishedPodcastController::class, 'destroy']) + ->name('published-podcasts.destroy'); ``` -## Type-Hint Form Requests - -Type-hinting Form Requests triggers automatic validation and authorization before the method executes. - -Incorrect: ```php -public function store(Request $request): RedirectResponse +class PublishedPodcastController extends Controller { - $validated = $request->validate([ - 'title' => ['required', 'max:255'], - 'body' => ['required'], - ]); + public function store(Podcast $podcast): RedirectResponse + { + $podcast->publish(); - Post::create($validated); + return back(); + } + + public function destroy(Podcast $podcast): RedirectResponse + { + $podcast->unpublish(); - return redirect()->route('posts.index'); + return back(); + } } ``` -Correct: +Treat a custom verb as a design signal, not proof that another controller is required. Use query parameters for simple filtering, and keep an explicit action route when modeling the operation as a resource would obscure the domain or conflict with established project conventions. + +## Keep Controllers Focused on HTTP Concerns + +Controllers should coordinate HTTP input, authorization, validation, an application operation, and the response. Extract substantial or reusable business logic, but do not introduce an action or service merely to satisfy an arbitrary line limit. + ```php -public function store(StorePostRequest $request): RedirectResponse +public function store(StorePostRequest $request, CreatePostAction $create): RedirectResponse { - Post::create($request->validated()); + $post = $create->handle($request->validated()); - return redirect()->route('posts.index'); + return redirect()->route('posts.show', $post); } -``` \ No newline at end of file +``` + +A form request can perform validation and authorization before the controller runs. Do not repeat its rules in the controller. Keep simple, endpoint-specific validation inline when extraction would not improve reuse or clarity; see the validation rules for detailed guidance. diff --git a/.claude/skills/laravel-best-practices/rules/scheduling.md b/.claude/skills/laravel-best-practices/rules/scheduling.md index dfaefa2..4c25134 100644 --- a/.claude/skills/laravel-best-practices/rules/scheduling.md +++ b/.claude/skills/laravel-best-practices/rules/scheduling.md @@ -1,32 +1,50 @@ # Task Scheduling Best Practices -## Use `withoutOverlapping()` on Variable-Duration Tasks +## Prevent Unwanted Overlap -Without it, a long-running task spawns a second instance on the next tick, causing double-processing or resource exhaustion. +Use `withoutOverlapping()` when a second run must not begin while the previous run holds the lock. This is appropriate for variable-duration tasks that are not safe to run concurrently. -## Use `onOneServer()` on Multi-Server Deployments +```php +Schedule::command('reports:generate') + ->everyFifteenMinutes() + ->withoutOverlapping(30); +``` -Without it, every server runs the same task simultaneously. Requires a shared cache driver (Redis, database, Memcached). +The optional value is the lock expiration time in minutes, not the task timeout. Choose it carefully: the default is 24 hours, stale locks can be cleared with `php artisan schedule:clear-cache`, and an expiration that is too short can permit overlap while the first task still runs. The task itself should still tolerate retries and partial execution where practical. -## Use `runInBackground()` for Concurrent Long Tasks +## Run a Task on One Server -By default, tasks at the same tick run sequentially. A slow first task delays all subsequent ones. `runInBackground()` runs them as separate processes. +Use `onOneServer()` when only one scheduler node should run an eligible task. Scheduler nodes must use the same default cache store, and that store must support atomic locks. Supported stores include `database`, `memcached`, `dynamodb`, and `redis`. -## Use `environments()` to Restrict Tasks +```php +Schedule::command('billing:charge')->daily()->onOneServer(); +``` -Prevent accidental execution of production-only tasks (billing, reporting) on staging. +Name scheduled closures before applying `onOneServer()`, especially when scheduling the same closure with different parameters, so each task has a distinct lock identity. + +## Run Eligible Commands in the Background + +Tasks due at the same time run sequentially by default. Use `runInBackground()` when an independent, long-running scheduled command should not delay later tasks. ```php -Schedule::command('billing:charge')->monthly()->environments(['production']); +Schedule::command('analytics:process')->hourly()->runInBackground(); ``` -## Use `takeUntilTimeout()` for Time-Bounded Processing +Laravel restricts `runInBackground()` to tasks scheduled with `command()` and `exec()`; it is not available for scheduled closures. Ensure background processes have appropriate logging and failure monitoring. -A task running every 15 minutes that processes an unbounded cursor can overlap with the next run. Bound execution time. +## Restrict Tasks by Environment -## Use Schedule Groups for Shared Configuration +Use `environments()` when a task should run only in named application environments. Treat this as an operational safeguard, not an authorization control. -Avoid repeating `->onOneServer()->timezone('America/New_York')` across many tasks. +```php +Schedule::command('billing:charge') + ->monthly() + ->environments(['production']); +``` + +## Group Shared Configuration + +Use schedule groups when several tasks genuinely share frequency or constraints. ```php Schedule::daily() @@ -36,4 +54,8 @@ Schedule::daily() Schedule::command('emails:send --force'); Schedule::command('emails:prune'); }); -``` \ No newline at end of file +``` + +## Bound Work Inside the Task + +The scheduler does not provide a `takeUntilTimeout()` event method or terminate arbitrary tasks at a deadline. Bound work in the command or job itself by processing finite chunks, checking a deadline, or dispatching queue jobs with suitable timeouts. Use operating-system or process controls when hard termination is required. diff --git a/.claude/skills/laravel-best-practices/rules/security.md b/.claude/skills/laravel-best-practices/rules/security.md index 524d47e..57b57f0 100644 --- a/.claude/skills/laravel-best-practices/rules/security.md +++ b/.claude/skills/laravel-best-practices/rules/security.md @@ -1,18 +1,9 @@ # Security Best Practices -## Mass Assignment Protection +## Control Mass Assignment -Every model must define `$fillable` (whitelist) or `$guarded` (blacklist). +Define `$fillable` when a model is populated from request-derived arrays, or deliberately guard attributes by another consistent model convention. Laravel models guard all attributes by default; `$guarded = []` opts out of that protection. -Incorrect: -```php -class User extends Model -{ - protected $guarded = []; // All fields are mass assignable -} -``` - -Correct: ```php class User extends Model { @@ -24,82 +15,71 @@ class User extends Model } ``` -Never use `$guarded = []` on models that accept user input. +Do not pass untrusted request data to a model with `$guarded = []`. Mass-assignment protection controls which attributes `create()`, `fill()`, and `update()` may set; it does not validate values or authorize the operation. -## Authorize Every Action +## Authorize Protected Actions -Use policies or gates in controllers. Never skip authorization. +Use policies, gates, or form request authorization for actions that depend on the current user's permissions. Authentication alone does not establish permission, and validation is not authorization. -Incorrect: ```php -public function update(Request $request, Post $post) -{ - $post->update($request->validated()); -} -``` - -Correct: -```php -public function update(UpdatePostRequest $request, Post $post) +public function update(UpdatePostRequest $request, Post $post): RedirectResponse { Gate::authorize('update', $post); $post->update($request->validated()); + + return redirect()->route('posts.show', $post); } ``` -Or via Form Request: +Authorization may instead live in the form request: ```php public function authorize(): bool { - return $this->user()->can('update', $this->route('post')); + return $this->user()?->can('update', $this->route('post')) ?? false; } ``` -## Prevent SQL Injection +Public actions intentionally available to everyone do not need a redundant authorization check. -Always use parameter binding. Never interpolate user input into queries. +## Bind Query Parameters + +Use Eloquent, the query builder, or explicit bindings instead of interpolating untrusted values into Structured Query Language (SQL). Bindings protect values, not identifiers such as column names or sort directions; map user-selected identifiers to an allow-list. Incorrect: + ```php DB::select("SELECT * FROM users WHERE name = '{$request->name}'"); ``` Correct: + ```php User::where('name', $request->name)->get(); - -// Raw expressions with bindings -User::whereRaw('LOWER(name) = ?', [strtolower($request->name)])->get(); +User::whereRaw('LOWER(name) = ?', [$request->string('name')->lower()->toString()])->get(); ``` -## Escape Output to Prevent XSS +## Escape Output in Its Context -Use `{{ }}` for HTML escaping. Only use `{!! !!}` for trusted, pre-sanitized content. +Blade's `{{ }}` syntax HTML-escapes output. Use `{!! !!}` only for content that has been sanitized for the exact HTML context in which it is rendered. Escaping rules differ for HTML, URLs, JavaScript, and Cascading Style Sheets. + +Incorrect for untrusted content: -Incorrect: ```blade {!! $user->bio !!} ``` Correct: + ```blade {{ $user->bio }} ``` -## CSRF Protection +## Apply Cross-Site Request Forgery Protection -Include `@csrf` in all POST/PUT/DELETE Blade forms. Not needed in Inertia. +Include `@csrf` in state-changing Blade forms handled by Laravel's `web` middleware. Routes intentionally excluded from cross-site request forgery (CSRF) verification, such as validated third-party webhooks, need their own authenticity check. -Incorrect: -```blade -
- -
-``` - -Correct: ```blade
@csrf @@ -107,21 +87,27 @@ Correct:
``` -## Rate Limit Auth and API Routes +Inertia applications commonly use Axios, which returns the encrypted `XSRF-TOKEN` cookie in the `X-XSRF-TOKEN` header. Confirm equivalent configuration when using another HTTP client. Do not disable CSRF protection merely to fix a token mismatch. + +## Rate Limit Sensitive Endpoints -Apply `throttle` middleware to authentication and API routes. +Apply suitable rate limits to login attempts, password recovery, verification messages, and expensive or abuse-prone application programming interface (API) routes. Choose the limiter key deliberately; an Internet Protocol (IP) address alone can unfairly group users behind a shared network, while an account identifier alone can enable targeted denial of service. ```php RateLimiter::for('login', function (Request $request) { - return Limit::perMinute(5)->by($request->ip()); + return Limit::perMinute(5)->by(Str::transliterate( + Str::lower($request->string('email')).'|'.$request->ip() + )); }); Route::post('/login', LoginController::class)->middleware('throttle:login'); ``` -## Validate File Uploads +Rate limiting reduces abuse; it does not replace authentication, authorization, or upstream denial-of-service protection. -Validate MIME type, extension, and size. Never trust client-provided filenames. +## Validate and Store Uploads Safely + +Validate expected content type, dimensions where relevant, and size. Laravel's `mimes` rule reads the file contents and guesses a Multipurpose Internet Mail Extensions (MIME) type corresponding to the listed extensions; it does not validate the user-assigned filename extension. The `extensions` rule checks that extension and should not be used by itself. ```php public function rules(): array @@ -132,56 +118,28 @@ public function rules(): array } ``` -Store with generated filenames: - -```php -$path = $request->file('avatar')->store('avatars', 'public'); -``` - -## Keep Secrets Out of Code +Use Laravel's storage methods to generate a filename, and store untrusted files outside a publicly executable location. Public files can require additional controls, such as image re-encoding, content-disposition headers, and explicit blocking of active formats. -Never commit `.env`. Access secrets via `config()` only. - -Incorrect: ```php -$key = env('API_KEY'); +$path = $request->file('avatar')->store('avatars'); ``` -Correct: -```php -// config/services.php -'api_key' => env('API_KEY'), +## Keep Secrets Out of Application Code -// In application code -$key = config('services.api_key'); -``` +Do not commit populated environment files or hard-code credentials. Read environment variables in configuration files, then use `config()` in application code so configuration caching works correctly. See the configuration rules for encrypted environment files and external secret stores. ## Audit Dependencies -Run `composer audit` periodically to check for known vulnerabilities in dependencies. Automate this in CI to catch issues before deployment. +Run `composer audit` regularly and in continuous integration. Review findings for exploitability and update or mitigate affected packages promptly. ```bash composer audit ``` -## Encrypt Sensitive Database Fields +## Encrypt Sensitive Attributes When Appropriate -Use `encrypted` cast for API keys/tokens and mark the attribute as `hidden`. +Use an `encrypted` cast for sensitive values that must be recoverable, and use `$hidden` to omit them from array and JavaScript Object Notation (JSON) serialization. Hidden attributes remain accessible in PHP, and encryption does not replace access control. Encrypted values cannot be meaningfully queried and should use a `TEXT` or larger column because ciphertext length is variable. -Incorrect: -```php -class Integration extends Model -{ - protected function casts(): array - { - return [ - 'api_key' => 'string', - ]; - } -} -``` - -Correct: ```php class Integration extends Model { @@ -195,4 +153,4 @@ class Integration extends Model ]; } } -``` \ No newline at end of file +``` diff --git a/.claude/skills/laravel-best-practices/rules/style.md b/.claude/skills/laravel-best-practices/rules/style.md index db689bf774d1763ac3ec520a3874015f5421ff5b..3f3f14fbc0de7e6788758f67d8aa256d793e00c3 100644 GIT binary patch literal 4380 zcma)9ZEqX75&o`UF+dDRDl9oUT))T{6^@*uNt>%1#m$F9VR3gyTAsPfJ(4S17w5nC z8FF_eH^HF>Y*{3S^Y+X$!xyx&^`7gXZB42!XdMoQ=?(ipH%{e2=j=zL7cc0q))@PM zMf)q~fqqt%u6HNWICbNA%Z~n`oZ7P)d&-BqJ?WZie!x<}=ajX98pod9o}reYPGv^> zk_)US4M$;WYs21?g0yvou2sM}$F-`Mw5JE_Litc?!}HPTiQXEn;1NBYScflfA63=B zw^}A}zWw;_7?~mR2wxW$fAOl5ux%Jpa&3d)!SgQ0?DEu;2OUZT zLG`=zP_h7#3rOH%iG!c}(mvb?*!P{cA2^g&4&;cg>65tQaAi!g;NQyWE+Nm(ob{%D zhUTjl*K~PDoDB*`>g9-qA*q+!X;pUL1)Pf!AqC@e`c}Zz7_I4MxTpy_GuK` z6Ec*kY}Ug|{G4sI3GBF-XGRq~Z^|Y~Aj4a|gB{UEoD#4-2gT0Xoe{Jet_$UkvTy6Q z;!g4eq2JcPr$ZA%ER538#mcY(RNocaR?wZ(`cMb;I2s`aJ(p0)ra?qvuzqXV9S8tL zictKL&`<)2QZ#K1_yZcc4nhGHfJ%jS2)sGW>Dp3_N1!o3Bo6;$`A+( z1Y1YOdej$ivTY3on2)=Ge=*h8k#9bTl0CZ&ClRuvBT51dvXU(S59@$$HfwMi?pQ2< ztI0SAaK=-lf;Lbn8z*aW{LC>t_hGi|_ouVv|0n7=w63O)oIYl0~3#rmdl^fX}uDTRLux z%2TgLMG~V14;U@LZ!>WI7N@%!-E20XxzU+7?T%h!#&L^<{69I19d3GwE#ZWI&*(}A zZ1Q6Ou3x^C1G!NcL0-cFeBNbf*n*>p5cOga7v)q(BApJqot){qX#*-1*r+D>?5v)Q z?*#d?F_th_2|g}Iurq-!W=YyC72qpyR!n`&m9QMJ5uB?1z(am965;5im<2nL=fo`N zNKPG~3moR=5&W^_whDAN7NeUMvsd2BNJUJ}RDi)4)7YQWFR5f8#g)=#{GVs0c1ViW z8jIebe@DR-+9Nv$Sp|#(>Vkk@@J32_EH*(l3hzN1Lm86~AkspRflG2sUm%F1UrEhk zkuIDdEAj(N`i;DG7zy*kFzJ#r}>ud3@-? z9b60az-pK?#9F>9piqku$I%d_f&qG~;oJlx%oNVlyw$kE&1$;gdP!rHe4Mx8 zbE9?~7herIT9usNM+zxyjxLSfni{+~24d+LLK>Jf9q?MyNP8?O6Jq3H9?uwFGdiI} z0i!&;O^kugD>VTg!j)ZHMq>m^{hhfHE4O3%;#cOU;ni@W3NHt_4^IT$ zu+cRh42VQyYg_|33W@R~I7bXYuDZDt(T0BCW_U{=9UzGJYOmID&WbV^<8p=9!>)Ve ztV?F(XtG+br*m3Y3NVxa&V0i;(wS2l(xP8p-bHxPfQ0~6bT1DMl7Spd^F{_K0@^W^ zc8Ael{Uxcr)df}hQIsN0JBD!L$Y@c#lrmJ!y^Qd|QeeDMqyZv;H$ph5S!9L^6%-03 zpyhxnL4(ncigU21_P|&J&TcT0V)nr`f;~h=2yBj*8@Mqc>O9$s0B_!V)Dqw+%}1CR zZBS6HAQ_cOFpmLDn2i(T=%*BxWkh7G6)<~z6amX$zR+-UKMPOk>(|TCPZzyhq`7PH z=*Tj$IdoH2%wtRk5{9s)){M-{vk?J7ZuRdHQq=`Dy@X-_5uV}Fm@V`$nakR`W@+6D zEdrHlFgXg21Xtib2^(e*)!^0y-Oo;AZPmTQ&|E=OZy%8xqc3Rg4_YS46<&Z-l2$9V!-oHYUfv=K_C|PowZt|LcB75;$1eTUe78Vh&a+E%-f!B^_a3OyuOh!1j+3CF~xh&C6Q z*=`XQmT8HzBMo|P)XsSFwYJu8q05a}Nq8>Un^s}fxWXTc+D!ClW^}bJz?`D4gwP={HL5A^SnD#A?)(C5LRZ zR@zG|^YKcHT#n048H9Q7>X){{QHr&?hq_KiVE^8jd(B0!WswWps*3d4DH&@1R8(75 z(o_>v@X2ovWz1l+2v>~J<^>HjOLin4++uISp>Q7sc= zww6}<$`&|bt}L=XnXE+ip&z}g_gV`3HWN5EPEweC&DDJI?qyj{CR+efKb>jeTy0sD zWtYI5qv?KwV!+7*dZa^2FYxC)TK@TN*ocD0=F&btK-5a%Wxf!e#ktaJd!wnwhV#M0 z|0*OpGDbs1S7xm&uSe55UhMTw=n7u9VGYd&_0x8mxwqVDzMxBM#erT(T>>Yi70@@Er6gkS%swHiLEM*)?2zc&R!b$)u{^0DPCWn-5getf^ zqwL-7)#&%+#9FdML00VP=EV)It0I7c8`GuUi-V&wR=MBE?KnxIkV45w0(RotSq(2 z5JBRcjqs-zn!;f43?h8rSf*Nmx8L*f!4K&P%HqkB0gWjgkH;zaLPU;y;I-Mt_EVJK z5225`U*USQfgjQV7uBs9|qK z8N(d$vlHhUP>F9>t{hc! zpk(1NTthYH##aU%kYRXf1Z5TJ#a|1EE=6q<>`nN5$zBCL1$xV1li$&!Wm{EWjJgF+mOY z2m}FlAue$xtpY2C90Ue9gpB9NU51F{eEN|$BM6k3O;JN_tnZ3KW*Cu$J)pVA7jKfx zaAd+LQR$pk$3cm3G=+DZ*%xEtGUz;w>gE-uon7-1V<>b8zw_u7Tofqy@TeZsE$W5A zjUuG+Q%gDQht~?1jCf*ZqtdaFudezoDD5U(J5b>JS*l%5P?3c6WmL#(LhH_DBsfbQ>Dd4CXi F{|%Ge#T5Vm diff --git a/.claude/skills/laravel-best-practices/rules/testing.md b/.claude/skills/laravel-best-practices/rules/testing.md deleted file mode 100644 index d39cc3e..0000000 --- a/.claude/skills/laravel-best-practices/rules/testing.md +++ /dev/null @@ -1,43 +0,0 @@ -# Testing Best Practices - -## Use `LazilyRefreshDatabase` Over `RefreshDatabase` - -`RefreshDatabase` runs all migrations every test run even when the schema hasn't changed. `LazilyRefreshDatabase` only migrates when needed, significantly speeding up large suites. - -## Use Model Assertions Over Raw Database Assertions - -Incorrect: `$this->assertDatabaseHas('users', ['id' => $user->id]);` - -Correct: `$this->assertModelExists($user);` - -More expressive, type-safe, and fails with clearer messages. - -## Use Factory States and Sequences - -Named states make tests self-documenting. Sequences eliminate repetitive setup. - -Incorrect: `User::factory()->create(['email_verified_at' => null]);` - -Correct: `User::factory()->unverified()->create();` - -## Use `Exceptions::fake()` to Assert Exception Reporting - -Instead of `withoutExceptionHandling()`, use `Exceptions::fake()` to assert the correct exception was reported while the request completes normally. - -## Call `Event::fake()` After Factory Setup - -Model factories rely on model events (e.g., `creating` to generate UUIDs). Calling `Event::fake()` before factory calls silences those events, producing broken models. - -Incorrect: `Event::fake(); $user = User::factory()->create();` - -Correct: `$user = User::factory()->create(); Event::fake();` - -## Use `recycle()` to Share Relationship Instances Across Factories - -Without `recycle()`, nested factories create separate instances of the same conceptual entity. - -```php -Ticket::factory() - ->recycle(Airline::factory()->create()) - ->create(); -``` \ No newline at end of file diff --git a/.claude/skills/laravel-best-practices/rules/validation.md b/.claude/skills/laravel-best-practices/rules/validation.md index a20202f..37ce6c5 100644 --- a/.claude/skills/laravel-best-practices/rules/validation.md +++ b/.claude/skills/laravel-best-practices/rules/validation.md @@ -1,75 +1,89 @@ -# Validation & Forms Best Practices +# Validation and Forms Best Practices -## Use Form Request Classes +## Extract Validation When It Improves the Boundary -Extract validation from controllers into dedicated Form Request classes. +Use a form request when validation or authorization is substantial, reused, or clearer outside the controller. Inline `$request->validate()` remains appropriate for a small, endpoint-specific rule set. -Incorrect: ```php -public function store(Request $request) +public function store(StorePostRequest $request): RedirectResponse { - $request->validate([ - 'title' => 'required|max:255', - 'body' => 'required', - ]); -} -``` + $post = Post::create($request->validated()); -Correct: -```php -public function store(StorePostRequest $request) -{ - Post::create($request->validated()); + return redirect()->route('posts.show', $post); } ``` -## Array vs. String Notation for Rules +A form request's `authorize()` method can enforce access to the operation. Validation establishes the shape and values of input; it does not itself authorize the user. + +## Prefer Readable Rule Syntax -Array syntax is more readable and composes cleanly with `Rule::` objects. Prefer it in new code, but check existing Form Requests first and match whatever notation the project already uses. +Array syntax composes cleanly with rule objects and avoids delimiter issues. Prefer it in new code when it improves readability, while following a consistent local style. ```php -// Preferred for new code 'email' => ['required', 'email', Rule::unique('users')], +``` + +String syntax remains valid for simple rules: -// Follow existing convention if the project uses string notation +```php 'email' => 'required|email|unique:users', ``` -## Always Use `validated()` +## Use Only Intended Validated Data + +Use `validated()` or `safe()` instead of `$request->all()` when passing request data onward. Then select the fields intended for the operation when the validation rules also cover control fields or nested data. -Get only validated data. Never use `$request->all()` for mass operations. +Unsafe: -Incorrect: ```php Post::create($request->all()); ``` -Correct: +Preferred: + ```php -Post::create($request->validated()); +$post = Post::create($request->safe()->only(['title', 'body'])); ``` -## Use `Rule::when()` for Conditional Validation +Validated data is not automatically safe for mass assignment. Keep model `$fillable` or `$guarded` rules aligned with the operation, and never add a sensitive attribute to validation merely to make mass assignment convenient. + +## Express Conditional Rules Clearly + +Use conditional rules such as `Rule::when()`, `required_if`, or `exclude_unless` when they make the condition explicit. Choose the simplest form that remains easy to test. ```php 'company_name' => [ - Rule::when($this->account_type === 'business', ['required', 'string', 'max:255']), + 'string', + 'max:255', + Rule::when( + $this->input('account_type') === 'business', + ['required'], + ['nullable'], + ), ], ``` -## Use the `after()` Method for Custom Validation +## Add Cross-Field Validation After Base Rules -Use `after()` instead of `withValidator()` for custom validation logic that depends on multiple fields. +Use a form request's `after()` method for validation that depends on multiple fields or application state. Avoid expensive queries when prerequisite fields have already failed validation. ```php public function after(): array { return [ function (Validator $validator) { - if ($this->quantity > Product::find($this->product_id)?->stock) { + if ($validator->errors()->hasAny(['product_id', 'quantity'])) { + return; + } + + $stock = Product::find($this->integer('product_id'))?->stock; + + if ($stock !== null && $this->integer('quantity') > $stock) { $validator->errors()->add('quantity', 'Not enough stock.'); } }, ]; } -``` \ No newline at end of file +``` + +Validation against mutable state does not prevent a race between validation and persistence. Enforce inventory, uniqueness, and similar invariants with database constraints, atomic updates, or a database transaction as appropriate. diff --git a/.claude/skills/pest-testing/SKILL.md b/.claude/skills/pest-testing/SKILL.md deleted file mode 100644 index ba774e7..0000000 --- a/.claude/skills/pest-testing/SKILL.md +++ /dev/null @@ -1,157 +0,0 @@ ---- -name: pest-testing -description: "Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to write something in Pest, mentions test files or directories (tests/Feature, tests/Unit, tests/Browser), or needs browser testing, smoke testing multiple pages for JS errors, or architecture tests. Covers: it()/expect() syntax, datasets, mocking, browser testing (visit/click/fill), smoke testing, arch(), Livewire component tests, RefreshDatabase, and all Pest 4 features. Do not use for factories, seeders, migrations, controllers, models, or non-test PHP code." -license: MIT -metadata: - author: laravel ---- - -# Pest Testing 4 - -## Documentation - -Use `search-docs` for detailed Pest 4 patterns and documentation. - -## Basic Usage - -### Creating Tests - -All tests must be written using Pest. Use `php artisan make:test --pest {name}`. - -### Test Organization - -- Unit/Feature tests: `tests/Feature` and `tests/Unit` directories. -- Browser tests: `tests/Browser/` directory. -- Do NOT remove tests without approval - these are core application code. - -### Basic Test Structure - - -```php -it('is true', function () { - expect(true)->toBeTrue(); -}); -``` - -### Running Tests - -- Run minimal tests with filter before finalizing: `php artisan test --compact --filter=testName`. -- Run all tests: `php artisan test --compact`. -- Run file: `php artisan test --compact tests/Feature/ExampleTest.php`. - -## Assertions - -Use specific assertions (`assertSuccessful()`, `assertNotFound()`) instead of `assertStatus()`: - - -```php -it('returns all', function () { - $this->postJson('/api/docs', [])->assertSuccessful(); -}); -``` - -| Use | Instead of | -|-----|------------| -| `assertSuccessful()` | `assertStatus(200)` | -| `assertNotFound()` | `assertStatus(404)` | -| `assertForbidden()` | `assertStatus(403)` | - -## Mocking - -Import mock function before use: `use function Pest\Laravel\mock;` - -## Datasets - -Use datasets for repetitive tests (validation rules, etc.): - - -```php -it('has emails', function (string $email) { - expect($email)->not->toBeEmpty(); -})->with([ - 'james' => 'james@laravel.com', - 'taylor' => 'taylor@laravel.com', -]); -``` - -## Pest 4 Features - -| Feature | Purpose | -|---------|---------| -| Browser Testing | Full integration tests in real browsers | -| Smoke Testing | Validate multiple pages quickly | -| Visual Regression | Compare screenshots for visual changes | -| Test Sharding | Parallel CI runs | -| Architecture Testing | Enforce code conventions | - -### Browser Test Example - -Browser tests run in real browsers for full integration testing: - -- Browser tests live in `tests/Browser/`. -- Use Laravel features like `Event::fake()`, `assertAuthenticated()`, and model factories. -- Use `RefreshDatabase` for clean state per test. -- Interact with page: click, type, scroll, select, submit, drag-and-drop, touch gestures. -- Test on multiple browsers (Chrome, Firefox, Safari) if requested. -- Test on different devices/viewports (iPhone 14 Pro, tablets) if requested. -- Switch color schemes (light/dark mode) when appropriate. -- Take screenshots or pause tests for debugging. - - -```php -it('may reset the password', function () { - Notification::fake(); - - $this->actingAs(User::factory()->create()); - - $page = visit('/sign-in'); - - $page->assertSee('Sign In') - ->assertNoJavaScriptErrors() - ->click('Forgot Password?') - ->fill('email', 'nuno@laravel.com') - ->click('Send Reset Link') - ->assertSee('We have emailed your password reset link!'); - - Notification::assertSent(ResetPassword::class); -}); -``` - -### Smoke Testing - -Quickly validate multiple pages have no JavaScript errors: - - -```php -$pages = visit(['/', '/about', '/contact']); - -$pages->assertNoJavaScriptErrors()->assertNoConsoleLogs(); -``` - -### Visual Regression Testing - -Capture and compare screenshots to detect visual changes. - -### Test Sharding - -Split tests across parallel processes for faster CI runs. - -### Architecture Testing - -Pest 4 includes architecture testing (from Pest 3): - - -```php -arch('controllers') - ->expect('App\Http\Controllers') - ->toExtendNothing() - ->toHaveSuffix('Controller'); -``` - -## Common Pitfalls - -- Not importing `use function Pest\Laravel\mock;` before using mock -- Using `assertStatus(200)` instead of `assertSuccessful()` -- Forgetting datasets for repetitive validation tests -- Deleting tests without approval -- Forgetting `assertNoJavaScriptErrors()` in browser tests \ No newline at end of file diff --git a/.claude/skills/testing-best-practices/SKILL.md b/.claude/skills/testing-best-practices/SKILL.md new file mode 100644 index 0000000..35d02a1 --- /dev/null +++ b/.claude/skills/testing-best-practices/SKILL.md @@ -0,0 +1,58 @@ +--- +name: testing-best-practices +description: "Laravel test design and review. Use when selecting coverage, naming or structuring tests, choosing assertions or test data, isolating dependencies, testing HTTP or security boundaries, improving suite performance, or reviewing test value. Use framework guidance or search-docs for Pest and PHPUnit syntax." +license: MIT +metadata: + author: laravel +--- + +# Testing Best Practices + +This skill provides rules for designing Laravel tests. Each rule file explains what to do and why. Use `search-docs` for Laravel and Pest API syntax. +This project uses Pest. Follow the corresponding guidance in each rule. + +## Consistency First + +Read nearby tests before you choose syntax and organization. + +A pattern repeated throughout the project is a convention, and project conventions take precedence over this skill. Follow them and give new tests the same structure. + +These rules govern the tests you write now. An existing test that follows a project convention is not defective merely because it conflicts with this skill. Do not delete or rewrite it. If the convention has drawbacks, explain them and let the user decide. + +## What to Test + +Read this section before you write a test. + +- Test observable behavior and application contracts. A test must pass after an implementation change if the behavior stays the same. +- Cover every changed decision and each applicable high-value failure mode. A decision is a branch, a validation, a calculation, or an authorization. +- Exercise declarations through behavior instead of repeating their text. +- Leave framework behavior to framework tests. Testing project configuration is not testing the framework. A constrained relationship, cast, scope, or validation rule belongs to this project. +- Keep every test that can detect a distinct defect. When two tests detect the same defect, trim the higher-layer test to one case and report the duplication. Do not delete an existing test. +- Write a feature test first. Write a unit test only for logic that does not use the framework. +- Write a feature test for every behavior reachable through a request. Real-browser tests require `pestphp/pest-plugin-browser` and a browser download, neither of which this project installs. Mention the package only if the user asks for a real-browser test. +- Judge an architecture test by the convention it protects, not by the rules above. An `arch()` test declares a rule for an entire directory, such as the parent class of every model, the classes that may use an enum, or the methods every factory declares. It intentionally checks declarations and fails when a new file breaks the convention. +- Use the test tools that the project installs. Add a new test dependency, plugin, or browser only after the user asks for it. + +## How to Apply + +1. Read the code under test. Read the tests in the same directory. Identify every decision in the code. +2. Select every applicable branch in the rule index. Read every selected rule file. +3. Report each defect in the code before you write a test. Examples are a method with no body, a policy that no action calls, and a write action with no validation. Test the actual behavior. Report the defect to the user. +4. Write the tests. Run the smallest set of tests that covers the change. The tests must pass. +5. Check every applicable item in `rules/review.md` and every selected rule file. Resolve every mismatch before completion. + +## Rule Index + +Most changes need more than one rule file. + +| Subject | Rule File | +| --- | --- | +| Test framework features that may already do the work | [`rules/finding-features.md`](rules/finding-features.md) | +| File layout, test names, and groups | [`rules/naming.md`](rules/naming.md) | +| Arrange-act-assert and choosing the correct assertion | [`rules/assertions.md`](rules/assertions.md) | +| Endpoint coverage, authentication, authorization, tenant isolation, validation, and browser tests | [`rules/endpoint-tests.md`](rules/endpoint-tests.md) | +| Factories, test data ownership, and repeated input values | [`rules/test-data.md`](rules/test-data.md) | +| Fakes, mocks, outbound HTTP, time, randomness, and databases | [`rules/isolation.md`](rules/isolation.md) | +| Escaping, injection, cross-tenant access, and privilege checks | [`rules/security.md`](rules/security.md) | +| Environment and CI settings for a slow suite | [`rules/performance.md`](rules/performance.md) | +| Reviewing a test or suite | [`rules/review.md`](rules/review.md) | diff --git a/.claude/skills/testing-best-practices/rules/assertions.md b/.claude/skills/testing-best-practices/rules/assertions.md new file mode 100644 index 0000000..28fcbc4 --- /dev/null +++ b/.claude/skills/testing-best-practices/rules/assertions.md @@ -0,0 +1,60 @@ +# Assertions + +## Arrange, Act, Assert + +Write each test in three parts: setup, one action, and assertions. Put one blank line between them so readers can identify each part without comments. + +Keep each test self-contained. Do not use values created by another test. + +## How to Find the Correct Assertion + +First identify the subject of the check, then find an assertion designed for it. A subject-specific assertion identifies the incorrect value when the test fails. + +1. Search Laravel's assertions for framework subjects such as responses, the database, sessions, models, queues, events, mail, and notifications. +2. Fetch `https://pestphp.com/docs/expectations.md` for the expectations of Pest for a plain value, a type, a format, or a shape. +3. Build the check by hand only if no assertion exists for the subject. +4. Confirm the name in the documentation before you use it. Do not write an assertion that you did not confirm. + +Use the assertion in this table for each subject. + +| Subject | Assertion to use | +| --- | --- | +| A return value, the state of an object, or a transformation of a value | an `expect()` chain | +| An HTTP status, JSON, a session, or Inertia | a Laravel response assertion | +| The state in the database | a Laravel database assertion | +| The existence of a model | `assertModelExists($model)` rather than `assertDatabaseHas('users', ['id' => $user->id])` | + +Use a PHPUnit assertion only if no Pest expectation and no Laravel assertion exists for the subject. + +Assert each fact once, but status and content are separate facts. `assertSee` passes on an error page that contains the text, so keep `assertOk()` alongside it when the status is part of the behavior. + +## Named Response Assertions + +Use a named response assertion, such as `assertNotFound()`, rather than `assertStatus(404)`. A failure then identifies the broken contract. Laravel provides named assertions for commonly tested status codes. + +Keep one `expect()` chain on one subject. Start a new chain when the subject changes, or when the chain is difficult to read. + +## Assert a Known Value + +Write the expected value in the test, or calculate the expected value by a different method. Do not calculate the expected value with the logic of the implementation, because the test then passes when that logic is wrong. + +```php +// The test calculates the value with the logic of the implementation... +$expected = now()->subHours(24)->floorSeconds(30)->toJson(); +expect($from)->toBe($expected); + +// The test sets a fixed input and asserts a known value... +travelTo('2025-01-01 00:00:00'); +expect($from)->toBe('2024-12-31T00:00:00.000000Z'); +``` + +## Assert the Complete Result + +A status code is not the complete result of a write operation. Assert each of the following if the operation changes it: + +- The response or the return value. +- The state in the database. +- The jobs and the events that the operation dispatches. +- The notifications and the mail that the operation sends. + +On the failure path, assert that the operation makes none of these changes. A test that asserts only `assertOk()` passes even when the application saves no record. diff --git a/.claude/skills/testing-best-practices/rules/endpoint-tests.md b/.claude/skills/testing-best-practices/rules/endpoint-tests.md new file mode 100644 index 0000000..32e32e6 --- /dev/null +++ b/.claude/skills/testing-best-practices/rules/endpoint-tests.md @@ -0,0 +1,47 @@ +# Endpoint Tests + +## How to Write the Test + +Fetch `https://laravel.com/framework/docs/http-tests` for the request helpers, the authentication helpers, and the response assertions. Confirm the name before you use it, and do not guess an assertion. + +Choose an assertion based on the subject of the check: the status, a header, a redirect, the JSON body, the session, a validation error, or the view. Laravel provides a named assertion for each subject that identifies the incorrect value. + +## Endpoint Coverage + +Write a test for each applicable case: + +- The request has missing or invalid authentication. +- The request comes from a different tenant, team, or organization. +- The user has an insufficient role or permission. +- The request does not satisfy a route or scope constraint. +- The request fails the validation. +- The request is valid. Assert both the response and the persisted state. + +Assert the application's actual behavior rather than a generic status code. An API returns `401` for a missing or invalid token, while a browser endpoint redirects to the sign-in route. + +## Tenant Isolation + +Assert the status code returned for a cross-tenant request. Use `404` rather than `403` when one tenant must not learn that another tenant's record exists, because `403` confirms its existence. + +## Test Authorization at the Policy Level + +An HTTP test shows that the endpoint performs authorization. It cannot identify which mechanism refused the request because middleware, a policy, and a call to `abort()` can all return `403`. + +- Assert the complete matrix of the permissions against the policy or the gate. A failure then names the rule that is not correct. +- Write one HTTP test for one refused role, which shows that the endpoint calls the authorization. +- Use the helper of the project that asserts the ability and the arguments of the gate, if such a helper exists. + +## Testing Validation + +- Write one test for each validation rule when each failure represents a separate contract. +- Write one test with an empty payload to assert several required fields together. +- Assert the text of the message that the user gets. A message that is present but wrong is a defect. +- Use a dataset for input values that need the same setup and the same assertions. + +Send an input value that is not valid through the application, and assert the error. Do not assert that an array of rules contains a string, because that assertion tests the declaration and not the behavior. Use such an assertion only for a rule that no request can reach, and write the reason in the test. + +### Which Layer Owns Which Case + +The rule-class test owns the matrix of values that pass and fail. The endpoint test proves that the endpoint applies the rule and that the user receives the message. + +When both tests contain the matrix, move it to the rule-class test and retain one case in the endpoint test. Never remove the last case, because the rule-class test still passes if the request omits the rule. The same division applies to policies, scopes, and other classes called by a request. diff --git a/.claude/skills/testing-best-practices/rules/finding-features.md b/.claude/skills/testing-best-practices/rules/finding-features.md new file mode 100644 index 0000000..83ce650 --- /dev/null +++ b/.claude/skills/testing-best-practices/rules/finding-features.md @@ -0,0 +1,34 @@ +# How to Find Test Framework Features + +Pest adds features faster than this skill can list them. Find an existing feature before implementing the behavior by hand. + +- Give `search-docs` the capability you need rather than the name of a function you remember. It returns features available in the installed version. +- Fetch `https://pestphp.com/llms.txt` for the complete feature list and additions in each release. +- If a search returns no results, tell the user that the installed version does not provide the feature. Do not write an API that you have not confirmed. + +Search for a feature in this table before you write the code by hand. + +| Work that you need | Term to search for | +| --- | --- | +| Run one test with many input values | datasets, bound datasets | +| Assert over many values or over a collection | higher-order expectations | +| Remove the same setup from each test in a file | hooks, higher-order tests | +| Apply a convention to the complete codebase | architecture testing | +| Measure if the suite finds a defect | mutation testing | +| Find code with no types | type coverage | +| Reduce the time of a slow suite | parallel, profiling | +| Run one test while you debug | filtering, `--bail`, `--dirty` | + +## Built-in Laravel Assertion Methods + +Laravel provides assertions for each part of the framework. Fetch `https://laravel.com/framework/docs/testing` for the complete list, and search for an assertion before building a check by hand. Examples include `assertDatabaseHas()`, `assertModelExists()`, `assertSoftDeleted()`, response assertions such as `assertRedirectToRoute()` and `assertJsonPath()`, and fake assertions such as `Queue::assertPushed()` and `Notification::assertSentTo()`. + +A hand-built check fails with `false is not true`, which identifies nothing. A framework assertion names the incorrect table, value, or response, so the failure indicates what to fix. + +```php +// The failure says that false is not true. Instead of this... +expect(User::where('email', 'taylor@laravel.com')->exists())->toBeTrue(); + +// Use this... the failure names the table and the attributes that it did not find... +$this->assertDatabaseHas('users', ['email' => 'taylor@laravel.com']); +``` diff --git a/.claude/skills/testing-best-practices/rules/isolation.md b/.claude/skills/testing-best-practices/rules/isolation.md new file mode 100644 index 0000000..e1a21fd --- /dev/null +++ b/.claude/skills/testing-best-practices/rules/isolation.md @@ -0,0 +1,52 @@ +# Fakes, Mocks, and Determinism + +Tests that depend on actual time, randomness, sleeping, or network calls can fail for reasons unrelated to the code under test. Control all four. + +## How to Isolate a Dependency + +Fetch `https://laravel.com/framework/docs/mocking` for Laravel's fakes, facade doubles, and fake assertions. Confirm each name before using it. + +Identify the dependency, then choose the first applicable option. A framework fake preserves the real code path, while a mock replaces the dependency. + +1. Always use framework fakes for facades such as events, queues, mail, notifications, storage, the HTTP client, time, and sleep. +2. Use a developer-defined fake implementation of a service if the application provides one. +3. Use a mock for a container-resolved contract only when the real implementation leaves the process or is nondeterministic. +4. Use the real implementation for everything else, including the database. + +## Framework Fakes + +- Create each fake inside the test that needs it. Do not create fakes in a file-level `beforeEach()`. +- Pass class names to `Event::fake()` and `Queue::fake()` when you know which classes the code dispatches. A fake without class names can hide an unexpected dispatch. +- Use a fake without class names only when the test asserts the complete result, including a call to `assertNothingPushed()`. +- Write one assertion for each fake. The assertion states that the code dispatches the item, or that the code does not dispatch the item. +- Assert the data of a job or of an event if that data is part of the behavior. +- Use `Exceptions::fake()` to assert that the application reports the correct exception. Do not use `withoutExceptionHandling()`, because it changes the response under test. + +Create prerequisite factory records before calling `Event::fake()`. Factories use model events, such as a `creating` hook that generates a UUID, and a fake without class names suppresses those events and can produce an invalid model. Call the fake first only when a factory event is under test, and pass that event's class name. + +## Mocking + +Use `shouldReceive()` before the action to declare an expectation. Use `shouldHaveReceived()` after the action for a spy. Use `Mockery::on()` or `withArgs()` if an equality check cannot state the expected argument, such as a check of one field of a value object. + +Import the mock function before you use it: `use function Pest\Laravel\mock;`. + +## Outbound HTTP Testing + +Call `Http::preventStrayRequests()`. Any request without a matching fake then fails without reaching the network. + +Fake the exact endpoint used by each test. Do not call `Http::fake()` without an endpoint because it accepts unexpected requests and can hide defects. + +## Time and Randomness + +- Freeze the time or move the time in each test that depends on a date, a period, or a timestamp. +- Use the framework helpers `freezeTime()`, `travelTo()`, `travel()`, and `travelBack()`. Do not call `Carbon::setTestNow()`. +- Use `Str::createRandomStringsUsing()` to fix a generated string, if the test asserts an identifier or a slug. +- Use `Sleep::fake()` instead of a real sleep, and assert the sleeps that the code requests. +- Restore the time and the randomness after each test, if the suite does not restore them for every test. + +## Database + +- Run real queries against the real records in the test database. Do not mock the query builder, because the test then asserts the mock. +- Assert the exact keys of `toArray()` if the shape of the serialized model is a contract. The test then fails when the model exposes a new attribute. +- Test application behavior caused by the schema, such as deleting dependent records through a cascade. Do not test the database engine's cascade implementation. +- Use `LazilyRefreshDatabase` instead of `RefreshDatabase`. A test that does not use the database then does not run the migrations. diff --git a/.claude/skills/testing-best-practices/rules/naming.md b/.claude/skills/testing-best-practices/rules/naming.md new file mode 100644 index 0000000..4f3f5b1 --- /dev/null +++ b/.claude/skills/testing-best-practices/rules/naming.md @@ -0,0 +1,45 @@ +# Naming and Structure + +## File Layout + +- Name each test file `{ClassName}Test.php`. +- Place each test file at the same relative path as the class under test. The class `app/Actions/DeleteTeam.php` gets the test `tests/Unit/Actions/DeleteTeamTest.php`. +- Follow the project's convention for fixture files. If none exists, put fixtures in `tests/Fixtures/` and load them by path. +- Move large literal values out of the test body and into fixture files. + +## Test Function + +Use the test function used by other files in the same directory. If no neighboring test files exist: + +- Use `it()` for the behavior of the code, and write the name as a verb phrase. +- Use `test()` for a declarative fact, such as a grant in a policy, the labels of an enum, or the shape of a serialized model. + +Use one Pest declaration style in each file. Use either `it()` or `test()` consistently. + +## Naming Tests + +The name of a test is a specification. State the user-visible result and the condition that causes it. + +- Name the behavior, and not the method under test. The file name already gives the class. +- Give the exact status code in the name of a test for an API error. +- Do not write `Given`, `When`, or `Then` in the name. + +```php +it('returns 401 when no token is provided', function () { ... }); +it('does not include deployments from deleted environments', function () { ... }); +it('falls back to the default region when none is configured', function () { ... }); +``` + +Use a verb that describes a result, such as `returns`, `renders`, `creates`, `dispatches`, `rejects`, `forbids`, `falls back`, or `does not`. + +Do not write `it('works correctly')` or `it('returns data')`, because neither specifies a meaningful result. Do not write `it('handleMethod creates record')`, because it names a method rather than behavior. + +## Grouping + +Use `describe()` if one file covers separate actions in a lifecycle. An example is a controller with the actions `index`, `show`, `store`, `update`, and `destroy`. + +Do not use `describe()` in these cases: + +- The file covers one action or one flow. +- The tests are different only in the input value. Use a dataset instead. +- The group adds a level but does not make the file easier to read. diff --git a/.claude/skills/testing-best-practices/rules/performance.md b/.claude/skills/testing-best-practices/rules/performance.md new file mode 100644 index 0000000..ee993fb --- /dev/null +++ b/.claude/skills/testing-best-practices/rules/performance.md @@ -0,0 +1,46 @@ +# Test Suite Performance + +These settings apply to the project and CI, not to individual tests. Read `rules/isolation.md` for choices within a test. + +Fetch `https://pestphp.com/docs/optimizing-tests` for Pest options that make test runs faster. +Verify each flag in the documentation before adding it to CI. + +Measure before changing a setting. Find the slow test first, and apply a project-wide setting only after identifying the costly work. + +## Test Environment + +- Set `BCRYPT_ROUNDS=4` in `.env.testing` or in `phpunit.xml`. The default value is 12, and the hash then takes most of the time of each test that signs a user in. +- Disable XDebug. Disable pcov also, unless the run needs the coverage. +- Disable packages that perform work on every request in the test environment. Examples are Pulse, Telescope, and Nightwatch. +- Use the `WithCachedConfig` and `WithCachedRoutes` traits, so the run does not parse the configuration and the routes for every test. +- Call `withoutVite()`, or `withoutMix()`, so the framework does not resolve a built asset. + +## Global Fakes + +Put these three calls in the base `Pest.php` of the project: + +- `Http::preventStrayRequests()`, because one request that reaches the network can slow the suite. This catches requests made through Laravel's HTTP client. Check direct Guzzle and cURL usage separately. +- `Sleep::fake(syncWithCarbon: true)`, so a retry and a backoff do not sleep. +- `Exceptions::fake()`, so the suite does not report an exception to an external service. + +## How to Run the Suite in Parallel + +Run `vendor/bin/pest --parallel` to spread tests across the machine's CPU cores. Add `--processes=N` if the default count is unsuitable for the machine or CI. + +A parallel run gives each process a separate database. Tests must meet these conditions; a test that fails only in parallel breaks one of them: + +- The test creates each record that it reads. It does not read a record that another test creates. +- The test does not depend on the order of the run. +- The test does not share a file, a cache key, or a queue with another test. Give each process a separate name for such a resource. + +## How to Find a Slow Test + +Run `vendor/bin/pest --profile` to list the slowest tests. Start with the ten slowest tests, because the same cause often applies to the complete suite. + +If the cause of a slow test is unclear, add an event listener or temporary log entry to identify its work. + +## Common Errors + +- The run loads XDebug for a test that does not need it. +- `BCRYPT_ROUNDS` keeps the default value, because the project has no `.env.testing`. +- The code under test calls the real `sleep()`, and `Sleep::fake()` then does not help. diff --git a/.claude/skills/testing-best-practices/rules/review.md b/.claude/skills/testing-best-practices/rules/review.md new file mode 100644 index 0000000..e0cfca1 --- /dev/null +++ b/.claude/skills/testing-best-practices/rules/review.md @@ -0,0 +1,44 @@ +# Reviewing Tests + +Check every item in this file. A passing test may still provide no value. For each test, identify the defect it would catch. + +Report each finding. Do not delete or rewrite a test without the user's approval. When an issue appears throughout the suite as a convention, report the pattern once rather than every affected file. + +## Test Value + +Apply this section to behavioral tests. An architecture test states a convention for a directory, so these items do not apply to it. + +- [ ] Each test covers observable behavior or an application contract, and passes after a change to the implementation that keeps the behavior. +- [ ] Each tested declaration is exercised through behavior, and no test asserts the behavior of the framework. A test of what this project configures, such as a relation with a constraint, a cast, or a scope, belongs to this project. +- [ ] Each test detects a distinct defect that no other test covers. A duplicate shrinks at the higher layer to the one case that proves the wiring. +- [ ] Every changed decision and each applicable high-value failure mode has coverage. + +## Names and Structure + +- [ ] Each file has the name `{ClassName}Test.php` and the relative path of the class under test. +- [ ] Each name states a result, the condition that causes it, and the status code for an API error. +- [ ] Each file uses one declaration style consistently, and each `describe()` group holds separate behavior. + +## Coverage + +- [ ] HTTP tests cover authentication, authorization, role, scope, and validation when applicable. +- [ ] A request for a record of a different tenant gets a status code that does not confirm that the record exists. +- [ ] The complete permission matrix belongs in policy tests, not controller tests. +- [ ] Each validation rule has one test that asserts the user-visible message. When a unit test owns a matrix, reduce duplicate higher-level coverage to one case rather than deleting it. +- [ ] Rendered user input and each dynamic part of a query have a security test. + +## Data and Determinism + +- [ ] Each test creates its mutable records directly or through a helper that it calls, and every created record arranges the behavior or supports an assertion. +- [ ] Each `beforeEach()` holds configuration only. +- [ ] Each factory state and each relationship gives the meaning of the data. +- [ ] Each call to `make()` is in a test that does not need the database. +- [ ] Time, randomness, sleep, and outbound HTTP are controlled. +- [ ] Each test passes alone, and passes in the complete suite in any order. + +## Assertions + +- [ ] Each expected value is a known value, and the test does not calculate the value with the logic of the implementation. +- [ ] Each test of a write operation asserts the response, the state in the database, and the side effects. +- [ ] Each fake has one assertion, and gives the class names unless the test asserts the complete result. +- [ ] Each `expect()` chain stays on one subject. diff --git a/.claude/skills/testing-best-practices/rules/security.md b/.claude/skills/testing-best-practices/rules/security.md new file mode 100644 index 0000000..234f5b0 --- /dev/null +++ b/.claude/skills/testing-best-practices/rules/security.md @@ -0,0 +1,27 @@ +# Security Tests + +Test each security boundary where user input affects authorization, rendered output, or query construction. A defect at such a boundary can be difficult to detect because the feature may continue to work. + +Write a test for each of these cases: + +- **Cross-tenant access.** Request a record of a different tenant, team, or organization. Read `rules/endpoint-tests.md` for why the response should possibly be `404` rather than `403`. +- **Each unprivileged role.** Use a dataset over the roles that the endpoint must refuse. +- **Escaping user-provided content.** Test escaping in HTML and mail. Include names and every free-text field a template renders. Assert that dangerous characters are escaped and the raw value is absent. Do not assert an exact entity for a quote, because Markdown and mail CSS inliners may decode it. +- **Injection into dynamic query components.** Examples include sort columns, filter fields, and sort directions. +- **An unexpected key** in a payload or configuration array. A merge that accepts every key can set an attribute the user must not control. + +```php +it('escapes dangerous content in the notification', function () { + $organization = Organization::factory()->make([ + 'name' => "O'Reilly ", + ]); + + $content = (new QuotaApproaching($organization, 80))->toMail()->render(); + + expect($content) + ->toContain('<script>') + ->not->toContain(""); +}); +``` + +Laravel provides defenses against mass assignment, unauthorized access, and unescaped output. Test that the application applies the appropriate defense to each attribute, route, and template. diff --git a/.claude/skills/testing-best-practices/rules/test-data.md b/.claude/skills/testing-best-practices/rules/test-data.md new file mode 100644 index 0000000..6512468 --- /dev/null +++ b/.claude/skills/testing-best-practices/rules/test-data.md @@ -0,0 +1,56 @@ +# Factories and Test Data + +## Each Test Makes Its Own Data + +Create mutable records inside the test that uses them. This keeps setup visible and lets each test select its factory state. + +Use `beforeEach()` only for configuration that applies to every test in the file. Do not create records in it. + +## Record Construction + +- Use `create()` if the test needs the record in the database. +- Use `make()` only if the test does not need the database. Examples include rendering a notification and testing a value object's behavior. +- Use a named factory state instead of a raw attribute. `User::factory()->unverified()->create()` gives the state meaning; `create(['email_verified_at' => null])` gives only its value. +- Use `for()` or the relationship helper of the project to declare the owner of a record. +- Use `recycle()` if several records must share one parent record. +- Use `sequence()` if several records need different attributes. + +```php +$organization = Organization::factory()->onPlan(BillingPlan::PRO)->create(); + +$environment = Environment::factory()->recycle($organization)->create(); + +$organizations = Organization::factory() + ->count(3) + ->sequence( + ['created_at' => now()->setSeconds(30)], + ['created_at' => now()->setSeconds(1)], + ) + ->create(); +``` + +Create only the records required to arrange the behavior or support an assertion. + +## Datasets + +Use a dataset when the setup, test body, and assertions remain the same across input values. + +```php +it('forbids roles other than admin', function (Role $role) { + actingAs(User::factory()->hasOrganization($role)->create()) + ->post('/settings') + ->assertForbidden(); +})->with(collect(Role::cases())->reject(fn (Role $role) => $role === Role::ADMIN)); +``` + +Use parameterized tests for: + +- enum cases +- roles and plans +- boundary values +- input values that are invalid in the same way +- input and output value pairs + +Write separate tests if the cases need a different setup, a different behavior, or different assertions. One test function with a branch in the body is two tests in one function. + +Give each dataset case a name that states the difference. A failure then identifies the case without requiring you to count positions. diff --git a/CLAUDE.md b/CLAUDE.md index da64d23..d2b6632 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -3,31 +3,17 @@ # Laravel Boost Guidelines -The Laravel Boost guidelines are specifically curated by Laravel maintainers for this application. These guidelines should be followed closely to ensure the best experience when building Laravel applications. - ## Foundational Context -This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions. - -- php - 8.5 -- laravel/framework (LARAVEL) - v12 -- laravel/prompts (PROMPTS) - v0 -- laravel/sanctum (SANCTUM) - v4 -- larastan/larastan (LARASTAN) - v3 -- laravel/boost (BOOST) - v2 -- laravel/mcp (MCP) - v0 -- laravel/pail (PAIL) - v1 -- laravel/pint (PINT) - v1 -- pestphp/pest (PEST) - v4 -- phpunit/phpunit (PHPUNIT) - v12 -- rector/rector (RECTOR) - v2 +This application is a Laravel application running on PHP 8.5. Always use the APIs that match the installed major version of each package — do not assume a version. -## Skills Activation +Before relying on a package's API, confirm its installed version: +- PHP packages: run `composer show --direct` to list direct dependencies with versions, or `composer show ` for a single package. +- JS packages: check `package.json` for the installed versions. -This project has domain-specific skills available. You MUST activate the relevant skill whenever you work in that domain—don't wait until you're stuck. +## Skills Activation -- `laravel-best-practices` — Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization and security patterns, validation, error handling, queue and job configuration, route definitions, and architectural decisions. Also use for Laravel code reviews and refactoring existing Laravel code to follow best practices. Covers any task involving Laravel backend PHP code patterns. -- `pest-testing` — Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to write something in Pest, mentions test files or directories (tests/Feature, tests/Unit, tests/Browser), or needs browser testing, smoke testing multiple pages for JS errors, or architecture tests. Covers: it()/expect() syntax, datasets, mocking, browser testing (visit/click/fill), smoke testing, arch(), Livewire component tests, RefreshDatabase, and all Pest 4 features. Do not use for factories, seeders, migrations, controllers, models, or non-test PHP code. +This project has domain-specific skills available in `**/skills/**`. You MUST activate the relevant skill whenever you work in that domain—don't wait until you're stuck. ## Conventions @@ -46,16 +32,12 @@ This project has domain-specific skills available. You MUST activate the relevan ## Frontend Bundling -- If the user doesn't see a frontend change reflected in the UI, it could mean they need to run `npm run build`, `npm run dev`, or `composer run dev`. Ask them. +- If a frontend change doesn't show in the UI or you get a "Unable to locate file in Vite manifest" error, run `npm run build` or ask the user to run `npm run dev` or `composer run dev`. ## Documentation Files - You must only create documentation files if explicitly requested by the user. -## Replies - -- Be concise in your explanations - focus on what's important rather than explaining obvious details. - === boost rules === # Laravel Boost @@ -70,7 +52,7 @@ This project has domain-specific skills available. You MUST activate the relevan ## Searching Documentation (IMPORTANT) -- Always use `search-docs` before making code changes. Do not skip this step. It returns version-specific docs based on installed packages automatically. +- Use `search-docs` before changes that depend on Laravel ecosystem APIs, behavior, configuration, or version-specific syntax. Skip it for copy-only edits and other changes where package documentation is irrelevant. Reuse sufficient results already in context instead of searching again. - Pass a `packages` array to scope results when you know which packages are relevant. - Use multiple broad, topic-based queries: `['rate limiting', 'routing rate limiting', 'routing']`. Expect the most relevant results first. - Do not add package names to queries because package info is already shared. Use `test resource table`, not `filament 4 test resource table`. @@ -82,12 +64,15 @@ This project has domain-specific skills available. You MUST activate the relevan 3. Combine words and phrases for mixed queries: `middleware "rate limit"`. 4. Use multiple queries for OR logic: `queries=["authentication", "middleware"]`. +## Project Rules + +- This project contains committed, area-grouped rules in `.ai/rules` when that directory exists, including path-scoped framework guidelines under `.ai/rules/boost`. Before you enter plan mode or create/edit any file, you MUST first: open @.ai/rules/index.md (it maps file globs to rule files), read every rule file whose globs cover the path(s) in scope, and run `grep -rin 'keyword' .ai/rules` to catch what a path match alone misses. Do not write code until you have read and are following every matching rule. If `.ai/rules` does not exist, continue without it. + ## Artisan - Run Artisan commands directly via the command line (e.g., `php artisan route:list`). Use `php artisan list` to discover available commands and `php artisan [command] --help` to check parameters. - Inspect routes with `php artisan route:list`. Filter with: `--method=GET`, `--name=users`, `--path=api`, `--except-vendor`, `--only-vendor`. - Read configuration values using dot notation: `php artisan config:show app.name`, `php artisan config:show database.default`. Or read config files directly from the `config/` directory. -- To check environment variables, read the `.env` file directly. ## Tinker @@ -106,12 +91,21 @@ This project has domain-specific skills available. You MUST activate the relevan - Prefer PHPDoc blocks over inline comments. Only add inline comments for exceptionally complex logic. - Use array shape type definitions in PHPDoc blocks. +=== deployments rules === + +# Deployment + +- Laravel can be deployed using [Laravel Cloud](https://cloud.laravel.com/), which is the fastest way to deploy and scale production Laravel applications. + === tests rules === # Test Enforcement -- Every change must be programmatically tested. Write a new test or update an existing test, then run the affected tests to make sure they pass. -- Run the minimum number of tests needed to ensure code quality and speed. Use `php artisan test --compact` with a specific filename or filter. +- Add or update tests for behavior and logic changes when a test provides meaningful regression coverage. +- Pure copy, styling, and layout-only changes do not require new or updated tests. +- When test coverage applies, run the affected tests and ensure they pass. +- Test the changed behavior and its important failure modes, but do not add tests beyond them. +- Read the `testing-best-practices` skill before writing tests. === laravel/core rules === @@ -139,48 +133,70 @@ This project has domain-specific skills available. You MUST activate the relevan - Faker: Use methods such as `$this->faker->word()` or `fake()->randomDigit()`. Follow existing conventions whether to use `$this->faker` or `fake()`. - When creating tests, make use of `php artisan make:test [options] {name}` to create a feature test, and pass `--unit` to create a unit test. Most tests should be feature tests. -## Vite Error +=== pint/core rules === -- If you receive an "Illuminate\Foundation\ViteException: Unable to locate file in Vite manifest" error, you can run `npm run build` or ask the user to run `npm run dev` or `composer run dev`. +# Laravel Pint Code Formatter -=== laravel/v12 rules === +- If you have modified any PHP files, you must run `vendor/bin/pint --dirty --format agent` before finalizing changes to ensure your code matches the project's expected style. +- Do not run `vendor/bin/pint --test --format agent`, simply run `vendor/bin/pint --format agent` to fix any formatting issues. -# Laravel 12 +=== pest/core rules === -- CRITICAL: ALWAYS use `search-docs` tool for version-specific Laravel documentation and updated code examples. -- Since Laravel 11, Laravel has a new streamlined file structure which this project uses. +# Pest -## Laravel 12 Structure +- This project uses Pest. Create tests with `php artisan make:test --pest {name}`. +- Do not include the test suite directory in `{name}`. Use `SomeFeatureTest`, not `Feature/SomeFeatureTest`. +- Read the `testing-best-practices` skill for guidance on coverage, naming, structure, dependency isolation, and review. +- Do not delete tests or test files without approval. They are part of the application. -- In Laravel 12, middleware are no longer registered in `app/Http/Kernel.php`. -- Middleware are configured declaratively in `bootstrap/app.php` using `Application::configure()->withMiddleware()`. -- `bootstrap/app.php` is the file to register middleware, exceptions, and routing files. -- `bootstrap/providers.php` contains application specific service providers. -- The `app/Console/Kernel.php` file no longer exists; use `bootstrap/app.php` or `routes/console.php` for console configuration. -- Console commands in `app/Console/Commands/` are automatically available and do not require manual registration. +## Running Tests -## Database +- Run the narrowest set of tests that covers the change. Pass a file path or `--filter=testName` to `php artisan test --compact`. +- Rerun a test after each change to it. +- Run `vendor/bin/pest` to call the test runner directly. It accepts the same file path and `--filter=testName` arguments. +- After the feature tests pass, ask the user to run the complete suite with `php artisan test --compact`. -- When modifying a column, the migration must include all of the attributes that were previously defined on the column. Otherwise, they will be dropped and lost. -- Laravel 12 allows limiting eagerly loaded records natively, without external packages: `$query->latest()->limit(10);`. +=== juststeveking/api-toolbox/core rules === -### Models +## API Toolbox (juststeveking/api-toolbox) -- Casts can and likely should be set in a `casts()` method on a model rather than the `$casts` property. Follow existing conventions from other models. +This application uses API Toolbox: HTTP standards for Laravel APIs, one RFC per feature. Errors follow RFC 9457 Problem Details, and there is middleware for ETags and preconditions, idempotency keys, `Prefer`, JSON Merge Patch, digests, HTTP Message Signatures and more. Activate the `api-toolbox-development` skill before using any of these features in detail. -=== pint/core rules === +### Check what is enabled first -# Laravel Pint Code Formatter +- Features are switched on in `config/api-toolbox.php` with `Features::problemDetails()`, `Features::idempotency()` and so on. If the config has not been published, every stable feature is on with its defaults; RateLimit headers are experimental and off unless listed. +- A disabled feature registers nothing: no middleware alias, route, binding or test assertion. Before using a middleware alias, an assertion or a class, confirm its feature is enabled. -- If you have modified any PHP files, you must run `vendor/bin/pint --dirty --format agent` before finalizing changes to ensure your code matches the project's expected style. -- Do not run `vendor/bin/pint --test --format agent`, simply run `vendor/bin/pint --format agent` to fix any formatting issues. +### Errors are problems, never hand-built JSON -=== pest/core rules === +- Do not return `response()->json(['message' => ...], 4xx)` from an API. Throw an exception; the package renders it as `application/problem+json`. `abort()`, validation failures and authentication failures are already rendered correctly. +- For an error your API defines, make a typed problem class with Artisan rather than writing one by hand. The command needs a title and a status, and prompts for them if they are missing, so pass them under `--no-interaction`: + + +// php artisan make:api-problem OutOfCredit --title="You do not have enough credit." --status=403 --no-interaction +// php artisan make:api-problem AccountFrozen --apiguide=account-frozen --no-interaction + +throw new OutOfCredit( + detail: 'Your balance is 30, but that costs 50.', + extensions: ['balance' => 30], +); + + +- The title belongs on the class and must not change per occurrence. Put occurrence details in `detail` and `extensions`. An extension key named `type`, `title`, `status`, `detail` or `instance` throws. +- Prefer a type from the apiguide.dev catalogue when one fits: `JustSteveKing\Toolbox\Support\ApiGuide` has a constant for each entry. + +### Use the standard, not a custom header or parameter + +- Optimistic locking: use `conditional` and `preconditions.required` middleware with `HasValidators` on the model, not a `version` field in the body. +- Safe retries of POST: use `idempotent` middleware, not a custom request-dedupe table. +- `?return=none` or `?async=1`: use the `Prefer` header (`prefer` middleware, the `Preferences` class). +- Partial updates: use JSON Merge Patch (`merge-patch` middleware, the `MergePatch` class), and validate the merged document, not the patch. +- Webhook signing: use `Http::withSignature('key-id')` to send and the `signature.verify` middleware to receive, not a hand-rolled HMAC header. +- Pagination: return `CursorPage::of($paginator, Resource::class)`. Navigation goes in `Link` headers and the body is the list of items. -## Pest +### Testing -- This project uses Pest for testing. Create tests: `php artisan make:test --pest {name}`. -- Run tests: `php artisan test --compact` or filter: `php artisan test --compact --filter=testName`. -- Do NOT delete tests without approval. +- Use the package's assertions rather than checking headers by hand. They validate exact header syntax: `assertProblem()`, `assertProblemType()`, `assertETag()`, `assertPreconditionFailed()`, `assertIdempotentReplay()`, `assertLinkHeader()` and others. Each has a Pest expectation too, such as `toBeProblem()`. +- They exist only under `APP_ENV=testing` and only for enabled features. diff --git a/boost.json b/boost.json index 4a2c13c..95600cf 100644 --- a/boost.json +++ b/boost.json @@ -3,12 +3,18 @@ "claude_code", "gemini" ], + "cloud": false, "guidelines": true, "mcp": true, "nightwatch_mcp": false, + "packages": [ + "juststeveking/api-toolbox" + ], "sail": false, "skills": [ + "infer-conventions", "laravel-best-practices", - "pest-testing" + "testing-best-practices", + "api-toolbox-development" ] } From 1d4b88b35633db11db2c5fdc8038d424f93d7eb5 Mon Sep 17 00:00:00 2001 From: Steve McDougall Date: Tue, 20 Oct 2026 10:30:23 +0100 Subject: [PATCH 06/10] docs: rewrite the README for Laravel 13 and api-toolbox The README described JSON:API resources, the Sunset middleware and Laravel 12. It now covers problem details and how localization applies to them, idempotency, deprecation attributes, pagination, ETags and the API catalog, and lists the token endpoints it was missing. A test covers the API catalog the README points clients at, and the user factory sets a ULID so Scribe's examples document a real id rather than a nullable one. --- .scribe/endpoints.cache/00.yaml | 6 +- .scribe/endpoints/00.yaml | 6 +- README.md | 145 ++++++++++++++++++++++------- database/factories/UserFactory.php | 1 + public/docs/collection.json | 8 +- public/docs/index.html | 12 +-- public/docs/openapi.yaml | 27 +++--- tests/Feature/ApiCatalogTest.php | 12 +++ 8 files changed, 152 insertions(+), 65 deletions(-) create mode 100644 tests/Feature/ApiCatalogTest.php diff --git a/.scribe/endpoints.cache/00.yaml b/.scribe/endpoints.cache/00.yaml index c953ef1..d27d0a4 100644 --- a/.scribe/endpoints.cache/00.yaml +++ b/.scribe/endpoints.cache/00.yaml @@ -80,7 +80,7 @@ endpoints: - custom: [] status: 201 - content: '{"data":{"id":null,"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:27:05+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"01m5cabemn2cm9prm9w320yt4q","name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:30:18+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Registration succeeded.' - @@ -159,7 +159,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":null,"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:27:05+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"01m5cabemyjecmhz93hcdyk7dx","name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:30:18+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Login succeeded.' - @@ -519,7 +519,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":null,"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:27:05+00:00","created_at":null,"updated_at":null}}' + content: '{"data":{"id":"01m5cabenn157bw78h9dvpqs63","name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:30:18+00:00","created_at":null,"updated_at":null}}' headers: [] description: 'Authenticated user profile.' - diff --git a/.scribe/endpoints/00.yaml b/.scribe/endpoints/00.yaml index 7edd57b..a2bb724 100644 --- a/.scribe/endpoints/00.yaml +++ b/.scribe/endpoints/00.yaml @@ -78,7 +78,7 @@ endpoints: - custom: [] status: 201 - content: '{"data":{"id":null,"name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:27:05+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"01m5cabemn2cm9prm9w320yt4q","name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:30:18+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Registration succeeded.' - @@ -157,7 +157,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":null,"name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:27:05+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"01m5cabemyjecmhz93hcdyk7dx","name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:30:18+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Login succeeded.' - @@ -517,7 +517,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":null,"name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:27:05+00:00","created_at":null,"updated_at":null}}' + content: '{"data":{"id":"01m5cabenn157bw78h9dvpqs63","name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:30:18+00:00","created_at":null,"updated_at":null}}' headers: [] description: 'Authenticated user profile.' - diff --git a/README.md b/README.md index 84bfc14..7046710 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,39 @@ # Kit -Opinionated Laravel API starter kit for token-based authentication with strong defaults around API design, documentation, testing, and security. +Opinionated Laravel API starter kit for token-based authentication, with strong defaults around +API design, HTTP standards, documentation, testing and security. ## Highlights -- PHP `8.5` + Laravel `12` +- PHP `8.5` + Laravel `13` - SQLite-first local development (`DB_CONNECTION=sqlite`) - Sanctum personal access token authentication - Versioned API routes with no `/api` prefix (`/v1/...`) - Invokable controllers only - Form Request validation + DTO-style request payload objects -- JSON:API resources for entity responses +- Standards-compliant HTTP through [api-toolbox](https://github.com/JustSteveKing/api-toolbox): + - Every error is [RFC 9457](https://www.rfc-editor.org/rfc/rfc9457) problem details, typed from + the [apiguide.dev](https://apiguide.dev/errors) error catalogue + - `Idempotency-Key` replay and conflict handling on critical writes + - `Deprecation` and `Sunset` headers from controller attributes, and `410 Gone` after sunset + - Cursor pagination with RFC 8288 `Link` headers + - ETags and `304 Not Modified` + - Request IDs and W3C trace context + - An RFC 9727 API catalog at `/.well-known/api-catalog` - API localization via `Accept-Language` + `Content-Language` - Scribe (attribute-based) API docs + OpenAPI generation -- OpenAPI contract tests to keep docs and runtime behavior in sync -- Sunset middleware to deprecate and retire endpoints safely -- GitHub Actions for CI tests and daily dependency update PRs +- OpenAPI contract tests to keep docs and runtime behaviour in sync +- GitHub Actions for style, static analysis, tests, security audits and daily dependency update PRs ## Tech Stack -- Laravel Framework: `^12.0` +- Laravel Framework: `^13.30` - PHP: `^8.5` - Auth: `laravel/sanctum` +- HTTP standards: `juststeveking/api-toolbox` - Docs/OpenAPI: `knuckleswtf/scribe` (attributes, not docblocks) - Test Runner: Pest + Laravel test tooling -- Static Analysis / Quality: PHPStan (Larastan), Pint, Rector +- Static Analysis / Quality: PHPStan (Larastan, level 10), Pint, Rector ## Quick Start @@ -76,6 +85,9 @@ Framework routing is configured with `apiPrefix: ''` in `bootstrap/app.php`, so | POST | `/v1/auth/login` | No | Login and issue token | | GET | `/v1/auth/me` | Bearer | Current authenticated user | | POST | `/v1/auth/logout` | Bearer | Revoke current token | +| GET | `/v1/auth/tokens` | Bearer | List the user's tokens, cursor paginated | +| DELETE | `/v1/auth/tokens` | Bearer | Revoke every token | +| DELETE | `/v1/auth/tokens/{token_id}` | Bearer | Revoke one token | | POST | `/v1/auth/email/verification-notification` | Bearer | Send/resend verification email | | GET | `/v1/auth/email/verify/{id}/{hash}` | Signed URL | Verify email | | POST | `/v1/auth/password/forgot` | No | Request reset email (anti-enumeration response) | @@ -90,6 +102,7 @@ Register: curl -X POST http://127.0.0.1:8000/v1/auth/register \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ + -H "Idempotency-Key: $(uuidgen)" \ -d '{ "name": "Jane Doe", "email": "jane@example.com", @@ -119,22 +132,36 @@ curl http://127.0.0.1:8000/v1/auth/me \ -H "Authorization: Bearer " ``` -Localized response (Spanish): +Localized error (Spanish): ```bash -curl -X POST http://127.0.0.1:8000/v1/auth/password/forgot \ - -H "Accept: application/json" \ - -H "Accept-Language: es" \ - -H "Content-Type: application/json" \ - -d '{"email":"unknown@example.com"}' +curl -i http://127.0.0.1:8000/v1/auth/me \ + -H "Accept-Language: es" +``` + +```http +HTTP/1.1 401 Unauthorized +Content-Type: application/problem+json +Content-Language: es +WWW-Authenticate: Bearer + +{"type":"https://apiguide.dev/errors/unauthorized","title":"Unauthorized","status":401,"detail":"No autenticado.","instance":"urn:uuid:0199e7f4-5d2a-7c3e-9b1a-4f2d8e6c1a07"} ``` ## Response Design -- `UserResource` uses Laravel JSON:API resource format (`application/vnd.api+json`) -- Message/error JSON responses use `new JsonResponse([...])` for explicitness -- Validation and auth errors are normalized in global exception renderers -- API message strings are translated via `lang/en/api.php` and `lang/es/api.php` +- Resources are plain Laravel API resources (`application/json`), wrapped in `data` +- Errors are RFC 9457 problem details (`application/problem+json`), rendered by api-toolbox: + - `type` is an apiguide.dev URI that identifies the error, so clients branch on it rather than + on message text + - `detail` is the human-readable message, translated where Kit raised it + - validation errors keep Laravel's field messages under `errors` + - `instance` is the request ID, so a reported error leads straight to its log lines +- To raise a typed error of your own, see + [api-toolbox's Problem Details docs](https://github.com/JustSteveKing/api-toolbox#problem-details) + (`php artisan make:api-problem`) +- Write endpoints only accept `application/json` bodies (`consumes:application/json`); anything else + is a `415` that names the supported type ## Localization @@ -145,6 +172,11 @@ Locale resolution is API-first: - Response includes `Content-Language` - Unsupported locales fall back to `APP_FALLBACK_LOCALE` +Messages Kit raises itself, and Laravel's validation messages, are translated via +`lang/{en,es}/api.php` and `lang/{en,es}/validation.php`. Problems raised inside api-toolbox, such +as an idempotency conflict or an unsupported media type, have an English `detail`; their `type` is +what clients should key on. + Relevant config/env: - `APP_LOCALE` @@ -158,6 +190,7 @@ Relevant config/env: - Request validation lives in `app/Http/Requests/Auth` - DTO payload objects live in `app/Http/Payloads/V1` (final, readonly) - Entity output lives in API resources (`app/Http/Resources`) +- HTTP standards are switched on in `config/api-toolbox.php`, one feature per standard ## Security Defaults @@ -172,27 +205,57 @@ Relevant config/env: - Verification endpoints use signed URLs and throttling - Write endpoints enforce JSON payloads (`application/json`) - API responses include baseline hardening headers (`nosniff`, `DENY`, `no-referrer`) -- API responses include an `X-Request-Id` header (propagated or generated) +- Every request gets an `X-Request-Id` (kept from a proxy when well-formed, otherwise a UUIDv7), + and joins or starts a W3C trace (`traceparent`); both land in the log context - Security-sensitive auth/token actions emit structured `security.audit` log events -- Critical write endpoints support `Idempotency-Key` replay/conflict handling - Configurable transport hardening for HTTPS enforcement, HSTS, trusted proxies/hosts, and strict CORS origins -## Sunset Middleware (Endpoint Deprecation) +## Idempotency + +`POST /v1/auth/register` and `POST /v1/auth/password/forgot` honour an `Idempotency-Key` header, +following [draft-ietf-httpapi-idempotency-key-header](https://datatracker.ietf.org/doc/draft-ietf-httpapi-idempotency-key-header/): -`App\Http\Middleware\Sunset` adds deprecation metadata and can enforce retirement. +| Situation | Response | +| --- | --- | +| Retry with the same key and payload | The original response, replayed without running again | +| Same key, different payload | `422`, `https://apiguide.dev/errors/idempotency-key-conflict` | +| Retry while the first request is still running | `409` with `Retry-After` | +| Malformed key | `400` | -Usage: +Keys are scoped to the user or client address and kept for `IDEMPOTENCY_TTL` seconds (default +`86400`). Add `->middleware('idempotent')` to other writes, or `idempotent:required` to make the key +mandatory. + +## Deprecation and Sunset + +Mark a controller, or one action, with api-toolbox's attributes: ```php -Route::middleware('sunset:2030-01-01,https://api.example.com/v2/auth/login,true') - ->post('/v1/auth/login', LoginController::class); +use JustSteveKing\Toolbox\Deprecation\Attributes\Deprecation; +use JustSteveKing\Toolbox\Deprecation\Attributes\Sunset; + +#[Deprecation(at: '2030-01-01T00:00:00Z', link: 'https://docs.example.com/deprecations/login-v1')] +#[Sunset(at: '2030-07-01T00:00:00Z', link: 'https://docs.example.com/sunset-policy')] +final class LoginController +{ + // ... +} ``` -Behavior: +Behaviour: + +- Adds `Deprecation` ([RFC 9745](https://www.rfc-editor.org/rfc/rfc9745)) and `Sunset` + ([RFC 8594](https://www.rfc-editor.org/rfc/rfc8594)) headers, with `rel="deprecation"` and + `rel="sunset"` links +- Once the sunset date has passed, `RetireSunsetEndpoints` answers `410 Gone` as problem details, + still carrying both headers + +## Pagination and Caching -- Adds `Deprecation` and `Sunset` headers -- Adds `Link: <...>; rel="successor-version"` when successor URL is valid -- Can return `410 Gone` after sunset date when enforcement is enabled +- `GET /v1/auth/tokens` returns a page of tokens as the body, with navigation in `Link` headers + (`rel="next"`, `rel="prev"`, `rel="first"`). A cursor that cannot be decoded is a `400` +- `GET /v1/auth/me` sends an `ETag`; repeat the request with `If-None-Match` and an unchanged user + gets `304 Not Modified` ## API Documentation (Scribe + OpenAPI) @@ -200,7 +263,9 @@ Scribe is configured for this no-prefix API shape: - Route matching uses `v1/*` prefixes (`config/scribe.php`) - Endpoints are documented via PHP attributes -- OpenAPI output is generated to `public/docs/openapi.yaml` +- Error responses are documented as `application/problem+json` (`App\Support\ProblemDetailsOpenApiGenerator`) +- OpenAPI output is generated to `public/docs/openapi.yaml`, and advertised from the API catalog at + `/.well-known/api-catalog` Generate docs/spec: @@ -240,16 +305,25 @@ Feature tests include: - Token/auth flows - Email verification and password reset workflows - Security and unhappy-path scenarios -- Localization behavior -- Sunset middleware behavior -- OpenAPI generation and contract verification +- Localization behaviour +- Idempotency, deprecation, pagination and conditional requests +- OpenAPI generation and contract verification, including each response's media type + +api-toolbox's assertions (`assertProblem`, `assertIdempotentReplay`, `assertDeprecated`, +`assertLinkHeader` and others) are available on every test response. + +## AI Agents + +Kit ships [Laravel Boost](https://laravel.com/docs/boost) guidelines in `CLAUDE.md`, with +api-toolbox's guideline and `api-toolbox-development` skill opted in through `boost.json`. Run +`php artisan boost:update` after upgrading packages. ## CI & Dependency Automation GitHub Actions workflows: - `.github/workflows/ci-tests.yml` - - Runs tests on every push and pull request + - Runs Pint, PHPStan and the test suite on every push and pull request - `.github/workflows/dependency-updates.yml` - Runs daily at `03:00 UTC` - Executes `composer update` @@ -269,6 +343,7 @@ app/ Payloads/V1/ Requests/Auth/ Resources/ + Support/ routes/ api/ routes.php @@ -276,8 +351,10 @@ routes/ tests/ Feature/ config/ + api-toolbox.php sanctum.php scribe.php + security.php .github/ workflows/ ``` diff --git a/database/factories/UserFactory.php b/database/factories/UserFactory.php index 3965b07..65f55b2 100644 --- a/database/factories/UserFactory.php +++ b/database/factories/UserFactory.php @@ -18,6 +18,7 @@ final class UserFactory extends Factory public function definition(): array { return [ + 'id' => mb_strtolower((string) Str::ulid()), 'name' => $this->faker->name(), 'email' => $this->faker->unique()->safeEmail(), 'email_verified_at' => now(), diff --git a/public/docs/collection.json b/public/docs/collection.json index 8665a14..53adf14 100644 --- a/public/docs/collection.json +++ b/public/docs/collection.json @@ -10,7 +10,7 @@ ], "info": { "name": "Laravel API Documentation", - "_postman_id": "e43ed198-f671-4fbc-ae39-dee220c5f00c", + "_postman_id": "04d9ea9c-2ec0-4918-b1b2-bd41cac39b49", "description": "", "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json" }, @@ -56,7 +56,7 @@ { "header": [], "code": 201, - "body": "{\"data\":{\"id\":null,\"name\":\"Justina Gaylord\",\"email\":\"lafayette.considine@example.com\",\"email_verified_at\":\"2026-10-20T09:27:05+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", + "body": "{\"data\":{\"id\":\"01m5cabemn2cm9prm9w320yt4q\",\"name\":\"Justina Gaylord\",\"email\":\"lafayette.considine@example.com\",\"email_verified_at\":\"2026-10-20T09:30:18+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", "name": "Registration succeeded." }, { @@ -100,7 +100,7 @@ { "header": [], "code": 200, - "body": "{\"data\":{\"id\":null,\"name\":\"Justina Gaylord\",\"email\":\"cormier.nick@example.com\",\"email_verified_at\":\"2026-10-20T09:27:05+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", + "body": "{\"data\":{\"id\":\"01m5cabemyjecmhz93hcdyk7dx\",\"name\":\"Justina Gaylord\",\"email\":\"cormier.nick@example.com\",\"email_verified_at\":\"2026-10-20T09:30:18+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", "name": "Login succeeded." }, { @@ -138,7 +138,7 @@ { "header": [], "code": 200, - "body": "{\"data\":{\"id\":null,\"name\":\"Morgan Hirthe\",\"email\":\"dare.emelie@example.com\",\"email_verified_at\":\"2026-10-20T09:27:05+00:00\",\"created_at\":null,\"updated_at\":null}}", + "body": "{\"data\":{\"id\":\"01m5cabenn157bw78h9dvpqs63\",\"name\":\"Morgan Hirthe\",\"email\":\"dare.emelie@example.com\",\"email_verified_at\":\"2026-10-20T09:30:18+00:00\",\"created_at\":null,\"updated_at\":null}}", "name": "Authenticated user profile." }, { diff --git a/public/docs/index.html b/public/docs/index.html index d5e6236..2d2e5e2 100644 --- a/public/docs/index.html +++ b/public/docs/index.html @@ -217,10 +217,10 @@

Register

{ "data": { - "id": null, + "id": "01m5cabemn2cm9prm9w320yt4q", "name": "Justina Gaylord", "email": "lafayette.considine@example.com", - "email_verified_at": "2026-10-20T09:27:05+00:00", + "email_verified_at": "2026-10-20T09:30:18+00:00", "created_at": null, "updated_at": null }, @@ -427,10 +427,10 @@

Login

{ "data": { - "id": null, + "id": "01m5cabemyjecmhz93hcdyk7dx", "name": "Justina Gaylord", "email": "cormier.nick@example.com", - "email_verified_at": "2026-10-20T09:27:05+00:00", + "email_verified_at": "2026-10-20T09:30:18+00:00", "created_at": null, "updated_at": null }, @@ -615,10 +615,10 @@

Get Current User

{ "data": { - "id": null, + "id": "01m5cabenn157bw78h9dvpqs63", "name": "Morgan Hirthe", "email": "dare.emelie@example.com", - "email_verified_at": "2026-10-20T09:27:05+00:00", + "email_verified_at": "2026-10-20T09:30:18+00:00", "created_at": null, "updated_at": null } diff --git a/public/docs/openapi.yaml b/public/docs/openapi.yaml index 737193c..476837e 100644 --- a/public/docs/openapi.yaml +++ b/public/docs/openapi.yaml @@ -35,10 +35,10 @@ paths: type: object example: data: - id: null + id: 01m5cabemn2cm9prm9w320yt4q name: 'Justina Gaylord' email: lafayette.considine@example.com - email_verified_at: '2026-10-20T09:27:05+00:00' + email_verified_at: '2026-10-20T09:30:18+00:00' created_at: null updated_at: null meta: @@ -51,8 +51,7 @@ paths: properties: id: type: string - example: null - nullable: true + example: 01m5cabemn2cm9prm9w320yt4q name: type: string example: 'Justina Gaylord' @@ -61,7 +60,7 @@ paths: example: lafayette.considine@example.com email_verified_at: type: string - example: '2026-10-20T09:27:05+00:00' + example: '2026-10-20T09:30:18+00:00' created_at: type: string example: null @@ -164,10 +163,10 @@ paths: type: object example: data: - id: null + id: 01m5cabemyjecmhz93hcdyk7dx name: 'Justina Gaylord' email: cormier.nick@example.com - email_verified_at: '2026-10-20T09:27:05+00:00' + email_verified_at: '2026-10-20T09:30:18+00:00' created_at: null updated_at: null meta: @@ -180,8 +179,7 @@ paths: properties: id: type: string - example: null - nullable: true + example: 01m5cabemyjecmhz93hcdyk7dx name: type: string example: 'Justina Gaylord' @@ -190,7 +188,7 @@ paths: example: cormier.nick@example.com email_verified_at: type: string - example: '2026-10-20T09:27:05+00:00' + example: '2026-10-20T09:30:18+00:00' created_at: type: string example: null @@ -554,10 +552,10 @@ paths: type: object example: data: - id: null + id: 01m5cabenn157bw78h9dvpqs63 name: 'Morgan Hirthe' email: dare.emelie@example.com - email_verified_at: '2026-10-20T09:27:05+00:00' + email_verified_at: '2026-10-20T09:30:18+00:00' created_at: null updated_at: null properties: @@ -566,8 +564,7 @@ paths: properties: id: type: string - example: null - nullable: true + example: 01m5cabenn157bw78h9dvpqs63 name: type: string example: 'Morgan Hirthe' @@ -576,7 +573,7 @@ paths: example: dare.emelie@example.com email_verified_at: type: string - example: '2026-10-20T09:27:05+00:00' + example: '2026-10-20T09:30:18+00:00' created_at: type: string example: null diff --git a/tests/Feature/ApiCatalogTest.php b/tests/Feature/ApiCatalogTest.php new file mode 100644 index 0000000..fec3694 --- /dev/null +++ b/tests/Feature/ApiCatalogTest.php @@ -0,0 +1,12 @@ +get('/.well-known/api-catalog') + ->assertOk() + ->assertApiCatalog(url('/v1')); + + expect($response->json('linkset.1.anchor'))->toBe(url('/v1')); + expect($response->json('linkset.1.service-desc.0.href'))->toBe(url('/docs/openapi.yaml')); +}); From ddc2169e716ffffef8a3697ca32b109495806131 Mon Sep 17 00:00:00 2001 From: Steve McDougall Date: Tue, 20 Oct 2026 10:31:46 +0100 Subject: [PATCH 07/10] ci: create .env before composer install, ignore test idempotency keys Composer's post-autoload-dump boots the app, which with no .env runs as production and fails ProductionSecurityChecks. ci-tests has failed on main for this reason since the checks landed. Gitleaks reads two Idempotency-Key fixtures in IdempotencyKeyTest as generic API keys; their fingerprints go in .gitleaksignore. --- .github/workflows/ci-tests.yml | 11 +++++++---- .gitleaksignore | 3 +++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .gitleaksignore diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index a85869b..ac54357 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -23,13 +23,16 @@ jobs: extensions: mbstring, dom, curl, sqlite3, pdo_sqlite coverage: none + # Before install: Composer's post-autoload-dump boots the app, which without a .env runs as + # production and fails ProductionSecurityChecks. + - name: Prepare environment + run: cp .env.example .env + - name: Install dependencies run: composer install --no-interaction --no-progress --prefer-dist - - name: Prepare app key - run: | - cp .env.example .env - php artisan key:generate + - name: Generate app key + run: php artisan key:generate - name: Check code style run: composer lint diff --git a/.gitleaksignore b/.gitleaksignore new file mode 100644 index 0000000..020154e --- /dev/null +++ b/.gitleaksignore @@ -0,0 +1,3 @@ +# Idempotency-Key fixtures in tests, not secrets. +7659aa0276ef1b02f5fdb900f2353e64c59273b2:tests/Feature/IdempotencyKeyTest.php:generic-api-key:41 +7659aa0276ef1b02f5fdb900f2353e64c59273b2:tests/Feature/IdempotencyKeyTest.php:generic-api-key:45 From 2e9a13be547d61bf14e1fb69a4a8e64c029febf7 Mon Sep 17 00:00:00 2001 From: Steve McDougall Date: Tue, 20 Oct 2026 10:35:22 +0100 Subject: [PATCH 08/10] chore: remove Gemini guidance Boost 2.10 no longer writes Gemini guidance, so GEMINI.md and .gemini/settings.json were stuck describing Laravel 12. Gemini comes out of boost.json's agents so a reinstall does not bring them back. --- .gemini/settings.json | 11 --- GEMINI.md | 186 ------------------------------------------ boost.json | 3 +- 3 files changed, 1 insertion(+), 199 deletions(-) delete mode 100644 .gemini/settings.json delete mode 100644 GEMINI.md diff --git a/.gemini/settings.json b/.gemini/settings.json deleted file mode 100644 index 8c6715a..0000000 --- a/.gemini/settings.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "mcpServers": { - "laravel-boost": { - "command": "php", - "args": [ - "artisan", - "boost:mcp" - ] - } - } -} \ No newline at end of file diff --git a/GEMINI.md b/GEMINI.md deleted file mode 100644 index da64d23..0000000 --- a/GEMINI.md +++ /dev/null @@ -1,186 +0,0 @@ - -=== foundation rules === - -# Laravel Boost Guidelines - -The Laravel Boost guidelines are specifically curated by Laravel maintainers for this application. These guidelines should be followed closely to ensure the best experience when building Laravel applications. - -## Foundational Context - -This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions. - -- php - 8.5 -- laravel/framework (LARAVEL) - v12 -- laravel/prompts (PROMPTS) - v0 -- laravel/sanctum (SANCTUM) - v4 -- larastan/larastan (LARASTAN) - v3 -- laravel/boost (BOOST) - v2 -- laravel/mcp (MCP) - v0 -- laravel/pail (PAIL) - v1 -- laravel/pint (PINT) - v1 -- pestphp/pest (PEST) - v4 -- phpunit/phpunit (PHPUNIT) - v12 -- rector/rector (RECTOR) - v2 - -## Skills Activation - -This project has domain-specific skills available. You MUST activate the relevant skill whenever you work in that domain—don't wait until you're stuck. - -- `laravel-best-practices` — Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization and security patterns, validation, error handling, queue and job configuration, route definitions, and architectural decisions. Also use for Laravel code reviews and refactoring existing Laravel code to follow best practices. Covers any task involving Laravel backend PHP code patterns. -- `pest-testing` — Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to write something in Pest, mentions test files or directories (tests/Feature, tests/Unit, tests/Browser), or needs browser testing, smoke testing multiple pages for JS errors, or architecture tests. Covers: it()/expect() syntax, datasets, mocking, browser testing (visit/click/fill), smoke testing, arch(), Livewire component tests, RefreshDatabase, and all Pest 4 features. Do not use for factories, seeders, migrations, controllers, models, or non-test PHP code. - -## Conventions - -- You must follow all existing code conventions used in this application. When creating or editing a file, check sibling files for the correct structure, approach, and naming. -- Use descriptive names for variables and methods. For example, `isRegisteredForDiscounts`, not `discount()`. -- Check for existing components to reuse before writing a new one. - -## Verification Scripts - -- Do not create verification scripts or tinker when tests cover that functionality and prove they work. Unit and feature tests are more important. - -## Application Structure & Architecture - -- Stick to existing directory structure; don't create new base folders without approval. -- Do not change the application's dependencies without approval. - -## Frontend Bundling - -- If the user doesn't see a frontend change reflected in the UI, it could mean they need to run `npm run build`, `npm run dev`, or `composer run dev`. Ask them. - -## Documentation Files - -- You must only create documentation files if explicitly requested by the user. - -## Replies - -- Be concise in your explanations - focus on what's important rather than explaining obvious details. - -=== boost rules === - -# Laravel Boost - -## Tools - -- Laravel Boost is an MCP server with tools designed specifically for this application. Prefer Boost tools over manual alternatives like shell commands or file reads. -- Use `database-query` to run read-only queries against the database instead of writing raw SQL in tinker. -- Use `database-schema` to inspect table structure before writing migrations or models. -- Use `get-absolute-url` to resolve the correct scheme, domain, and port for project URLs. Always use this before sharing a URL with the user. -- Use `browser-logs` to read browser logs, errors, and exceptions. Only recent logs are useful, ignore old entries. - -## Searching Documentation (IMPORTANT) - -- Always use `search-docs` before making code changes. Do not skip this step. It returns version-specific docs based on installed packages automatically. -- Pass a `packages` array to scope results when you know which packages are relevant. -- Use multiple broad, topic-based queries: `['rate limiting', 'routing rate limiting', 'routing']`. Expect the most relevant results first. -- Do not add package names to queries because package info is already shared. Use `test resource table`, not `filament 4 test resource table`. - -### Search Syntax - -1. Use words for auto-stemmed AND logic: `rate limit` matches both "rate" AND "limit". -2. Use `"quoted phrases"` for exact position matching: `"infinite scroll"` requires adjacent words in order. -3. Combine words and phrases for mixed queries: `middleware "rate limit"`. -4. Use multiple queries for OR logic: `queries=["authentication", "middleware"]`. - -## Artisan - -- Run Artisan commands directly via the command line (e.g., `php artisan route:list`). Use `php artisan list` to discover available commands and `php artisan [command] --help` to check parameters. -- Inspect routes with `php artisan route:list`. Filter with: `--method=GET`, `--name=users`, `--path=api`, `--except-vendor`, `--only-vendor`. -- Read configuration values using dot notation: `php artisan config:show app.name`, `php artisan config:show database.default`. Or read config files directly from the `config/` directory. -- To check environment variables, read the `.env` file directly. - -## Tinker - -- Execute PHP in app context for debugging and testing code. Do not create models without user approval, prefer tests with factories instead. Prefer existing Artisan commands over custom tinker code. -- Always use single quotes to prevent shell expansion: `php artisan tinker --execute 'Your::code();'` - - Double quotes for PHP strings inside: `php artisan tinker --execute 'User::where("active", true)->count();'` - -=== php rules === - -# PHP - -- Always use curly braces for control structures, even for single-line bodies. -- Use PHP 8 constructor property promotion: `public function __construct(public GitHub $github) { }`. Do not leave empty zero-parameter `__construct()` methods unless the constructor is private. -- Use explicit return type declarations and type hints for all method parameters: `function isAccessible(User $user, ?string $path = null): bool` -- Use TitleCase for Enum keys: `FavoritePerson`, `BestLake`, `Monthly`. -- Prefer PHPDoc blocks over inline comments. Only add inline comments for exceptionally complex logic. -- Use array shape type definitions in PHPDoc blocks. - -=== tests rules === - -# Test Enforcement - -- Every change must be programmatically tested. Write a new test or update an existing test, then run the affected tests to make sure they pass. -- Run the minimum number of tests needed to ensure code quality and speed. Use `php artisan test --compact` with a specific filename or filter. - -=== laravel/core rules === - -# Do Things the Laravel Way - -- Use `php artisan make:` commands to create new files (i.e. migrations, controllers, models, etc.). You can list available Artisan commands using `php artisan list` and check their parameters with `php artisan [command] --help`. -- If you're creating a generic PHP class, use `php artisan make:class`. -- Pass `--no-interaction` to all Artisan commands to ensure they work without user input. You should also pass the correct `--options` to ensure correct behavior. - -### Model Creation - -- When creating new models, create useful factories and seeders for them too. Ask the user if they need any other things, using `php artisan make:model --help` to check the available options. - -## APIs & Eloquent Resources - -- For APIs, default to using Eloquent API Resources and API versioning unless existing API routes do not, then you should follow existing application convention. - -## URL Generation - -- When generating links to other pages, prefer named routes and the `route()` function. - -## Testing - -- When creating models for tests, use the factories for the models. Check if the factory has custom states that can be used before manually setting up the model. -- Faker: Use methods such as `$this->faker->word()` or `fake()->randomDigit()`. Follow existing conventions whether to use `$this->faker` or `fake()`. -- When creating tests, make use of `php artisan make:test [options] {name}` to create a feature test, and pass `--unit` to create a unit test. Most tests should be feature tests. - -## Vite Error - -- If you receive an "Illuminate\Foundation\ViteException: Unable to locate file in Vite manifest" error, you can run `npm run build` or ask the user to run `npm run dev` or `composer run dev`. - -=== laravel/v12 rules === - -# Laravel 12 - -- CRITICAL: ALWAYS use `search-docs` tool for version-specific Laravel documentation and updated code examples. -- Since Laravel 11, Laravel has a new streamlined file structure which this project uses. - -## Laravel 12 Structure - -- In Laravel 12, middleware are no longer registered in `app/Http/Kernel.php`. -- Middleware are configured declaratively in `bootstrap/app.php` using `Application::configure()->withMiddleware()`. -- `bootstrap/app.php` is the file to register middleware, exceptions, and routing files. -- `bootstrap/providers.php` contains application specific service providers. -- The `app/Console/Kernel.php` file no longer exists; use `bootstrap/app.php` or `routes/console.php` for console configuration. -- Console commands in `app/Console/Commands/` are automatically available and do not require manual registration. - -## Database - -- When modifying a column, the migration must include all of the attributes that were previously defined on the column. Otherwise, they will be dropped and lost. -- Laravel 12 allows limiting eagerly loaded records natively, without external packages: `$query->latest()->limit(10);`. - -### Models - -- Casts can and likely should be set in a `casts()` method on a model rather than the `$casts` property. Follow existing conventions from other models. - -=== pint/core rules === - -# Laravel Pint Code Formatter - -- If you have modified any PHP files, you must run `vendor/bin/pint --dirty --format agent` before finalizing changes to ensure your code matches the project's expected style. -- Do not run `vendor/bin/pint --test --format agent`, simply run `vendor/bin/pint --format agent` to fix any formatting issues. - -=== pest/core rules === - -## Pest - -- This project uses Pest for testing. Create tests: `php artisan make:test --pest {name}`. -- Run tests: `php artisan test --compact` or filter: `php artisan test --compact --filter=testName`. -- Do NOT delete tests without approval. - - diff --git a/boost.json b/boost.json index 95600cf..b9eeb74 100644 --- a/boost.json +++ b/boost.json @@ -1,7 +1,6 @@ { "agents": [ - "claude_code", - "gemini" + "claude_code" ], "cloud": false, "guidelines": true, From bed2adcca09f24e4e7822a6d4189d05f47bb13b9 Mon Sep 17 00:00:00 2001 From: Steve McDougall Date: Tue, 20 Oct 2026 10:45:21 +0100 Subject: [PATCH 09/10] feat: translate api-toolbox problems with api-toolbox 0.3 api-toolbox 0.3.0 reads the details of the problems it raises through the translator, so Kit adds Spanish for every one of them in lang/vendor/api-toolbox/es. The idempotency conflict and 415 tests assert the Spanish detail again, and a test fails if a package upgrade adds a line the Spanish file lacks. 0.3.0 also types CursorPage over the paginator's key and value, so the PHPStan ignore in ListTokensController goes. --- .scribe/endpoints.cache/00.yaml | 6 +- .scribe/endpoints/00.yaml | 6 +- README.md | 14 ++-- .../Api/V1/Auth/ListTokensController.php | 7 +- composer.json | 2 +- composer.lock | 14 ++-- lang/vendor/api-toolbox/es/problems.php | 69 +++++++++++++++++++ public/docs/collection.json | 8 +-- public/docs/index.html | 12 ++-- public/docs/openapi.yaml | 24 +++---- tests/Feature/ApiSecurityHardeningTest.php | 8 ++- tests/Feature/IdempotencyKeyTest.php | 6 +- tests/Feature/LocalizationTest.php | 8 +++ 13 files changed, 137 insertions(+), 47 deletions(-) create mode 100644 lang/vendor/api-toolbox/es/problems.php diff --git a/.scribe/endpoints.cache/00.yaml b/.scribe/endpoints.cache/00.yaml index d27d0a4..0e5b8af 100644 --- a/.scribe/endpoints.cache/00.yaml +++ b/.scribe/endpoints.cache/00.yaml @@ -80,7 +80,7 @@ endpoints: - custom: [] status: 201 - content: '{"data":{"id":"01m5cabemn2cm9prm9w320yt4q","name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:30:18+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"01m5cb6hssde51qe3kn813thmv","name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:45:06+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Registration succeeded.' - @@ -159,7 +159,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"01m5cabemyjecmhz93hcdyk7dx","name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:30:18+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"01m5cb6ht2em5q96y8t1rffqv6","name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:45:06+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Login succeeded.' - @@ -519,7 +519,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"01m5cabenn157bw78h9dvpqs63","name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:30:18+00:00","created_at":null,"updated_at":null}}' + content: '{"data":{"id":"01m5cb6htrjmdsahn6h774frrz","name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:45:06+00:00","created_at":null,"updated_at":null}}' headers: [] description: 'Authenticated user profile.' - diff --git a/.scribe/endpoints/00.yaml b/.scribe/endpoints/00.yaml index a2bb724..7c11609 100644 --- a/.scribe/endpoints/00.yaml +++ b/.scribe/endpoints/00.yaml @@ -78,7 +78,7 @@ endpoints: - custom: [] status: 201 - content: '{"data":{"id":"01m5cabemn2cm9prm9w320yt4q","name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:30:18+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"01m5cb6hssde51qe3kn813thmv","name":"Justina Gaylord","email":"lafayette.considine@example.com","email_verified_at":"2026-10-20T09:45:06+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Registration succeeded.' - @@ -157,7 +157,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"01m5cabemyjecmhz93hcdyk7dx","name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:30:18+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' + content: '{"data":{"id":"01m5cb6ht2em5q96y8t1rffqv6","name":"Justina Gaylord","email":"cormier.nick@example.com","email_verified_at":"2026-10-20T09:45:06+00:00","created_at":null,"updated_at":null},"meta":{"token":"1|example-token","token_type":"Bearer","expires_at":null}}' headers: [] description: 'Login succeeded.' - @@ -517,7 +517,7 @@ endpoints: - custom: [] status: 200 - content: '{"data":{"id":"01m5cabenn157bw78h9dvpqs63","name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:30:18+00:00","created_at":null,"updated_at":null}}' + content: '{"data":{"id":"01m5cb6htrjmdsahn6h774frrz","name":"Morgan Hirthe","email":"dare.emelie@example.com","email_verified_at":"2026-10-20T09:45:06+00:00","created_at":null,"updated_at":null}}' headers: [] description: 'Authenticated user profile.' - diff --git a/README.md b/README.md index 7046710..b1c9b8e 100644 --- a/README.md +++ b/README.md @@ -172,10 +172,16 @@ Locale resolution is API-first: - Response includes `Content-Language` - Unsupported locales fall back to `APP_FALLBACK_LOCALE` -Messages Kit raises itself, and Laravel's validation messages, are translated via -`lang/{en,es}/api.php` and `lang/{en,es}/validation.php`. Problems raised inside api-toolbox, such -as an idempotency conflict or an unsupported media type, have an English `detail`; their `type` is -what clients should key on. +Every problem's `detail` is translated; its `type` and `title` stay the same in every language, +so clients key on the `type`: + +- Messages Kit raises itself, and Laravel's validation messages: `lang/{en,es}/api.php` and + `lang/{en,es}/validation.php` +- Problems api-toolbox raises, such as an idempotency conflict or an unsupported media type: + English ships with the package, Spanish is in `lang/vendor/api-toolbox/es/problems.php`. A test + fails if a package upgrade adds a line the Spanish file does not have + +To add a language, add it to `APP_SUPPORTED_LOCALES` and give it each of those files. Relevant config/env: diff --git a/app/Http/Controllers/Api/V1/Auth/ListTokensController.php b/app/Http/Controllers/Api/V1/Auth/ListTokensController.php index 1fdf1c8..fca2934 100644 --- a/app/Http/Controllers/Api/V1/Auth/ListTokensController.php +++ b/app/Http/Controllers/Api/V1/Auth/ListTokensController.php @@ -16,6 +16,7 @@ use Knuckles\Scribe\Attributes\QueryParam; use Knuckles\Scribe\Attributes\Response; use Knuckles\Scribe\Attributes\Subgroup; +use Laravel\Sanctum\PersonalAccessToken; #[Group(name: 'Authentication')] #[Subgroup(name: 'Token Authentication')] @@ -60,6 +61,9 @@ final class ListTokensController { public const int PER_PAGE = 25; + /** + * @return CursorPage + */ public function __invoke(Request $request, #[CurrentUser] User $user): CursorPage { $tokens = $user->tokens() @@ -71,9 +75,6 @@ public function __invoke(Request $request, #[CurrentUser] User $user): CursorPag 'count' => count($tokens->items()), ]); - // CursorPage::of() asks for CursorPaginator, which no paginator with int - // keys can satisfy because TKey is invariant. Remove once api-toolbox widens the type. - // @phpstan-ignore argument.type return CursorPage::of($tokens, PersonalAccessTokenResource::class); } } diff --git a/composer.json b/composer.json index d033f8a..5e4d9b2 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "license": "MIT", "require": { "php": "^8.5", - "juststeveking/api-toolbox": "^0.2", + "juststeveking/api-toolbox": "^0.3", "laravel/framework": "^13.30", "laravel/sanctum": "^4.3", "laravel/tinker": "^3.0", diff --git a/composer.lock b/composer.lock index d26b3dc..6bf4ebb 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "03747733f6409bed0295c502afdc1d22", + "content-hash": "73d58616bb102b251cd068c45e4c482c", "packages": [ { "name": "brick/math", @@ -1061,16 +1061,16 @@ }, { "name": "juststeveking/api-toolbox", - "version": "v0.2.0", + "version": "v0.3.0", "source": { "type": "git", "url": "https://github.com/JustSteveKing/api-toolbox.git", - "reference": "a4f6ee4382450414232f58ff05aab701e212872a" + "reference": "7917bf194ff02829280b0a7e07aca3f5d8c3002a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JustSteveKing/api-toolbox/zipball/a4f6ee4382450414232f58ff05aab701e212872a", - "reference": "a4f6ee4382450414232f58ff05aab701e212872a", + "url": "https://api.github.com/repos/JustSteveKing/api-toolbox/zipball/7917bf194ff02829280b0a7e07aca3f5d8c3002a", + "reference": "7917bf194ff02829280b0a7e07aca3f5d8c3002a", "shasum": "" }, "require": { @@ -1121,9 +1121,9 @@ ], "support": { "issues": "https://github.com/JustSteveKing/api-toolbox/issues", - "source": "https://github.com/JustSteveKing/api-toolbox/tree/v0.2.0" + "source": "https://github.com/JustSteveKing/api-toolbox/tree/v0.3.0" }, - "time": "2026-10-15T12:12:47+00:00" + "time": "2026-10-20T09:42:04+00:00" }, { "name": "laravel/framework", diff --git a/lang/vendor/api-toolbox/es/problems.php b/lang/vendor/api-toolbox/es/problems.php new file mode 100644 index 0000000..e1ff8a1 --- /dev/null +++ b/lang/vendor/api-toolbox/es/problems.php @@ -0,0 +1,69 @@ + [ + 'precondition_failed' => 'El recurso cambio desde la ultima vez que lo obtuviste. Vuelve a obtenerlo y reintenta con su ETag actual.', + 'precondition_required' => 'Esta solicitud debe ser condicional. Obten el recurso y reintenta con su ETag en If-Match.', + ], + + 'pagination' => [ + 'invalid_cursor' => 'No se pudo decodificar el parametro :parameter.', + ], + + 'idempotency' => [ + 'conflict' => 'Esta Idempotency-Key ya se uso con un payload diferente. Reenvia el payload original o usa una clave nueva para una solicitud nueva.', + 'in_flight' => 'Una solicitud con esta Idempotency-Key todavia se esta procesando. Reintenta la misma solicitud cuando termine.', + 'missing' => 'Esta operacion requiere una cabecera Idempotency-Key.', + 'malformed' => 'La cabecera Idempotency-Key debe ser una cadena de 1 a 255 caracteres ASCII visibles, como "8e03978e-40d5-43e8-bc93-6894a57f9324".', + ], + + 'negotiation' => [ + 'not_acceptable' => 'Este endpoint solo puede producir :types, que no coincide con la cabecera Accept.', + 'missing_content_type' => 'La solicitud tiene contenido pero no Content-Type. Tipos de contenido admitidos: :types.', + 'unsupported_media_type' => "El Content-Type ':type' no es compatible. Tipos de contenido admitidos: :types.", + ], + + 'async_operations' => [ + 'not_found' => 'No se conoce ninguna operacion con este ID.', + ], + + 'merge_patch' => [ + 'malformed' => 'No se pudo interpretar el merge patch como JSON: :reason.', + 'missing_content_type' => 'Un PATCH necesita un Content-Type :type.', + 'unsupported_type' => "El formato de patch ':received' no es compatible. Envia :type.", + ], + + 'digest' => [ + 'missing' => 'Esta solicitud necesita un campo Content-Digest o Repr-Digest.', + 'not_a_dictionary' => ':field no es un Dictionary de Structured Fields (RFC 9651, seccion 3.2).', + 'unsupported_algorithms' => 'Ninguno de los algoritmos de hash de la solicitud es compatible. Usa sha-256 o sha-512.', + 'invalid_values' => 'Un digest de la solicitud no puede provenir de su algoritmo de hash.', + 'mismatched_values' => 'Un digest de la solicitud no coincide con su contenido. Puede haberse modificado en transito.', + ], + + 'message_signatures' => [ + 'malformed' => 'Signature o Signature-Input no es un Dictionary valido: :error', + 'verification_failed' => 'No se pudo verificar la firma de la solicitud: :reason', + 'reasons' => [ + 'not_signed' => 'la solicitud no esta firmada.', + 'unknown_key' => 'ninguna firma usa una clave conocida.', + 'algorithm_mismatch' => 'el parametro alg no coincide con la clave.', + 'missing_tag' => 'la firma no lleva la etiqueta requerida.', + 'missing_nonce' => 'la firma no tiene nonce.', + 'not_covered' => 'la firma no cubre :component.', + 'unresolvable_component' => 'no se pudo resolver un componente cubierto.', + 'mismatch' => 'la firma no coincide.', + 'content_digest_mismatch' => 'Content-Digest no coincide con el contenido.', + 'missing_created' => 'la firma no tiene hora de creacion.', + 'created_in_future' => 'la firma se creo en el futuro.', + 'too_old' => 'la firma es demasiado antigua.', + 'expired' => 'la firma ha caducado.', + ], + ], +]; diff --git a/public/docs/collection.json b/public/docs/collection.json index 53adf14..b2d770e 100644 --- a/public/docs/collection.json +++ b/public/docs/collection.json @@ -10,7 +10,7 @@ ], "info": { "name": "Laravel API Documentation", - "_postman_id": "04d9ea9c-2ec0-4918-b1b2-bd41cac39b49", + "_postman_id": "b4c68cd2-a1c9-4855-bafb-771176ff6d3e", "description": "", "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json" }, @@ -56,7 +56,7 @@ { "header": [], "code": 201, - "body": "{\"data\":{\"id\":\"01m5cabemn2cm9prm9w320yt4q\",\"name\":\"Justina Gaylord\",\"email\":\"lafayette.considine@example.com\",\"email_verified_at\":\"2026-10-20T09:30:18+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", + "body": "{\"data\":{\"id\":\"01m5cb6hssde51qe3kn813thmv\",\"name\":\"Justina Gaylord\",\"email\":\"lafayette.considine@example.com\",\"email_verified_at\":\"2026-10-20T09:45:06+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", "name": "Registration succeeded." }, { @@ -100,7 +100,7 @@ { "header": [], "code": 200, - "body": "{\"data\":{\"id\":\"01m5cabemyjecmhz93hcdyk7dx\",\"name\":\"Justina Gaylord\",\"email\":\"cormier.nick@example.com\",\"email_verified_at\":\"2026-10-20T09:30:18+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", + "body": "{\"data\":{\"id\":\"01m5cb6ht2em5q96y8t1rffqv6\",\"name\":\"Justina Gaylord\",\"email\":\"cormier.nick@example.com\",\"email_verified_at\":\"2026-10-20T09:45:06+00:00\",\"created_at\":null,\"updated_at\":null},\"meta\":{\"token\":\"1|example-token\",\"token_type\":\"Bearer\",\"expires_at\":null}}", "name": "Login succeeded." }, { @@ -138,7 +138,7 @@ { "header": [], "code": 200, - "body": "{\"data\":{\"id\":\"01m5cabenn157bw78h9dvpqs63\",\"name\":\"Morgan Hirthe\",\"email\":\"dare.emelie@example.com\",\"email_verified_at\":\"2026-10-20T09:30:18+00:00\",\"created_at\":null,\"updated_at\":null}}", + "body": "{\"data\":{\"id\":\"01m5cb6htrjmdsahn6h774frrz\",\"name\":\"Morgan Hirthe\",\"email\":\"dare.emelie@example.com\",\"email_verified_at\":\"2026-10-20T09:45:06+00:00\",\"created_at\":null,\"updated_at\":null}}", "name": "Authenticated user profile." }, { diff --git a/public/docs/index.html b/public/docs/index.html index 2d2e5e2..c70dec1 100644 --- a/public/docs/index.html +++ b/public/docs/index.html @@ -217,10 +217,10 @@

Register

{ "data": { - "id": "01m5cabemn2cm9prm9w320yt4q", + "id": "01m5cb6hssde51qe3kn813thmv", "name": "Justina Gaylord", "email": "lafayette.considine@example.com", - "email_verified_at": "2026-10-20T09:30:18+00:00", + "email_verified_at": "2026-10-20T09:45:06+00:00", "created_at": null, "updated_at": null }, @@ -427,10 +427,10 @@

Login

{ "data": { - "id": "01m5cabemyjecmhz93hcdyk7dx", + "id": "01m5cb6ht2em5q96y8t1rffqv6", "name": "Justina Gaylord", "email": "cormier.nick@example.com", - "email_verified_at": "2026-10-20T09:30:18+00:00", + "email_verified_at": "2026-10-20T09:45:06+00:00", "created_at": null, "updated_at": null }, @@ -615,10 +615,10 @@

Get Current User

{ "data": { - "id": "01m5cabenn157bw78h9dvpqs63", + "id": "01m5cb6htrjmdsahn6h774frrz", "name": "Morgan Hirthe", "email": "dare.emelie@example.com", - "email_verified_at": "2026-10-20T09:30:18+00:00", + "email_verified_at": "2026-10-20T09:45:06+00:00", "created_at": null, "updated_at": null } diff --git a/public/docs/openapi.yaml b/public/docs/openapi.yaml index 476837e..52384ee 100644 --- a/public/docs/openapi.yaml +++ b/public/docs/openapi.yaml @@ -35,10 +35,10 @@ paths: type: object example: data: - id: 01m5cabemn2cm9prm9w320yt4q + id: 01m5cb6hssde51qe3kn813thmv name: 'Justina Gaylord' email: lafayette.considine@example.com - email_verified_at: '2026-10-20T09:30:18+00:00' + email_verified_at: '2026-10-20T09:45:06+00:00' created_at: null updated_at: null meta: @@ -51,7 +51,7 @@ paths: properties: id: type: string - example: 01m5cabemn2cm9prm9w320yt4q + example: 01m5cb6hssde51qe3kn813thmv name: type: string example: 'Justina Gaylord' @@ -60,7 +60,7 @@ paths: example: lafayette.considine@example.com email_verified_at: type: string - example: '2026-10-20T09:30:18+00:00' + example: '2026-10-20T09:45:06+00:00' created_at: type: string example: null @@ -163,10 +163,10 @@ paths: type: object example: data: - id: 01m5cabemyjecmhz93hcdyk7dx + id: 01m5cb6ht2em5q96y8t1rffqv6 name: 'Justina Gaylord' email: cormier.nick@example.com - email_verified_at: '2026-10-20T09:30:18+00:00' + email_verified_at: '2026-10-20T09:45:06+00:00' created_at: null updated_at: null meta: @@ -179,7 +179,7 @@ paths: properties: id: type: string - example: 01m5cabemyjecmhz93hcdyk7dx + example: 01m5cb6ht2em5q96y8t1rffqv6 name: type: string example: 'Justina Gaylord' @@ -188,7 +188,7 @@ paths: example: cormier.nick@example.com email_verified_at: type: string - example: '2026-10-20T09:30:18+00:00' + example: '2026-10-20T09:45:06+00:00' created_at: type: string example: null @@ -552,10 +552,10 @@ paths: type: object example: data: - id: 01m5cabenn157bw78h9dvpqs63 + id: 01m5cb6htrjmdsahn6h774frrz name: 'Morgan Hirthe' email: dare.emelie@example.com - email_verified_at: '2026-10-20T09:30:18+00:00' + email_verified_at: '2026-10-20T09:45:06+00:00' created_at: null updated_at: null properties: @@ -564,7 +564,7 @@ paths: properties: id: type: string - example: 01m5cabenn157bw78h9dvpqs63 + example: 01m5cb6htrjmdsahn6h774frrz name: type: string example: 'Morgan Hirthe' @@ -573,7 +573,7 @@ paths: example: dare.emelie@example.com email_verified_at: type: string - example: '2026-10-20T09:30:18+00:00' + example: '2026-10-20T09:45:06+00:00' created_at: type: string example: null diff --git a/tests/Feature/ApiSecurityHardeningTest.php b/tests/Feature/ApiSecurityHardeningTest.php index 40d3fb1..934e49e 100644 --- a/tests/Feature/ApiSecurityHardeningTest.php +++ b/tests/Feature/ApiSecurityHardeningTest.php @@ -25,7 +25,7 @@ ->assertHeader('Accept', 'application/json'); }); -it('keeps the unsupported media type problem stable whatever the requested language', function (): void { +it('localizes unsupported media type problems', function (): void { User::factory()->create([ 'email' => 'non-json-es@example.com', 'password' => 'password123', @@ -37,7 +37,11 @@ 'device_name' => 'ios-app', ], ['HTTP_ACCEPT_LANGUAGE' => 'es']) ->assertProblemType('https://apiguide.dev/errors/unsupported-media-type', 415) - ->assertHeader('Content-Language', 'es'); + ->assertHeader('Content-Language', 'es') + ->assertJsonPath('detail', __('api-toolbox::problems.negotiation.unsupported_media_type', [ + 'type' => 'application/x-www-form-urlencoded', + 'types' => 'application/json', + ], 'es')); }); it('issues expiring sanctum tokens by default', function (): void { diff --git a/tests/Feature/IdempotencyKeyTest.php b/tests/Feature/IdempotencyKeyTest.php index 02271f2..6b29063 100644 --- a/tests/Feature/IdempotencyKeyTest.php +++ b/tests/Feature/IdempotencyKeyTest.php @@ -104,7 +104,7 @@ ->assertProblem(400); }); -it('keeps the conflict type stable whatever the requested language', function (): void { +it('localizes idempotency conflict problems', function (): void { $headers = ['Idempotency-Key' => 'register-key-es']; $this->withHeaders($headers) @@ -126,5 +126,7 @@ 'device_name' => 'ios-app', ]) ->assertProblemType('https://apiguide.dev/errors/idempotency-key-conflict', 422) - ->assertHeader('Content-Language', 'es'); + ->assertHeader('Content-Language', 'es') + ->assertJsonPath('title', 'Idempotency Key Conflict') + ->assertJsonPath('detail', __('api-toolbox::problems.idempotency.conflict', [], 'es')); }); diff --git a/tests/Feature/LocalizationTest.php b/tests/Feature/LocalizationTest.php index 9a6a762..45f5f2a 100644 --- a/tests/Feature/LocalizationTest.php +++ b/tests/Feature/LocalizationTest.php @@ -5,6 +5,7 @@ use App\Models\User; use Illuminate\Foundation\Testing\RefreshDatabase; use Illuminate\Http\JsonResponse; +use Illuminate\Support\Arr; use Illuminate\Support\Facades\Route; use Illuminate\Support\Facades\URL; use Illuminate\Support\Str; @@ -97,6 +98,13 @@ ->assertJsonPath('detail', __('api.sunset.endpoint_unavailable', [], 'es')); }); +it('translates every problem detail api-toolbox can raise', function (): void { + $english = require base_path('vendor/juststeveking/api-toolbox/resources/lang/en/problems.php'); + $spanish = require lang_path('vendor/api-toolbox/es/problems.php'); + + expect(array_keys(Arr::dot($spanish)))->toEqualCanonicalizing(array_keys(Arr::dot($english))); +}); + #[Sunset(at: '2000-01-01T00:00:00Z')] final class LocalizedRetiredEndpoint { From 0cced3c73a991f717d40abcf47f80ef8fad33aca Mon Sep 17 00:00:00 2001 From: Steve McDougall Date: Tue, 20 Oct 2026 10:51:11 +0100 Subject: [PATCH 10/10] feat: audit dependencies with Laravel Vet composer audit only knows published advisories, so a freshly compromised release passes it and the dependency bot would open a PR for it. Laravel Vet closes that gap as a Composer plugin: - vet.json records what has been read; composer install fails on anything else, including a version re-published with other files. - minimum-release-age holds back every release younger than 7 days. juststeveking/* and roave/security-advisories are excluded: the first are first-party, the second has to be current to protect anything. The baseline is today's lock moved back to releases at least a week old, which is why fourteen packages step down a patch or minor (laravel/framework 13.37.0 to 13.35.0, guzzle 8.3.0 to 8.2.0). The dependency bot moves to weekly. Vet refuses the update it writes, so the workflow tolerates that, installs the new lock without the plugin, and puts Vet's report in the PR body. The PR passes CI once vet.json is updated on its branch. --- .github/workflows/dependency-updates.yml | 42 +- README.md | 31 +- composer.json | 4 +- composer.lock | 338 ++++++------- vet.json | 611 +++++++++++++++++++++++ 5 files changed, 841 insertions(+), 185 deletions(-) create mode 100644 vet.json diff --git a/.github/workflows/dependency-updates.yml b/.github/workflows/dependency-updates.yml index d3edce6..3447fb5 100644 --- a/.github/workflows/dependency-updates.yml +++ b/.github/workflows/dependency-updates.yml @@ -2,7 +2,7 @@ name: dependency-updates on: schedule: - - cron: '0 3 * * *' + - cron: '0 3 * * 1' workflow_dispatch: permissions: @@ -24,18 +24,46 @@ jobs: tools: composer:v2 coverage: none + - name: Install current dependencies + run: composer install --no-interaction --no-progress --prefer-dist --no-scripts + + # Vet's plugin keeps every release younger than vet.json's minimum-release-age out of the + # update. It then refuses to install what nobody has trusted yet and exits 1, after the lock + # file is written. That refusal is expected here: the pull request carries the review. - name: Update Composer dependencies - run: composer update --no-interaction --no-progress --prefer-dist --no-scripts + run: | + composer update --no-interaction --no-progress --prefer-dist --no-scripts --no-ansi 2>&1 | tee update.log || true + if grep -q 'could not be resolved' update.log; then + exit 1 + fi + + - name: Install the updated lock without Vet + run: composer install --no-plugins --no-interaction --no-progress --prefer-dist --no-scripts + + - name: Audit with Vet + run: | + ./vendor/bin/vet --no-interaction --no-ansi > vet-report.txt 2>&1 || true + { + echo 'Automated weekly dependency refresh: `composer update`, holding back every release younger than `minimum-release-age` in `vet.json`.' + echo + echo '## Vet' + echo + echo '```' + cat vet-report.txt + echo '```' + echo + echo 'Untrusted packages fail `composer install` in CI. To review, check out this branch, run `composer install --no-plugins`, then `./vendor/bin/vet` in a terminal: read each change, or hand them to your coding agent, and pick the packages you trust. Commit `vet.json` to this branch; that push runs CI.' + } > pr-body.md + rm update.log vet-report.txt - name: Create Pull Request uses: peter-evans/create-pull-request@v7 with: commit-message: 'bot: dependency updates' title: 'bot: dependency updates' - body: | - Automated daily dependency refresh. - - - Ran `composer update` - - Updated lockfile and related dependency constraints + body-path: pr-body.md + add-paths: | + composer.json + composer.lock branch: bot/dependency-updates delete-branch: true diff --git a/README.md b/README.md index b1c9b8e..daba8de 100644 --- a/README.md +++ b/README.md @@ -215,6 +215,29 @@ Relevant config/env: and joins or starts a W3C trace (`traceparent`); both land in the log context - Security-sensitive auth/token actions emit structured `security.audit` log events - Configurable transport hardening for HTTPS enforcement, HSTS, trusted proxies/hosts, and strict CORS origins +- Dependencies are audited with [Laravel Vet](https://github.com/laravel/vet): nothing is installed + until someone has read it, and no release younger than 7 days is installed at all + +## Dependency Audit (Vet) + +`composer audit` only knows about published advisories, so a freshly compromised release passes +it. [Laravel Vet](https://github.com/laravel/vet) (beta) covers that gap as a Composer plugin: + +- `vet.json` records the version and file hash of every package someone has read. `composer + install` fails on anything else, including the same version re-published with different files. +- `minimum-release-age: 7` keeps every release younger than a week out of `composer update`, so a + bad release has time to be found and pulled. `juststeveking/*` and `roave/security-advisories` + are excluded: the first are first-party, the second has to be current to be any use. + +After `composer update`, review what changed and record what you trust: + +```bash +./vendor/bin/vet # in a terminal: read each change, or hand them to your coding agent +``` + +Commit `vet.json` with `composer.lock`. If you build your own project from Kit, `vet.json` is the +trust Kit recorded; run `./vendor/bin/vet --fresh` to take it over as your own, or remove +`laravel/vet` if you do not want the gate. ## Idempotency @@ -331,9 +354,11 @@ GitHub Actions workflows: - `.github/workflows/ci-tests.yml` - Runs Pint, PHPStan and the test suite on every push and pull request - `.github/workflows/dependency-updates.yml` - - Runs daily at `03:00 UTC` - - Executes `composer update` - - Opens/updates PR titled `bot: dependency updates` + - Runs weekly, Mondays at `03:00 UTC` + - Executes `composer update`, holding back releases younger than 7 days + - Opens/updates PR titled `bot: dependency updates` with Vet's report of what needs review + - The PR cannot pass CI until `vet.json` is updated on its branch: check it out, run + `composer install --no-plugins`, then `./vendor/bin/vet`, and commit `vet.json` - `.github/workflows/security-gate.yml` - Runs Composer security audit - Fails on high/critical advisories diff --git a/composer.json b/composer.json index 5e4d9b2..8e41ef3 100644 --- a/composer.json +++ b/composer.json @@ -27,6 +27,7 @@ "laravel/boost": "^2.4", "laravel/pail": "^1.2.5", "laravel/pint": "^1.27", + "laravel/vet": "^0.2", "mockery/mockery": "^1.6", "nunomaduro/collision": "^8.6", "parsedown/parsedown": "1.7.4", @@ -103,7 +104,8 @@ "sort-packages": true, "allow-plugins": { "pestphp/pest-plugin": true, - "php-http/discovery": true + "php-http/discovery": true, + "laravel/vet": true } }, "minimum-stability": "stable", diff --git a/composer.lock b/composer.lock index 6bf4ebb..60ded5c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "73d58616bb102b251cd068c45e4c482c", + "content-hash": "e637552c13afa7f0c3f8279d8ca36d76", "packages": [ { "name": "brick/math", @@ -382,16 +382,16 @@ }, { "name": "dragonmantank/cron-expression", - "version": "v3.6.1", + "version": "v3.6.0", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "4189372ffeff09bf14f731f67a9de90c7b413ebe" + "reference": "d61a8a9604ec1f8c3d150d09db6ce98b32675013" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/4189372ffeff09bf14f731f67a9de90c7b413ebe", - "reference": "4189372ffeff09bf14f731f67a9de90c7b413ebe", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/d61a8a9604ec1f8c3d150d09db6ce98b32675013", + "reference": "d61a8a9604ec1f8c3d150d09db6ce98b32675013", "shasum": "" }, "require": { @@ -402,8 +402,8 @@ }, "require-dev": { "phpstan/extension-installer": "^1.4.3", - "phpstan/phpstan": "^2.1.31", - "phpunit/phpunit": "^11.5.43 || ^12.4" + "phpstan/phpstan": "^1.12.32|^2.1.31", + "phpunit/phpunit": "^8.5.48|^9.0" }, "type": "library", "extra": { @@ -434,7 +434,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.6.1" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.6.0" }, "funding": [ { @@ -442,7 +442,7 @@ "type": "github" } ], - "time": "2026-10-19T17:53:57+00:00" + "time": "2025-10-31T18:51:33+00:00" }, { "name": "egulias/email-validator", @@ -646,22 +646,22 @@ }, { "name": "guzzlehttp/guzzle", - "version": "8.3.0", + "version": "8.2.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "b920e5fcaf81d761b8fabe600ca90999beaefdb7" + "reference": "93939470950a9b11e2e84204166ef5e048c55fe4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/b920e5fcaf81d761b8fabe600ca90999beaefdb7", - "reference": "b920e5fcaf81d761b8fabe600ca90999beaefdb7", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/93939470950a9b11e2e84204166ef5e048c55fe4", + "reference": "93939470950a9b11e2e84204166ef5e048c55fe4", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^3.1", - "guzzlehttp/psr7": "^3.2", + "guzzlehttp/promises": "^3.0.2", + "guzzlehttp/psr7": "^3.1", "php": "^7.4 || ^8.0", "psr/http-client": "^1.0", "psr/http-factory": "^1.0", @@ -675,7 +675,7 @@ "bamarni/composer-bin-plugin": "^1.8.2", "ext-curl": "*", "guzzle/client-integration-tests": "4.0.1", - "guzzlehttp/test-server": "^1.1", + "guzzlehttp/test-server": "^1.0.1", "php-http/message-factory": "^1.1", "phpunit/phpunit": "^9.6.34", "psr/log": "^1.1 || ^2.0 || ^3.0" @@ -752,7 +752,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/8.3.0" + "source": "https://github.com/guzzle/guzzle/tree/8.2.0" }, "funding": [ { @@ -768,25 +768,24 @@ "type": "tidelift" } ], - "time": "2026-10-18T13:38:43+00:00" + "time": "2026-09-06T13:55:09+00:00" }, { "name": "guzzlehttp/promises", - "version": "3.1.0", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "094d0ec418eb3b1411ea271a180ec95cae6ae933" + "reference": "42118e66a53c492effaf92bc357e931985d5c6f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/094d0ec418eb3b1411ea271a180ec95cae6ae933", - "reference": "094d0ec418eb3b1411ea271a180ec95cae6ae933", + "url": "https://api.github.com/repos/guzzle/promises/zipball/42118e66a53c492effaf92bc357e931985d5c6f9", + "reference": "42118e66a53c492effaf92bc357e931985d5c6f9", "shasum": "" }, "require": { - "php": "^7.4 || ^8.0", - "symfony/deprecation-contracts": "^2.5 || ^3.0" + "php": "^7.4 || ^8.0" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.8.2", @@ -836,7 +835,7 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/3.1.0" + "source": "https://github.com/guzzle/promises/tree/3.0.2" }, "funding": [ { @@ -852,20 +851,20 @@ "type": "tidelift" } ], - "time": "2026-10-18T12:48:16+00:00" + "time": "2026-08-24T10:00:26+00:00" }, { "name": "guzzlehttp/psr7", - "version": "3.2.0", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "cdc139396207a5eba10c242d241fb014cb098390" + "reference": "a3059ba1a84c9139c4ae03cf0f45bea276c97c74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/cdc139396207a5eba10c242d241fb014cb098390", - "reference": "cdc139396207a5eba10c242d241fb014cb098390", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/a3059ba1a84c9139c4ae03cf0f45bea276c97c74", + "reference": "a3059ba1a84c9139c4ae03cf0f45bea276c97c74", "shasum": "" }, "require": { @@ -955,7 +954,7 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/3.2.0" + "source": "https://github.com/guzzle/psr7/tree/3.1.0" }, "funding": [ { @@ -971,7 +970,7 @@ "type": "tidelift" } ], - "time": "2026-10-17T23:57:19+00:00" + "time": "2026-08-24T11:02:13+00:00" }, { "name": "guzzlehttp/uri-template", @@ -1127,16 +1126,16 @@ }, { "name": "laravel/framework", - "version": "v13.37.0", + "version": "v13.35.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "685f8d6c2ab4547287500bc80ccdf2ca12635109" + "reference": "a413a9da94884e5e9d58f4e6612884f712827804" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/685f8d6c2ab4547287500bc80ccdf2ca12635109", - "reference": "685f8d6c2ab4547287500bc80ccdf2ca12635109", + "url": "https://api.github.com/repos/laravel/framework/zipball/a413a9da94884e5e9d58f4e6612884f712827804", + "reference": "a413a9da94884e5e9d58f4e6612884f712827804", "shasum": "" }, "require": { @@ -1157,7 +1156,7 @@ "guzzlehttp/promises": "^2.0.3 || ^3.0", "guzzlehttp/psr7": "^2.9 || ^3.0", "guzzlehttp/uri-template": "^1.0 || ^2.0", - "laravel/prompts": "^0.3.25", + "laravel/prompts": "^0.3.11", "laravel/serializable-closure": "^2.0.10", "league/commonmark": "^2.8.1", "league/flysystem": "^3.25.1", @@ -1243,7 +1242,7 @@ "aws/aws-sdk-php": "^3.322.9", "ext-gmp": "*", "fakerphp/faker": "^1.24", - "intervention/image": "^4.2", + "intervention/image": "^4.0", "laravel/pint": "^1.18", "league/flysystem-aws-s3-v3": "^3.25.1", "league/flysystem-ftp": "^3.25.1", @@ -1252,10 +1251,10 @@ "league/flysystem-sftp-v3": "^3.25.1", "mockery/mockery": "^1.6.10", "opis/json-schema": "^2.4.1", - "orchestra/testbench-core": "^11.6.0", + "orchestra/testbench-core": "^11.5.0", "pda/pheanstalk": "^7.0.0 || ^8.0.0", "php-http/discovery": "^1.15", - "phpstan/phpstan": "2.3.1", + "phpstan/phpstan": "2.2.15", "phpunit/phpunit": "^11.5.50 || ^12.5.8 || ^13.0.3", "predis/predis": "^2.3 || ^3.0", "rector/rector": "2.6.3", @@ -1282,7 +1281,7 @@ "ext-redis": "Required to use the Redis cache and queue drivers (^4.0 || ^5.0 || ^6.0).", "fakerphp/faker": "Required to generate fake data using the fake() helper (^1.23).", "filp/whoops": "Required for friendly error pages in development (^2.14.3).", - "intervention/image": "Required to use the image processing features (^4.2).", + "intervention/image": "Required to use the image processing features (^4.0).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.25.1).", "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.25.1).", @@ -1354,7 +1353,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2026-10-16T04:59:27+00:00" + "time": "2026-10-06T13:52:37+00:00" }, { "name": "laravel/prompts", @@ -1609,16 +1608,16 @@ }, { "name": "league/commonmark", - "version": "2.10.4", + "version": "2.10.3", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "40821b7606d8d946bac57dbd2290076c722e3a65" + "reference": "6efbd9c472b91db0a3350fcd601c8332c2382e1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/40821b7606d8d946bac57dbd2290076c722e3a65", - "reference": "40821b7606d8d946bac57dbd2290076c722e3a65", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/6efbd9c472b91db0a3350fcd601c8332c2382e1f", + "reference": "6efbd9c472b91db0a3350fcd601c8332c2382e1f", "shasum": "" }, "require": { @@ -1712,7 +1711,7 @@ "type": "tidelift" } ], - "time": "2026-10-17T19:59:50+00:00" + "time": "2026-09-21T13:07:34+00:00" }, { "name": "league/config", @@ -1986,21 +1985,20 @@ }, { "name": "league/uri", - "version": "7.9.0", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "fcc872a3d872aa13f935e0cd1887b9abb06da07f" + "reference": "08cf38e3924d4f56238125547b5720496fac8fd4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/fcc872a3d872aa13f935e0cd1887b9abb06da07f", - "reference": "fcc872a3d872aa13f935e0cd1887b9abb06da07f", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/08cf38e3924d4f56238125547b5720496fac8fd4", + "reference": "08cf38e3924d4f56238125547b5720496fac8fd4", "shasum": "" }, "require": { - "ext-mbstring": "*", - "league/uri-interfaces": "^7.9.0", + "league/uri-interfaces": "^7.8.1", "php": "^8.1", "psr/http-factory": "^1" }, @@ -2073,7 +2071,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri/tree/7.9.0" + "source": "https://github.com/thephpleague/uri/tree/7.8.1" }, "funding": [ { @@ -2081,20 +2079,20 @@ "type": "github" } ], - "time": "2026-10-16T15:19:33+00:00" + "time": "2026-03-15T20:22:25+00:00" }, { "name": "league/uri-interfaces", - "version": "7.9.0", + "version": "7.8.1", "source": { "type": "git", "url": "https://github.com/thephpleague/uri-interfaces.git", - "reference": "eb5f6d24e6a4fe0a8e9c78ded4eb1dfff1404f58" + "reference": "85d5c77c5d6d3af6c54db4a78246364908f3c928" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/eb5f6d24e6a4fe0a8e9c78ded4eb1dfff1404f58", - "reference": "eb5f6d24e6a4fe0a8e9c78ded4eb1dfff1404f58", + "url": "https://api.github.com/repos/thephpleague/uri-interfaces/zipball/85d5c77c5d6d3af6c54db4a78246364908f3c928", + "reference": "85d5c77c5d6d3af6c54db4a78246364908f3c928", "shasum": "" }, "require": { @@ -2157,7 +2155,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri-src/issues", - "source": "https://github.com/thephpleague/uri-interfaces/tree/7.9.0" + "source": "https://github.com/thephpleague/uri-interfaces/tree/7.8.1" }, "funding": [ { @@ -2165,7 +2163,7 @@ "type": "github" } ], - "time": "2026-10-16T15:19:33+00:00" + "time": "2026-03-08T20:05:35+00:00" }, { "name": "monolog/monolog", @@ -2274,16 +2272,16 @@ }, { "name": "nesbot/carbon", - "version": "3.15.0", + "version": "3.14.2", "source": { "type": "git", "url": "https://github.com/CarbonPHP/carbon.git", - "reference": "217d38553209bdb44e01590d9e9a2e4df8354cce" + "reference": "94cfc34887f07ab5c0efa07914c8f527544e3224" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/217d38553209bdb44e01590d9e9a2e4df8354cce", - "reference": "217d38553209bdb44e01590d9e9a2e4df8354cce", + "url": "https://api.github.com/repos/CarbonPHP/carbon/zipball/94cfc34887f07ab5c0efa07914c8f527544e3224", + "reference": "94cfc34887f07ab5c0efa07914c8f527544e3224", "shasum": "" }, "require": { @@ -2293,7 +2291,6 @@ "psr/clock": "^1.0", "symfony/clock": "^6.3.12 || ^7.0 || ^8.0", "symfony/polyfill-mbstring": "^1.0", - "symfony/polyfill-time": "^1.0", "symfony/translation": "^4.4.18 || ^5.2.1 || ^6.0 || ^7.0 || ^8.0" }, "provide": { @@ -2376,7 +2373,7 @@ "type": "tidelift" } ], - "time": "2026-10-18T18:27:53+00:00" + "time": "2026-10-02T07:26:52+00:00" }, { "name": "nette/schema", @@ -4163,16 +4160,16 @@ }, { "name": "symfony/http-kernel", - "version": "v8.1.9", + "version": "v8.1.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "55c6935bb4c004a72b55f723e79d5404881dcad3" + "reference": "51c014e881d8b4ce61e56c0d4105f65b50df786a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/55c6935bb4c004a72b55f723e79d5404881dcad3", - "reference": "55c6935bb4c004a72b55f723e79d5404881dcad3", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/51c014e881d8b4ce61e56c0d4105f65b50df786a", + "reference": "51c014e881d8b4ce61e56c0d4105f65b50df786a", "shasum": "" }, "require": { @@ -4249,7 +4246,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v8.1.9" + "source": "https://github.com/symfony/http-kernel/tree/v8.1.8" }, "funding": [ { @@ -4269,7 +4266,7 @@ "type": "tidelift" } ], - "time": "2026-10-14T06:47:03+00:00" + "time": "2026-09-29T14:08:01+00:00" }, { "name": "symfony/mailer", @@ -5263,89 +5260,6 @@ ], "time": "2026-09-25T15:46:47+00:00" }, - { - "name": "symfony/polyfill-time", - "version": "v1.42.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-time.git", - "reference": "ac9f1ed802dd58f37e720388130c088434aa09fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-time/zipball/ac9f1ed802dd58f37e720388130c088434aa09fc", - "reference": "ac9f1ed802dd58f37e720388130c088434aa09fc", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Time\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ignace Philippe Nyamagana Butera", - "email": "nyamsprod@gmail.com" - }, - { - "name": "Tim Düsterhus", - "email": "tim@tideways-gmbh.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Time API added to PHP 8.6", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "duration", - "polyfill", - "portable", - "shim", - "time" - ], - "support": { - "source": "https://github.com/symfony/polyfill-time/tree/v1.42.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://github.com/nicolas-grekas", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2026-08-07T13:08:13+00:00" - }, { "name": "symfony/polyfill-uuid", "version": "v1.43.0", @@ -6726,16 +6640,16 @@ }, { "name": "entropy/entropy", - "version": "0.4.31", + "version": "0.4.30", "source": { "type": "git", "url": "https://github.com/TomasVotruba/entropy.git", - "reference": "e31f93b8e987982e8d579c7c7f0cfa8aa7ae7e18" + "reference": "733042a17988ba7c2c58f5245e9257cb687b7904" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/TomasVotruba/entropy/zipball/e31f93b8e987982e8d579c7c7f0cfa8aa7ae7e18", - "reference": "e31f93b8e987982e8d579c7c7f0cfa8aa7ae7e18", + "url": "https://api.github.com/repos/TomasVotruba/entropy/zipball/733042a17988ba7c2c58f5245e9257cb687b7904", + "reference": "733042a17988ba7c2c58f5245e9257cb687b7904", "shasum": "" }, "require": { @@ -6771,9 +6685,9 @@ "description": "Entropy framework", "support": { "issues": "https://github.com/TomasVotruba/entropy/issues", - "source": "https://github.com/TomasVotruba/entropy/tree/0.4.31" + "source": "https://github.com/TomasVotruba/entropy/tree/0.4.30" }, - "time": "2026-10-13T12:04:57+00:00" + "time": "2026-10-10T07:02:38+00:00" }, { "name": "fakerphp/faker", @@ -6902,16 +6816,16 @@ }, { "name": "filp/whoops", - "version": "2.18.7", + "version": "2.18.6", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "50670ba239926c50f2073e868f6672f775cd57ec" + "reference": "7d0a2cde892089bb09372f4366e9b960eb3001a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/50670ba239926c50f2073e868f6672f775cd57ec", - "reference": "50670ba239926c50f2073e868f6672f775cd57ec", + "url": "https://api.github.com/repos/filp/whoops/zipball/7d0a2cde892089bb09372f4366e9b960eb3001a9", + "reference": "7d0a2cde892089bb09372f4366e9b960eb3001a9", "shasum": "" }, "require": { @@ -6961,7 +6875,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.18.7" + "source": "https://github.com/filp/whoops/tree/2.18.6" }, "funding": [ { @@ -6969,7 +6883,7 @@ "type": "github" } ], - "time": "2026-10-18T13:17:38+00:00" + "time": "2026-10-03T17:03:57+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -7662,6 +7576,82 @@ }, "time": "2026-07-18T17:53:15+00:00" }, + { + "name": "laravel/vet", + "version": "v0.2.1", + "source": { + "type": "git", + "url": "https://github.com/laravel/vet.git", + "reference": "7b10fd2beecf9f386c92731729c9f33a152b213b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/vet/zipball/7b10fd2beecf9f386c92731729c9f33a152b213b", + "reference": "7b10fd2beecf9f386c92731729c9f33a152b213b", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0", + "ext-dom": "*", + "ext-mbstring": "*", + "ext-openssl": "*", + "ext-phar": "*", + "ext-tokenizer": "*", + "ext-zip": "*", + "php": "^8.4" + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.15.5|^8.0", + "laravel-zero/foundation": "^13.25", + "laravel-zero/framework": "^13.0", + "laravel/pint": "^1.32.1", + "mockery/mockery": "^1.6.15", + "pestphp/pest": "^5.2.1", + "pestphp/pest-plugin-phpstan": "^5.2.1", + "pestphp/pest-plugin-rector": "^5.0.4", + "phpstan/phpstan": "^2.2.16", + "rector/rector": "^2.6.7" + }, + "bin": [ + "builds/vet" + ], + "type": "composer-plugin", + "extra": { + "class": "Laravel\\Vet\\Composer\\Plugin" + }, + "autoload": { + "psr-4": { + "App\\": "app/", + "Laravel\\Vet\\Composer\\": "src/Composer/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "A dependency audit trust file for PHP.", + "keywords": [ + "Audit", + "cli", + "composer", + "console", + "dev", + "php", + "security", + "supply chain" + ], + "support": { + "issues": "https://github.com/laravel/vet/issues", + "source": "https://github.com/laravel/vet/tree/v0.2.1" + }, + "time": "2026-09-27T14:39:48+00:00" + }, { "name": "mockery/mockery", "version": "1.6.15", @@ -11733,16 +11723,16 @@ }, { "name": "symfony/polyfill-deepclone", - "version": "v1.43.2", + "version": "v1.43.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-deepclone.git", - "reference": "82274308b59f6e96f53a3fb37fc40877d843e5a5" + "reference": "aaba44b6ee7299ae65717811c55b57ab9bc0fedd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-deepclone/zipball/82274308b59f6e96f53a3fb37fc40877d843e5a5", - "reference": "82274308b59f6e96f53a3fb37fc40877d843e5a5", + "url": "https://api.github.com/repos/symfony/polyfill-deepclone/zipball/aaba44b6ee7299ae65717811c55b57ab9bc0fedd", + "reference": "aaba44b6ee7299ae65717811c55b57ab9bc0fedd", "shasum": "" }, "require": { @@ -11796,7 +11786,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-deepclone/tree/v1.43.2" + "source": "https://github.com/symfony/polyfill-deepclone/tree/v1.43.1" }, "funding": [ { @@ -11816,7 +11806,7 @@ "type": "tidelift" } ], - "time": "2026-10-14T07:17:09+00:00" + "time": "2026-10-06T19:46:18+00:00" }, { "name": "symfony/var-exporter", diff --git a/vet.json b/vet.json new file mode 100644 index 0000000..31c8ca1 --- /dev/null +++ b/vet.json @@ -0,0 +1,611 @@ +{ + "require": { + "brick/math": { + "version": "1.0.0", + "hash": "tree-v2:18a4e0a903e82f19128a2a8679c0305e66f104438f01caa4b63b1cec2c6ba4dd" + }, + "carbonphp/carbon-doctrine-types": { + "version": "3.2.1", + "hash": "tree-v2:0f158f3b909fc01e691ed5f5121186056232b049031e7d3a914676d49881ece5" + }, + "dflydev/dot-access-data": { + "version": "v3.0.3", + "hash": "tree-v2:05d15a85340adeabba2a95b5280336f0df3a544fcd89be9b2053e410212960b5" + }, + "doctrine/inflector": { + "version": "2.1.0", + "hash": "tree-v2:220a8be0ed1b4c0fe4cb53530cec8bcbad2db49962deef2f9f5de47327d7855e" + }, + "doctrine/lexer": { + "version": "3.0.3", + "hash": "tree-v2:ceb1d38580329ca049a57faa28bbe978bdb36d28e0118545f31582ca14166d7b" + }, + "dragonmantank/cron-expression": { + "version": "v3.6.0", + "hash": "tree-v2:de03874981dc12b8d6108e201130ed10c174926aad4e4fc0cf4362a1e6f83cb7" + }, + "egulias/email-validator": { + "version": "4.0.4", + "hash": "tree-v2:7621e009898aea85dfa2ad91d25a3441db9ef5bf90a1b55e9b8396b3a43830f9" + }, + "fruitcake/php-cors": { + "version": "v1.4.0", + "hash": "tree-v2:843a0fd0c0519e1e8e46ce45b613feb881065e0a5687b359660900b7be3d0094" + }, + "graham-campbell/result-type": { + "version": "v1.2.0", + "hash": "tree-v2:19182f95f7c4750192e6cfe25b1f769686638fc59e5517710472b9f2b68315e7" + }, + "guzzlehttp/guzzle": { + "version": "8.2.0", + "hash": "tree-v2:ef5a1c5447f527859b791b7e941179b6ed908685d45723873b7180e5f27176f8" + }, + "guzzlehttp/promises": { + "version": "3.0.2", + "hash": "tree-v2:bae5aa965172cd6a34cd9a56e05ba6ae9cba21fa322686288e0de7feb869e94b" + }, + "guzzlehttp/psr7": { + "version": "3.1.0", + "hash": "tree-v2:35a61fc96ac02ed9198fc45af34c7bf94b39438914d3811e1f337d674401eb03" + }, + "guzzlehttp/uri-template": { + "version": "v2.0.1", + "hash": "tree-v2:c5f332afdb641a8e51865f5fe4448a3c4c2d9ec959e76360003b5489525deaf6" + }, + "juststeveking/api-toolbox": { + "version": "v0.3.0", + "hash": "tree-v2:170dbefcc470a823490926a602216b6f1c5ba5f258a4ba16528a199269bd610c" + }, + "laravel/framework": { + "version": "v13.35.0", + "hash": "tree-v2:862428a89369e09b33dee255707d3c5d05dfffdc5bf880ce97418d0e7853d24b" + }, + "laravel/prompts": { + "version": "v0.3.26", + "hash": "tree-v2:5131de1988c6323c82b0ac41b1d3b256b3e5ae6d9a02edb24f6a177bd4a8f3d0" + }, + "laravel/sanctum": { + "version": "v4.3.3", + "hash": "tree-v2:63830d35780274f01c5f4999126781fb3de75408055c7ec4aac8bdf2d432c314" + }, + "laravel/serializable-closure": { + "version": "v2.1.0", + "hash": "tree-v2:46e235154eb6a796d4dc4365dc4c2fd1bc4abb91f2235b7741061116a06e0637" + }, + "laravel/tinker": { + "version": "v3.0.2", + "hash": "tree-v2:07c01215fec4bef8c1a223bba86119b769ab70dd45d7013834d3dfcdf8046fea" + }, + "league/commonmark": { + "version": "2.10.3", + "hash": "tree-v2:ee619e9faf2cbab26a72cb89c809211c91e772fecf8c1a3cbc5e98f8a1233db2" + }, + "league/config": { + "version": "v1.2.0", + "hash": "tree-v2:b454eb2bd1b250346c7d0af0e5b3caaeafa1b21468bca4ff4601a6a7bd91baae" + }, + "league/flysystem": { + "version": "3.36.0", + "hash": "tree-v2:420e48fea76c143b41f4a8c1516031dc09ebb7e6367321af317e0a48fa998320" + }, + "league/flysystem-local": { + "version": "3.35.3", + "hash": "tree-v2:7dba7c9670489313d3604b6a2801a152cf455b5e0d428bf721efda7ea37a5000" + }, + "league/mime-type-detection": { + "version": "1.17.0", + "hash": "tree-v2:1726a64b700472e12c6e5917132914a632350a91b90816cc3c5940ddea1f92d7" + }, + "league/uri": { + "version": "7.8.1", + "hash": "tree-v2:4397d51a8c4e6080a42f161000bf9db6e73840654aff3cc445f27b405c36ab5c" + }, + "league/uri-interfaces": { + "version": "7.8.1", + "hash": "tree-v2:227c217ed67b9cd48cc589867bf18379e95858e068724b8fbef94713311b024e" + }, + "monolog/monolog": { + "version": "3.12.1", + "hash": "tree-v2:bb7a293a3ba00d6ca00220a74a07a194fa22bdde721ae8533e8773c7c3589cc4" + }, + "nesbot/carbon": { + "version": "3.14.2", + "hash": "tree-v2:cde352510d39b5e4d3f3179cf77984f2c70148599eff717f751cd0c9c1bcc671" + }, + "nette/schema": { + "version": "v1.3.6", + "hash": "tree-v2:502542dfdcfa7c69b22954a883a7605ef7c0d399a15df5fa09aaf695d437b358" + }, + "nette/utils": { + "version": "v4.1.5", + "hash": "tree-v2:98a3f1d758153bf83c6da5b98625cb4b1ad1105369e07cb24ea29f60eff0ab63" + }, + "nikic/php-parser": { + "version": "v5.9.0", + "hash": "tree-v2:bcacf1331427ef1203828abd4716eae2d19aa68027126caa55860acf46057cf7" + }, + "nunomaduro/termwind": { + "version": "v2.4.0", + "hash": "tree-v2:19bb7af2b1ec2c1a8187fca9af3615fe7ba53c12948053951f9175a1a03a0e48" + }, + "phpoption/phpoption": { + "version": "1.10.0", + "hash": "tree-v2:88bf58174c3d5e79cc8ba99f6a072fc4c26e4aea72ad093b5d5a43d3d46ccea4" + }, + "psr/clock": { + "version": "1.0.0", + "hash": "tree-v2:2a7e0fd2ce370b76b21dafdf64121892c972ca91f4bed220b3505db4ec870674" + }, + "psr/container": { + "version": "2.0.2", + "hash": "tree-v2:e5aaa33e7ad4cc518518e652f7435918c83ef034fa359b53731e10501eb6d682" + }, + "psr/event-dispatcher": { + "version": "1.0.0", + "hash": "tree-v2:091c7ba644dd4b46f4ca5a1e99e696b646f8a2a87821a8ca36e3328aba6fa182" + }, + "psr/http-client": { + "version": "1.0.3", + "hash": "tree-v2:50063ed6dde84d09a63437f58a953b8aa0fdd3fcab44d5d8688a89fc48130f07" + }, + "psr/http-factory": { + "version": "1.1.0", + "hash": "tree-v2:dde23cb9ba5cc39c10acd8ade52be90b01927cc77ba64e3a7db3abe7c98f40ec" + }, + "psr/http-message": { + "version": "2.0", + "hash": "tree-v2:a9575ef4779a21eb0d3f04a1e2f0f008e67785cc86d750046a13455f9266ff41" + }, + "psr/log": { + "version": "3.0.2", + "hash": "tree-v2:0f88d9371ba05c1791394f2e0a56979e1e17258f9bea9519ffc51f11c85b7844" + }, + "psr/simple-cache": { + "version": "3.0.0", + "hash": "tree-v2:1854aa6d2cd53968d44c1fddcde547872925142ee6a5dea8d183b3a9e9551b7c" + }, + "psy/psysh": { + "version": "v0.12.24", + "hash": "tree-v2:c518e85e74d1aef81854220186172a87c7e1553652d35eff97655015389e5404" + }, + "ramsey/collection": { + "version": "2.1.1", + "hash": "tree-v2:ad16df2a5b3611348dc88ba0a921d27b7e074406ff667ca547c6a3579734972c" + }, + "ramsey/uuid": { + "version": "4.9.4", + "hash": "tree-v2:68d8f0c8847e8275812a7af6335ada47d71f8534bb96c5b54ea18141e4739d77" + }, + "readalizer/readalizer": { + "version": "v1.0.2", + "hash": "tree-v2:0f396b59e6ba015a0eca0ccd5e0c41a3651fd418217c32ff9a10ea20c5641f3d" + }, + "symfony/clock": { + "version": "v8.1.9", + "hash": "tree-v2:d3f9e4a9eba34ef905fb6c186d00c8c9281b5b67474e4dbbb224a8705f0700cc" + }, + "symfony/console": { + "version": "v8.1.9", + "hash": "tree-v2:5679c5869c5073454516455fec5cb81e88c72d886a3b9dd905562a64b02afbc9" + }, + "symfony/css-selector": { + "version": "v8.1.6", + "hash": "tree-v2:d8c1eda011461f48443b0fcb1d607979dea4d8f0c1e9e85cee5e9d2f27613cc8" + }, + "symfony/deprecation-contracts": { + "version": "v3.7.1", + "hash": "tree-v2:5833e98c5092cd02ed429ffd459b82b158f20393ef0b0ec2e06b2833d7efe838" + }, + "symfony/error-handler": { + "version": "v8.1.8", + "hash": "tree-v2:92f6220ad210ad53ab79fbaffc164701910243b3bea6ff9dfb70bed8f46c94ae" + }, + "symfony/event-dispatcher": { + "version": "v8.1.5", + "hash": "tree-v2:44ed3dd86aee506338f18bd5293ebfd1e23ead8659903a8bc020cd1a263dba0a" + }, + "symfony/event-dispatcher-contracts": { + "version": "v3.7.1", + "hash": "tree-v2:0ac7e6b0bd6da93975ac9b3ec9f41aa596e9c1c6217813797d1e8bb64be89139" + }, + "symfony/finder": { + "version": "v8.1.8", + "hash": "tree-v2:d0f75ce9bc7d51777f42a2041b9ef5f55d5d0d8270c4e7994444283a653b3dbc" + }, + "symfony/http-foundation": { + "version": "v8.1.9", + "hash": "tree-v2:1adf43650652b1b9e3a871d78e8b0661ed4ea8f7540ddb4b1d83d75cb3681534" + }, + "symfony/http-kernel": { + "version": "v8.1.8", + "hash": "tree-v2:cdae12a8dedacc06329317f8bf277680d5ff971b58e312e0e556a9fb835b1c0d" + }, + "symfony/mailer": { + "version": "v8.1.7", + "hash": "tree-v2:c244af88f5ea62aafaca4078dac4c0dfe4cbfd33e61f509c900789e348878b08" + }, + "symfony/mime": { + "version": "v8.1.7", + "hash": "tree-v2:61144bf31cc7eae710d65113289abe7a642655875fbd21e675c8dfd8f341c3d7" + }, + "symfony/polyfill-ctype": { + "version": "v1.37.0", + "hash": "tree-v2:8a05c9979125b75411bed1356ebf16439972fafc4cca1ff6baa717db25e3dfca" + }, + "symfony/polyfill-intl-grapheme": { + "version": "v1.43.0", + "hash": "tree-v2:5e6dbd2dc74543299269b89eb6e2ba8c170b51b1697674fbfe681c256e55dd47" + }, + "symfony/polyfill-intl-idn": { + "version": "v1.43.0", + "hash": "tree-v2:c923d31d3d92c64e387245034bf7ca44284e3ec6674004efd41e7d13da99a492" + }, + "symfony/polyfill-intl-normalizer": { + "version": "v1.43.0", + "hash": "tree-v2:cd506f4802cec64c0a39b6fa45cf9e22bffc84e674442ae93b6eaf936304ec5d" + }, + "symfony/polyfill-mbstring": { + "version": "v1.43.0", + "hash": "tree-v2:1178bc6cf2eca3121b218c648dc6b60c5596ba469520be8aa5744cf105dd9e5b" + }, + "symfony/polyfill-php80": { + "version": "v1.43.0", + "hash": "tree-v2:dac9a7018f6de962c077a8a96a80deaf4da282d85250f36c90e293fde4804664" + }, + "symfony/polyfill-php82": { + "version": "v1.43.0", + "hash": "tree-v2:86094440199b4300834f3ac99d90da752f973a3e9a68cfb62df8f2520f189610" + }, + "symfony/polyfill-php84": { + "version": "v1.43.0", + "hash": "tree-v2:0e8b2fc36bad3b28730f58da447ce185e1bc0b65e905d8a08f409b8444f853d4" + }, + "symfony/polyfill-php85": { + "version": "v1.43.0", + "hash": "tree-v2:7399609adce52ef72aab96a3db35805814b486e6a46d30b2ed8e69f587eb3c8f" + }, + "symfony/polyfill-php86": { + "version": "v1.43.0", + "hash": "tree-v2:a5fb8d97652cd84ab2c06acdd10dfe2218e5244f8115b9c8dc015b1ae7b99cfc" + }, + "symfony/polyfill-uuid": { + "version": "v1.43.0", + "hash": "tree-v2:d5a39f5ddaf6c4b4b53829f8cca739b82ac309b5066ac170665b010e03fe6fc1" + }, + "symfony/process": { + "version": "v8.1.9", + "hash": "tree-v2:0088281cac46a3378736e4db93df87bd462c17b193ffa95622e72670427bd3e1" + }, + "symfony/routing": { + "version": "v8.1.9", + "hash": "tree-v2:dc0d70dd175594a8a2468f2b694b8ce0780dbd4369e7020777aac056a66c25ca" + }, + "symfony/service-contracts": { + "version": "v3.7.3", + "hash": "tree-v2:87421779a4d0f4aae910ba4a77c7a04bfd6d385d86190a96ec8276ec1ba48987" + }, + "symfony/string": { + "version": "v8.1.9", + "hash": "tree-v2:e5fd06fd82f49c44864d58e67f422705901d35cfc929dbd81423dce545515a97" + }, + "symfony/translation": { + "version": "v8.1.5", + "hash": "tree-v2:5ed59b86402810a7cc27e7abb649b87fe5e32e20f982a025dee49333b77c0182" + }, + "symfony/translation-contracts": { + "version": "v3.7.1", + "hash": "tree-v2:74a8e3a8f0580af687b411de0e087911c348807f6e59858632fbffabeb7bf9a9" + }, + "symfony/uid": { + "version": "v8.1.9", + "hash": "tree-v2:50f34adec078cf0a7c0d1ee9801f9e763a6e1a641e30127a7b7cf2802af6bfd3" + }, + "symfony/var-dumper": { + "version": "v8.1.9", + "hash": "tree-v2:117e6c0090069aea83ae562245fd6c433c25fafab7aaeba410920a6edd165179" + }, + "tijsverkoyen/css-to-inline-styles": { + "version": "v2.4.0", + "hash": "tree-v2:ac5b86c6dee0dc8f5c5f7f98d250d378d8c65dde04156022650e4776734f7fcb" + }, + "vlucas/phpdotenv": { + "version": "v5.7.0", + "hash": "tree-v2:6c06f3ef79457956cc5468b35ba53b18504b47a0925d29278c2b195caa85bae0" + }, + "voku/portable-ascii": { + "version": "2.1.1", + "hash": "tree-v2:6c1b22272d89eb3d85366cc99a0375535b76a897616d9d79bbfddc8bcded66c6" + } + }, + "require-dev": { + "brianium/paratest": { + "version": "v7.20.0", + "hash": "tree-v2:075f8b7e73532ba3689126db0f91288a199bcba5f2743bc17a9bf37d53e030c1" + }, + "composer/pcre": { + "version": "3.4.0", + "hash": "tree-v2:ed02f4e2009261111a40bc3f96d602af9d3d2b069df5578bcd5ca8641e55d583" + }, + "composer/semver": { + "version": "3.5.1", + "hash": "tree-v2:31033436236e2d7e2319182098d53bd1efe172453f4bb82a9051437a28481bc1" + }, + "composer/xdebug-handler": { + "version": "3.0.5", + "hash": "tree-v2:780bdd65290fbfc62bbe8de682feb4eff689bf57ac9598bd42dc83f60e734adf" + }, + "doctrine/deprecations": { + "version": "1.1.6", + "hash": "tree-v2:8abdb22c79e82b9ea4884ab18dbaa595bb5315736231fa9e310b9d70a3ab0815" + }, + "driftingly/rector-laravel": { + "version": "2.6.2", + "hash": "tree-v2:7ad85f8d2c4fc8ae611466f654d894413f9d066999bbede4abdccda6f230be4e" + }, + "entropy/entropy": { + "version": "0.4.30", + "hash": "tree-v2:df059d0a216ac6093cf29ef00ca0d1316c66c716910a396e98625ebd4dd153bf" + }, + "fakerphp/faker": { + "version": "v1.24.1", + "hash": "tree-v2:b6f3d0f8ca79f98400b0df7c2a29004dbd9e3f39f39125ecfd5613e38b9ff6a3" + }, + "fidry/cpu-core-counter": { + "version": "1.4.1", + "hash": "tree-v2:187d5e8e97709597df098f058a60567f02d205ecf769583864ae461552cdae95" + }, + "filp/whoops": { + "version": "2.18.6", + "hash": "tree-v2:9e7a14fae92fb54a85c3a616c342df39ed49daa32622a4a21e1a281b14be6fb7" + }, + "hamcrest/hamcrest-php": { + "version": "v3.0.0", + "hash": "tree-v2:49f1c99167659adb6f9f9bf1aa7abca02fcd773f3c19041f7983dd50b83d85e7" + }, + "iamcal/sql-parser": { + "version": "v0.7", + "hash": "tree-v2:dfed6e9a73363430e5e2f3f5dc5c2f55aea51cc86c0b7e2215c935aba5b7ca60" + }, + "jean85/pretty-package-versions": { + "version": "2.1.1", + "hash": "tree-v2:5cc304e8a530449d8c745eaec902384554d1740d4e083032d5f9ce3ac1cf25e3" + }, + "knuckleswtf/scribe": { + "version": "5.11.0", + "hash": "tree-v2:7108ec2a9e0e4f6c0035670b3749feb288ad14af714dc0b4da91781d77a9f4d0" + }, + "larastan/larastan": { + "version": "v3.13.0", + "hash": "tree-v2:e12ed6ea9e2fd88a18b7242587a63fedba8fcd177f356618f18393463d156da5" + }, + "laravel/boost": { + "version": "v2.10.3", + "hash": "tree-v2:c05dc562a93761a43726eacfcd5b8cec76aacb230eb898e0d6104420ce17f0f8" + }, + "laravel/mcp": { + "version": "v1.0.2", + "hash": "tree-v2:4894b94cfff4dd5c22b89c36ac63a2f92973c3cec19b5b592e86a3483a7b6a77" + }, + "laravel/pail": { + "version": "v1.2.7", + "hash": "tree-v2:6ffc8a88f56b9b5082de7e1d3c620a64fa6224f3d2ccd94c23b7b73ec903929b" + }, + "laravel/pint": { + "version": "v1.32.1", + "hash": "tree-v2:6011ed0cc05d840c85dac563c64a2461bc3c09f131e7c819f75abd73c9502f64" + }, + "laravel/roster": { + "version": "v1.0.0", + "hash": "tree-v2:da430a9f3d9fb06a3812b0e8a116d8265a06dce1bfde4182a1de7154ba15ad67" + }, + "laravel/vet": { + "version": "v0.2.1", + "hash": "tree-v2:7c555b9f7eb265649d89769aa9b07bafc809d9e52d15ecdc3a84ee1c59fa767e" + }, + "mockery/mockery": { + "version": "1.6.15", + "hash": "tree-v2:4bc0e2fbaea02a9469caa0f1105242dca2907278bc1fd8a3f9c6c8a2ddf920d7" + }, + "mpociot/reflection-docblock": { + "version": "1.0.1", + "hash": "tree-v2:a8f3f0a5aaf07c28732df7ffae5c716a027ef78360f9fc05c7d9f7df3addd034" + }, + "myclabs/deep-copy": { + "version": "1.14.0", + "hash": "tree-v2:6f013d251808abbe250faa2a847f14d89804ba137fc7e085495311bc6ebc1822" + }, + "nunomaduro/collision": { + "version": "v8.9.5", + "hash": "tree-v2:937038b0d056a8bcf7697a75ce737986eccb501a325645cf05d679e7befcf39e" + }, + "nunomaduro/pokio": { + "version": "v1.0.1", + "hash": "tree-v2:84769b07bae8f30c5399dee2f653eee5047d28b861fc12caee9e423ec782a955" + }, + "parsedown/parsedown": { + "version": "1.7.4", + "hash": "tree-v2:7d0ed6394833e6eb49d6fe1bd87a19d051a7a87fd9946d154391eec431a12bf5" + }, + "pestphp/pest": { + "version": "v4.7.8", + "hash": "tree-v2:36d984a67927f4dc359da32a74528232c736b60015a6e8eb194c50076fee6544" + }, + "pestphp/pest-plugin": { + "version": "v4.0.0", + "hash": "tree-v2:3103a3f5c29b851523801f4168e91bf6d802ef5e65706fd83273c24c4ec95549" + }, + "pestphp/pest-plugin-arch": { + "version": "v4.0.2", + "hash": "tree-v2:37a528a6ea7283adfb14f06e80ce4dd3884a2917cc372b204c221f206b3bfe98" + }, + "pestphp/pest-plugin-laravel": { + "version": "v4.1.0", + "hash": "tree-v2:30b73b6336fbf77a7d4b61f1fe081db2d59caae54fe6b2f777804564871f976c" + }, + "pestphp/pest-plugin-mutate": { + "version": "v4.0.1", + "hash": "tree-v2:90dc0a102fcecaf0314015c17c0e98e3f2e5151247da5809a174a731e8b2db89" + }, + "pestphp/pest-plugin-profanity": { + "version": "v4.2.1", + "hash": "tree-v2:88b1581205235488496300f5ee233b42b122f5a5668bb2d95f8169c180121cd9" + }, + "pestphp/pest-plugin-type-coverage": { + "version": "v4.0.4", + "hash": "tree-v2:8923495e26ef0579daba976e508e76f0d9fdbeb19260fce0605c1bee91c1ef10" + }, + "phar-io/manifest": { + "version": "2.0.4", + "hash": "tree-v2:7b98d0ed9886b77df04a08280884b27c7169ba845a24c626ca7abea0d3afc1f7" + }, + "phar-io/version": { + "version": "3.2.1", + "hash": "tree-v2:0409e2019377650177c2b10da803617abc85e49d5b02b8697d450c007eab42b4" + }, + "phpdocumentor/reflection-common": { + "version": "2.2.1", + "hash": "tree-v2:b5e96fe132bff07f74d641a9d92eed23f59de9bf11828c15afe4b0a79efede7f" + }, + "phpdocumentor/reflection-docblock": { + "version": "6.0.3", + "hash": "tree-v2:d4455a70c012b399cab192e5b46fc8609741b8c54d1d8d2ca241b51011f602e1" + }, + "phpdocumentor/type-resolver": { + "version": "2.1.0", + "hash": "tree-v2:b38f8e64f9e625074fc0b7f271a4f4d8100e7e0771c54ae2fae397fe68a45ea0" + }, + "phpstan/phpdoc-parser": { + "version": "2.3.6", + "hash": "tree-v2:871a2c3e3fce5505337233418c37cdac1515c9824110bf602cbb8216b4fab7cb" + }, + "phpstan/phpstan": { + "version": "2.3.1", + "hash": "tree-v2:fba43641fc56f4a3b5eec10854a8e7f23b2ca83e839c1cf7c9cb45d89e759686" + }, + "phpunit/php-code-coverage": { + "version": "12.5.8", + "hash": "tree-v2:57c780b6ec3d4d9b49b9fc3bcafafdf30bb32c09a47b4736cf7f623b2285237b" + }, + "phpunit/php-file-iterator": { + "version": "6.0.2", + "hash": "tree-v2:5899b835455b09f32cda45548e9aaa437dd3aa9508c5960076d081175aa53293" + }, + "phpunit/php-invoker": { + "version": "6.0.0", + "hash": "tree-v2:6d8f648edbdac676ca9bee9c2fe97c82d6251aaf62f156c3a36c86736b812e23" + }, + "phpunit/php-text-template": { + "version": "5.0.1", + "hash": "tree-v2:2aed1b494144f6093453b11e915160a97a82ee0f5857332906ef4fd162c9e08b" + }, + "phpunit/php-timer": { + "version": "8.0.0", + "hash": "tree-v2:f35fccbffc23c168f18029a433791f4dd85daa7009e53987b66f08bdbf3d4353" + }, + "phpunit/phpunit": { + "version": "12.5.33", + "hash": "tree-v2:fe7d4ec3e4840290cee07c39535422b61bb31ebd2afde15a39a78373a0cd2c64" + }, + "rector/rector": { + "version": "2.7.0", + "hash": "tree-v2:e8f59d6c70f4d83c2a49a512000935fdc04f7ef278c685ae7da3cac6b36f0d91" + }, + "sebastian/cli-parser": { + "version": "4.2.1", + "hash": "tree-v2:fc44fc3e0a4b1fd529963948acebc3a3370f7b55aa8e9969c96953477b41886e" + }, + "sebastian/comparator": { + "version": "7.1.8", + "hash": "tree-v2:10f9243c8a5287b8ad9e7ed4651717391adaf923891a95d75b589fa2229f5386" + }, + "sebastian/complexity": { + "version": "5.0.0", + "hash": "tree-v2:f0d6eb200ba389679d875eb854ffc9d6c55884d1e5b5bdcd2e58cb27d505c362" + }, + "sebastian/diff": { + "version": "7.0.1", + "hash": "tree-v2:97deb1c25a59326f762c614ccc25be2163296ae70762785f12d307ed967a5326" + }, + "sebastian/environment": { + "version": "8.1.2", + "hash": "tree-v2:f6e34bc8513b7d4b3c319a99bd457c406b3ef4968db30b33c07346a6c0d46c06" + }, + "sebastian/exporter": { + "version": "7.0.3", + "hash": "tree-v2:14c6a001c221469a25b6bb02ab8b7684b7e64ed98379ec6e7673853d7ee3c0a4" + }, + "sebastian/global-state": { + "version": "8.0.3", + "hash": "tree-v2:61b9dda526628a2c6b44092338d4363c3b682f4290e71b9bffed49e70327f10c" + }, + "sebastian/lines-of-code": { + "version": "4.0.1", + "hash": "tree-v2:10204087c002cc8387fd29d84327bec5b68cd528a854234fb79f0e29b6f12cde" + }, + "sebastian/object-enumerator": { + "version": "7.0.0", + "hash": "tree-v2:7e0147f70c38947d32d81b0a88607da16c0b067ba9c357febe9779639e55d69f" + }, + "sebastian/object-reflector": { + "version": "5.0.0", + "hash": "tree-v2:dc02c4b2cc26efffc26b74e5bc0e489a4ac3ce831fff0f06c939fef5b8285fc3" + }, + "sebastian/recursion-context": { + "version": "7.0.1", + "hash": "tree-v2:c2713c083e6e14599b6a68f986d969692458ff45a1aedf5a6bd994699c6cc72d" + }, + "sebastian/type": { + "version": "6.0.4", + "hash": "tree-v2:c18e590b1fad7140ccc8dc16086635356728f15f0eb1abfb4d3d79b243947a35" + }, + "sebastian/version": { + "version": "6.0.1", + "hash": "tree-v2:058498658297f7521f1a567c522ffa7d14729b620fdcb87302aac30fc8e1b224" + }, + "shalvah/upgrader": { + "version": "0.6.0", + "hash": "tree-v2:d57ac356f1d9affd29f655e683bf624d6d4e2bc7654fc7ab78c6ae513d8674ef" + }, + "staabm/side-effects-detector": { + "version": "1.0.5", + "hash": "tree-v2:26d964435c381c94abd5dbadf497d7888b5a811f0693b66aa7976a3d01c545ba" + }, + "symfony/polyfill-deepclone": { + "version": "v1.43.1", + "hash": "tree-v2:1d7b4df244c0d794d1525fa0a36a302a57a1a36ee2c2ea80507183497ad7a5b2" + }, + "symfony/var-exporter": { + "version": "v8.1.9", + "hash": "tree-v2:5412e993725ec7a86a56485be1a7aef9ace4ca5f025d2211f8402dbba4ed7dce" + }, + "symfony/yaml": { + "version": "v8.1.9", + "hash": "tree-v2:ac2ebd08460160092a00a9af5531fd33f054e17c16a88425464505af0d2044d1" + }, + "symplify/rule-doc-generator-contracts": { + "version": "11.2.0", + "hash": "tree-v2:143fc89ce64308c660e6f52de2df92429720106e1e43e1484dd93193772ed011" + }, + "ta-tikoma/phpunit-architecture-test": { + "version": "0.8.7", + "hash": "tree-v2:068328d7bed81666d79d94c08e5b634b6c2f1499e8ebadf1068b4d7f19545243" + }, + "theseer/tokenizer": { + "version": "2.0.1", + "hash": "tree-v2:41aaedd9e64befbc0fecc9ff7ea3ea811daa1088ea055614faa0aeef41f8744f" + }, + "tomasvotruba/type-coverage": { + "version": "2.5.1", + "hash": "tree-v2:e6eca12685cfabe12b9ec7829568be31ea87b9c77d66dd1a07c18d08b254751c" + }, + "webmozart/assert": { + "version": "2.5.0", + "hash": "tree-v2:6a5e17ae786f8be693f150a8b7483a3a7ee71b88716a90fe2d5ac9fbd4876588" + } + }, + "minimum-release-age": 7, + "minimum-release-age-exclude": [ + "juststeveking/*", + "roave/security-advisories" + ] +}