Conversation
…ace→Scope, Model to L13 contracts (task 2.5e)
Safe, type-caught slice of task 2.5 (Database). No alias — old FQCNs fatal
so the app is forced to conform (task 2.5f, lockstep).
- SoftDeletingTrait → SoftDeletes; boot hook bootSoftDeletingTrait() →
bootSoftDeletes() (MUST match the new trait basename or Eloquent silently
stops registering SoftDeletingScope → soft-deleted rows leak). Proven by
DatabaseEloquentBuilderTest:486 (fails when the hook name is wrong).
- ScopeInterface → Scope; SoftDeletingScope + Model typehints updated.
- Model implements Illuminate\Contracts\Support\{Arrayable,Jsonable} (were
Illuminate\Support\Contracts\{ArrayableInterface,JsonableInterface}); the 2
Model instanceof checks migrated to Arrayable. BC-safe: old contracts extend
the new ones, so instanceof Arrayable is strictly wider.
Does NOT touch lists()/pluck() — that dangerous semantic swap is the separate
2.5a–d pipeline. Fork suites green (Database 513, Support/Http/View 199).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
Superseded by #64 ( |
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.
Slice aman & type-caught dari task 2.5 (Database) — bagian L42x→L13 migration. Bukan pluck/lists swap (itu pipeline 2.5a–d yang terpisah & berbahaya).
Perubahan (fork)
SoftDeletingTrait→SoftDeletes(+ boot hookbootSoftDeletingTrait()→bootSoftDeletes()).ScopeInterface→Scope(SoftDeletingScope+ typehint Model di-update).ModelimplementsIlluminate\Contracts\Support\{Arrayable,Jsonable}(duluIlluminate\Support\Contracts\{ArrayableInterface,JsonableInterface}); 2instanceofdi Model dimigrasikan keArrayable.Kenapa aman
bootSoftDeletesharus match basename trait baru, kalau nggak SoftDeletingScope diam-diam berhenti register → row ke-soft-delete bocor. Dibuktikan lewat negative-check:DatabaseEloquentBuilderTest:486merah kalau nama boot salah, hijau kalau bener.ArrayableInterface extends Arrayable(new), jadiinstanceof Arrayablestrictly lebih lebar — nangkep old+new implementers.Verifikasi
No-alias → begitu fork build ini dipromosikan ke app, app fatal sampai 2.5f (conform: 7 file kode + 3 config alias,
SoftDeletingTrait→SoftDeletes,ArrayableInterface→Arrayable) landing. Jangan promote build ke app sebelum 2.5f siap.🤖 Generated with Claude Code