Skip to content

[13.x] Fix examples and descriptions that don't match framework behavior - #11387

Merged
taylorotwell merged 1 commit into
laravel:13.xfrom
GabeSilvaDev:fix/behavior-mismatches
Sep 30, 2026
Merged

taylorotwell merged 1 commit into
laravel:13.xfrom
GabeSilvaDev:fix/behavior-mismatches

Conversation

@GabeSilvaDev

Copy link
Copy Markdown
Contributor

A few examples and descriptions in the docs don't match the behavior of Laravel 13.x. I checked each case against the framework.

In validation.md, the comment for Password::min(8)->uncompromised(3) says the password must have appeared less than 3 times. NotPwnedVerifier only fails when the count is greater than the threshold, so a password seen exactly 3 times still passes.

The online index example in migrations.md also doesn't produce the result shown. Chaining ->online() after ->unique() on the column definition doesn't add the CONCURRENTLY flag. Applying online() to the index definition does:

$table->unique('email')->online();

In pagination.md, the User::paginate() JSON example includes current_page_url, but LengthAwarePaginator::toArray() doesn't return that key. That key is present on the simple Paginator instead.

Finally, requests.md says that integer() uses the default when the cast fails. The method uses a plain (int) cast, so a non-numeric value becomes 0; the default is only used when the input is missing.

?per_page=abc  -> integer('per_page', 15) => 0
missing        -> integer('per_page', 15) => 15

These examples and descriptions are updated to match the actual 13.x behavior.

Copilot AI balanced review requested due to automatic review settings September 30, 2026 15:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants