Repository navigation
Type the rememberToken() migration column as nullable - #2343
Merged
Merged
Conversation
Blueprint::rememberToken() chains ->nullable() internally, so the column is nullable regardless of the call-site chain. Fixes #2336
Contributor
|
| Project | psalm-plugin-laravel |
| Branch | pr-2343 |
| Testbed | intel-v1 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result seconds (s) (Result Δ%) | Upper Boundary seconds (s) (Limit %) | Peak Memory | Benchmark 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%) |
Collaborator
Author
|
/psalm-delta all |
Contributor
✅ Types: unchanged · Performance: unchangedApps: all → 23
How to read this table
head 6ead883 · base 2505648 (merge-base) · workflow run Informational only — never fails the PR. Pick apps with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue to Solve
Blueprint::rememberToken()always creates a nullable column ($this->string('remember_token', 100)->nullable(), identical on Laravel 12.0 through 13.42), butSchemaAggregatortook nullability from the call-site chain. A plain$table->rememberToken()therefore typedremember_tokenasstringinstead ofstring|null.Related
Fixes #2336
Solution Description
SchemaAggregatorregistersremember_tokenas always nullable, like the other hardcoded-column helpers (timestamps()).DefaultUserTableTestasserted the old non-nullable column; the assertion is flipped and failed before the fix.SqlSchemaParserreads nullability from the dump's ownNOT NULL.Reviewer note:
->nullable(false)chained afterrememberToken()is ignored (theoretical; same as other hardcoded helpers).Checklist
tests/Unit)