Skip to content

Commit 8c1b903

Browse files
committed
bump dependencies
1 parent 8c6db29 commit 8c1b903

65 files changed

Lines changed: 826 additions & 522 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/laravel-best-practices/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Check sibling files, related controllers, models, or tests for established patte
9494
### 9. Queue & Job Patterns → `rules/queue-jobs.md`
9595

9696
- `retry_after` must exceed job `timeout`; use exponential backoff `[1, 5, 10]`
97-
- `ShouldBeUnique` to prevent duplicates; `WithoutOverlapping::untilProcessing()` for concurrency
97+
- `ShouldBeUnique` to prevent duplicates; `ShouldBeUniqueUntilProcessing` for early lock release
9898
- Always implement `failed()`; with `retryUntil()`, set `$tries = 0`
9999
- `RateLimited` middleware for external API calls; `Bus::batch()` for related jobs
100100
- Horizon for complex multi-queue scenarios

.agents/skills/laravel-best-practices/rules/architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ $this->app->bind(PaymentGateway::class, StripeGateway::class);
8282

8383
## Default Sort by Descending
8484

85-
When no explicit order is specified, sort by `id` or `created_at` descending. Explicit ordering prevents cross-database inconsistencies between MySQL and Postgres.
85+
When no explicit order is specified, sort by `id` or `created_at` descending. Without an explicit `ORDER BY`, row order is undefined.
8686

8787
Incorrect:
8888
```php

.agents/skills/laravel-best-practices/rules/caching.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Use `Cache::remember()` Instead of Manual Get/Put
44

5-
Atomic pattern prevents race conditions and removes boilerplate.
5+
Cleaner cache-aside pattern that removes boilerplate. use `Cache::lock()` for race conditions.
66

77
Incorrect:
88
```php

.agents/skills/laravel-best-practices/rules/config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## `env()` Only in Config Files
44

5-
Direct `env()` calls return `null` when config is cached.
5+
Direct `env()` calls may return `null` when config is cached.
66

77
Incorrect:
88
```php

.agents/skills/laravel-best-practices/rules/events-notifications.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ class InvoicePaid extends Notification implements ShouldQueue
2929

3030
## Use `afterCommit()` on Notifications in Transactions
3131

32-
Same race condition as events — the queued notification job may run before the transaction commits.
32+
Same race condition as events — call `afterCommit()` to delay dispatch until the transaction commits.
33+
34+
```php
35+
$user->notify((new InvoicePaid($invoice))->afterCommit());
36+
```
3337

3438
## Route Notification Channels to Dedicated Queues
3539

.agents/skills/laravel-best-practices/rules/http-client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ $response = Http::retry([100, 500, 1000])
5252
Only retry on specific errors:
5353

5454
```php
55-
$response = Http::retry(3, 100, function (Exception $exception, PendingRequest $request) {
55+
$response = Http::retry(3, 100, function (Throwable $exception, PendingRequest $request) {
5656
return $exception instanceof ConnectionException
5757
|| ($exception instanceof RequestException && $exception->response->serverError());
5858
})->post('https://api.example.com/data');

.agents/skills/laravel-best-practices/rules/mail.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A queued mailable dispatched inside a transaction may process before the commit.
1010

1111
## Use `assertQueued()` Not `assertSent()` for Queued Mailables
1212

13-
`Mail::assertSent()` only catches synchronous mail. Queued mailables silently pass `assertSent`, giving false confidence.
13+
`Mail::assertSent()` only catches synchronous mail. Queued mailables fail `assertSent` with a "Did you mean to use assertQueued()?" hint.
1414

1515
Incorrect: `Mail::assertSent(OrderShipped::class);` when mailable implements `ShouldQueue`.
1616

.agents/skills/laravel-best-practices/rules/queue-jobs.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,19 +112,17 @@ public function retryUntil(): \DateTimeInterface
112112
}
113113
```
114114

115-
## Use `WithoutOverlapping::untilProcessing()`
115+
## Use `ShouldBeUniqueUntilProcessing` for Early Lock Release
116116

117-
Prevents concurrent execution while allowing new instances to queue.
117+
`ShouldBeUnique` holds the lock until the job completes. `ShouldBeUniqueUntilProcessing` releases it when processing starts, allowing new instances to queue.
118118

119119
```php
120-
public function middleware(): array
120+
class UpdateSearchIndex implements ShouldQueue, ShouldBeUniqueUntilProcessing
121121
{
122-
return [new WithoutOverlapping($this->product->id)->untilProcessing()];
122+
// Lock releases when processing begins, not when it finishes
123123
}
124124
```
125125

126-
Without `untilProcessing()`, the lock extends through queue wait time. With it, the lock releases when processing starts.
127-
128126
## Use Horizon for Complex Queue Scenarios
129127

130128
Use Laravel Horizon when you need monitoring, auto-scaling, failure tracking, or multiple queues with different priorities.

.agents/skills/laravel-best-practices/rules/routing.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ Use `Route::resource()` or `apiResource()` for RESTful endpoints.
3636

3737
```php
3838
Route::resource('posts', PostController::class);
39-
Route::apiResource('api/posts', Api\PostController::class);
39+
// In routes/api.php — the /api prefix is applied automatically
40+
Route::apiResource('posts', Api\PostController::class);
4041
```
4142

4243
## Keep Controllers Thin

.agents/skills/laravel-best-practices/rules/security.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Use policies or gates in controllers. Never skip authorization.
3232

3333
Incorrect:
3434
```php
35-
public function update(Request $request, Post $post)
35+
public function update(UpdatePostRequest $request, Post $post)
3636
{
3737
$post->update($request->validated());
3838
}
@@ -90,7 +90,7 @@ Correct:
9090

9191
## CSRF Protection
9292

93-
Include `@csrf` in all POST/PUT/DELETE Blade forms. Not needed in Inertia.
93+
Include `@csrf` in all POST/PUT/DELETE Blade forms. In Inertia apps, the `@csrf` directive is automatically applied.
9494

9595
Incorrect:
9696
```blade
@@ -121,7 +121,7 @@ Route::post('/login', LoginController::class)->middleware('throttle:login');
121121

122122
## Validate File Uploads
123123

124-
Validate MIME type, extension, and size. Never trust client-provided filenames.
124+
Validate extension, MIME type, and size. The `mimes` rule checks extensions; use `mimetypes` for actual MIME type validation. Never trust client-provided filenames.
125125

126126
```php
127127
public function rules(): array

0 commit comments

Comments
 (0)