Repository navigation
[13.x] Fix resolveClassAttribute() cache key omitting the property - #60815
Merged
taylorotwell merged 1 commit intoJul 16, 2026
Merged
Conversation
binaryfire
added a commit
to hypervel/components-backup
that referenced
this pull request
Oct 1, 2026
Port refreshForUpdate with the shared refresh query path, upstream unit and integration coverage, and usage documentation. Preserve model key validation and relationship reload behavior. Make relationship touching honor WithoutTimestamps and the same property/attribute precedence as model initialization. Disabled models could otherwise write updated_at, including on tables without that column. Strengthen the precedence cases and reconcile both attribute cache-order tests against the existing instance-based cache. Complete the missing multi-attribute touch model test and documentation. Use the upstream keyed AsPivot lookup in the moved refresh helper; the rest of the trait lookup PR remains under reconciliation. Upstream: laravel/framework at 01d008c9b5f32cb7c5e50a9a22273113d810b2a2. laravel/framework#61247 laravel/framework#59175 laravel/framework#61073 laravel/framework#60815 laravel/framework#59457 Validation: timestamp precedence regressions failed before the correction and pass afterward; SQLite relation touching verifies inherited disabling. Changed test files, affected Eloquent ParaTest, full source/type analysis, and scoped formatting pass. Refresh integration tests also pass after the final trait lookup correction.
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.
resolveClassAttribute()leaves$propertyout of its cache key, so the object form and the property form of the same attribute share one cache slot. For#[Table]this collidesinitializeModelAttributes(), which caches theTableobject, withisIgnoringTouch(), which caches thetimestampsbool, so whichever runs first for a given model wins and#[Table(timestamps: false)]is silently ignored: the model is either still touched by its relations, or loses its table name and timestamps altogether, depending on call order. Adding$propertyto the key keeps the two forms apart.Fixes #60803