Skip to content

Type the rememberToken() migration column as nullable - #2343

Merged
alies-dev merged 1 commit into
4.xfrom
2336-remember-token-nullable
Nov 17, 2026
Merged

alies-dev merged 1 commit into
4.xfrom
2336-remember-token-nullable

Conversation

@alies-dev

@alies-dev alies-dev commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Issue to Solve

Blueprint::rememberToken() always creates a nullable column ($this->string('remember_token', 100)->nullable(), identical on Laravel 12.0 through 13.42), but SchemaAggregator took nullability from the call-site chain. A plain $table->rememberToken() therefore typed remember_token as string instead of string|null.

Related

Fixes #2336

Solution Description

  • SchemaAggregator registers remember_token as always nullable, like the other hardcoded-column helpers (timestamps()).
  • DefaultUserTableTest asserted the old non-nullable column; the assertion is flipped and failed before the fix.
  • Schema dumps are unaffected: SqlSchemaParser reads nullability from the dump's own NOT NULL.

Reviewer note: ->nullable(false) chained after rememberToken() is ignored (theoretical; same as other hardcoded helpers).

Checklist

  • Tests cover the change (tests/Unit)

Blueprint::rememberToken() chains ->nullable() internally, so the column is nullable regardless of the call-site chain.

Fixes #2336
@alies-dev alies-dev self-assigned this Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🐰 Bencher Report

Projectpsalm-plugin-laravel
Branchpr-2343
Testbedintel-v1
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
seconds (s)
(Result Δ%)
Upper Boundary
seconds (s)
(Limit %)
Peak MemoryBenchmark Result
megabytes (MB) x 1e3
(Result Δ%)
Upper Boundary
megabytes (MB) x 1e3
(Limit %)
monica📈 view plot
🚷 view threshold
43.16 s
(-1.69%)Baseline: 43.90 s
47.76 s
(90.36%)
📈 view plot
🚷 view threshold
1.16 MB x 1e3
(+0.17%)Baseline: 1.15 MB x 1e3
1.21 MB x 1e3
(95.40%)
🐰 View full continuous benchmarking report in Bencher

@alies-dev

Copy link
Copy Markdown
Collaborator Author

/psalm-delta all

@alies-dev alies-dev added the release:fix for PRs only (used by release-drafter) label Nov 17, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ Types: unchanged · Performance: unchanged

Apps: all → 23

