Skip to content

feat(contracts): introduce Illuminate\Contracts namespace - #35

Open
agissept wants to merge 1 commit into
dev-13from
migration/3.1-contracts
Open

feat(contracts): introduce Illuminate\Contracts namespace#35
agissept wants to merge 1 commit into
dev-13from
migration/3.1-contracts

Conversation

@agissept

Copy link
Copy Markdown
Member

Langkah fondasi migrasi framework-first (rencana #33; setelah split-map #34): introduce Illuminate\Contracts — lapisan interface yang memutus SCC-1 (import konkret Facade/komponen → interface), prasyarat semua rename namespace berikutnya.

Isi

  • 39 interface Contracts ditambahkan (Auth, Bus, Cache, Config, Container, Cookie, Database, Encryption, Events, Filesystem, Hashing, Http, Mail, Queue, …) dengan signature sesuai Laravel 13.
  • Backward-compatible: Support\Contracts\*Interface lama sekarang extend Contracts\* baru → instanceof jalan dua arah, kode lama tak putus.
  • Migrasi callsite internal: Response, View, dan tests.

Enforcement (framework-first)

By-presence: begitu komponen type-hint Contracts\X, PHP + Psalm menangkap consumer yang tak konform. Tidak ada perubahan perilaku runtime.

Catatan

  • Nol perubahan composer.json — sesuai gotcha "introduce Contracts = PSR-only, JANGAN tambah illuminate/*" (menghindari false-cycle dari type-hint cross-import). Fork tak replace contracts, jadi aman.
  • Ini = task 1.1 di roadmap framework-first yang direstrukturisasi (docs(migration): restructure roadmap to framework-first / strict-mode-L13 #33), setara "3.1 Introduce Contracts" di penomoran lama.

🤖 Generated with Claude Code

- Add 39 core Contracts interfaces matching L13 signatures
- Old Support\Contracts\*Interface now extend new Contracts\Support\*
  (backward compatible: instanceof checks work both ways)
- Migrate internal callsites: Response, View, and tests

This unblocks SCC-1 cycle breaking by introducing the interface layer
between Support and other core components.
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.

1 participant