App Wall (s) Memory (MB) Issues Weighted (types) Taint Coverage (%)
✅ monica 32.7 $\color{gray}{\textsf{+0.7\%}}$ 1 697 5 840 12 475 6 97.06
✅ pixelfed 24.8 $\color{gray}{\textsf{-0.2\%}}$ 1 433 $\color{gray}{\textsf{-0.1\%}}$ 20 187 36 844 59 86.02
✅ coolify 50.6 $\color{gray}{\textsf{+2.3\%}}$ 1 553 19 741 33 957 15 88.89
✅ bookstack 24.6 $\color{gray}{\textsf{+1.8\%}}$ 1 205 $\color{gray}{\textsf{+0.2\%}}$ 3 283 6 136 22 96.68
✅ solidtime 16.8 $\color{gray}{\textsf{-0.3\%}}$ 1 324 $\color{gray}{\textsf{+0.2\%}}$ 1 326 2 366 0 97.97
✅ laravel-socialite 8.6 $\color{gray}{\textsf{+0.6\%}}$ 662 365 859 0 89.54
✅ laravel-permission 11.7 $\color{gray}{\textsf{-3.3\%}}$ 813 426 724 0 88.68
✅ laravel-excel 12.6 $\color{gray}{\textsf{+0.6\%}}$ 864 $\color{gray}{\textsf{+0.1\%}}$ 904 2 150 0 94.29
✅ bagisto 45.5 $\color{gray}{\textsf{+0.5\%}}$ 1 970 $\color{gray}{\textsf{-0.1\%}}$ 17 261 32 104 1 83.67
✅ filament 31.2 $\color{gray}{\textsf{-1.1\%}}$ 1 702 12 026 28 160 878 95.19
✅ unit3d 27.0 $\color{gray}{\textsf{-0.3\%}}$ 1 263 $\color{gray}{\textsf{-0.4\%}}$ 5 672 12 022 5 96.65
✅ vito 14.3 $\color{gray}{\textsf{+2.0\%}}$ 1 054 $\color{gray}{\textsf{-0.1\%}}$ 2 525 3 612 55 96.42
✅ laravel-backup 15.2 $\color{gray}{\textsf{+1.3\%}}$ 815 407 811 0 95.53
✅ corcel 8.3 $\color{gray}{\textsf{+0.5\%}}$ 749 403 1 024 0 87.67
✅ spatie-dashboard 9.3 $\color{gray}{\textsf{-1.9\%}}$ 823 190 333 0 89.42
✅ tastyigniter 12.8 $\color{gray}{\textsf{+1.2\%}}$ 933 $\color{gray}{\textsf{+0.1\%}}$ 38 71 0 100.00
✅ unopim 49.1 $\color{gray}{\textsf{-2.3\%}}$ 2 199 $\color{gray}{\textsf{-0.2\%}}$ 20 367 32 893 56 85.85
✅ m3u-editor 87.7 $\color{gray}{\textsf{+0.5\%}}$ 2 201 $\color{gray}{\textsf{-0.2\%}}$ 22 412 38 206 30 93.41
✅ agent-fleet 57.8 $\color{gray}{\textsf{+0.2\%}}$ 2 550 $\color{gray}{\textsf{-0.6\%}}$ 27 914 51 589 131 93.86
✅ relaticle 43.5 3 814 $\color{gray}{\textsf{-0.3\%}}$ 2 548 4 843 14 98.09
✅ aureuserp 83.7 $\color{gray}{\textsf{+2.8\%}}$ 3 356 $\color{gray}{\textsf{+0.2\%}}$ 33 370 75 628 0 92.57
✅ kanka 66.4 $\color{gray}{\textsf{-0.3\%}}$ 2 466 17 247 33 995 7 94.02
✅ skuul 28.0 $\color{gray}{\textsf{-1.0\%}}$ 1 536 $\color{gray}{\textsf{+0.1\%}}$ 3 505 7 512 3 98.96
Total 762.4 $\color{gray}{\textsf{+0.4\%}}$ 36 979 $\color{gray}{\textsf{-0.1\%}}$ 217 957 418 314 1 282 –
How to read this table
  • Wall: head seconds. A badge is colored only for a move of at least 3 s and 10 %, as shared runners are noisy: slower is red, faster is green, anything smaller is gray.
  • Memory: peak RSS of the largest process in Psalm's process tree, workers included. Red above +5 %, green below −5 %, gray between. A dash means a side has no figure.
  • Issues: head count over all categories, then $\color{red}{\textsf{+added}}$ $\color{green}{\textsf{-removed}}$ against base, and $\color{orange}{\textsf{N changed}}$ for issues at the same place and type with a new message (not counted in added or removed).
  • Weighted (types): type issues weighted by error level (levels 1–8 as is, always-errors 10, strictness checks 1), order-dependent types excluded. Taint and dead-code issues are not weighed. A rise is not necessarily a regression.
  • Taint: head count of Tainted* issues, then $\color{orange}{\textsf{+added}}$ $\color{orange}{\textsf{-removed}}$ against base. Both are orange as either direction needs review: more can be new detection or false positives, fewer can be fixed false positives or lost detection.
  • Dead code: head count of unused-code issues, shown only when a run reported some (--find-dead-code). More is red, fewer is green.
  • Coverage: inferred type coverage. A badge appears only for a move of at least 0.005 points, smaller moves are parallel-analysis jitter.
  • Total: sum over the apps compared on both sides (coverage is not summed). Badge thresholds and the heading words apply per app, not to the total, so the Total row can be colored differently from the heading.
  • Colors: $\color{red}{\textsf{red}}$ worse or more issues, $\color{green}{\textsf{green}}$ better or fewer issues, $\color{orange}{\textsf{orange}}$ needs review, $\color{gray}{\textsf{gray}}$ noise.
  • Icons: ✅ both sides produced a report · ❌ head produced none while base did · 💥 not comparable (base crashed, both crashed, or not run). A crash on both sides is not caused by this PR.
  • Performance (heading): regressed if a head run crashed or a wall or memory badge is red, else improved if one is green, else unchanged. Types (heading): direction of the total weighted change. Taint and Dead code (heading): added and removed counts, present only when non-zero. Informational, never fails the PR.

head 6ead883 · base 2505648 (merge-base) · workflow run

Informational only — never fails the PR. Pick apps with /psalm-delta <group|app> ..., add --find-dead-code-style flags (/psalm-delta help lists both). Reproduce locally: bash bin/ci/delta.sh --apps "<group|app|--flag> ..." <pr-branch>.

@alies-dev
alies-dev merged commit 56f670c into 4.x Nov 17, 2026
23 checks passed
@alies-dev
alies-dev deleted the 2336-remember-token-nullable branch November 17, 2026 23:43
@alies-dev
alies-dev restored the 2336-remember-token-nullable branch November 17, 2026 23:43
@alies-dev
alies-dev deleted the 2336-remember-token-nullable branch November 17, 2026 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:fix for PRs only (used by release-drafter)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

rememberToken() migration column is typed as non-nullable

1 participant