refactor(support): break SCC-1 — decouple Support from Http & Container (task 3.3a) - #37
Open
agissept wants to merge 1 commit into
Conversation
…er (task 3.3a) Wave 3.3 (slice: SCC-1 break saja; Collection→sig L13 ditunda ke task terpisah). Menghapus dua satu-satunya edge konkret Support→core yang menjerat 11-node SCC-1: Support→Container: - CapsuleManagerTrait: typehint `Contracts\Container\Container` (verbatim L13), drop default `?: new Container`. Database/Queue Capsule\Manager instansiasi default konkret sendiri (`$container ?: new Container`). - Container konkret kini `implements Contracts\Container\Container` (extends PSR); `factory()` param dilebarkan (drop typehint `string`) supaya kompatibel kontrak. Support→Http: - `Support\Facades\Response` jadi Facade accessor murni (→ Contracts\Routing\ ResponseFactory), tak lagi `use Illuminate\Http\*` / `new` konkret. - Logika response dipindah ke `Routing\ResponseFactory implements Contracts\Routing\ResponseFactory` (trim: make/view/json/jsonp/stream/download — method yang fork punya; bukan port penuh L13). 'view' di-resolve lazily dari container (perilaku facade lama) supaya make()/json() jalan tanpa 'view' bound. - Binding di `RoutingServiceProvider::registerResponseFactory()`. Verifikasi: grep edge Support→Http/Container konkret = 0; full suite hijau (1640); ratchet lolos. Test: SupportFacadeResponseTest diadaptasi (facade+container) + 2 test baru (make tanpa view, view lazy-resolve). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
agissept
force-pushed
the
migration/3.2-macroable-conditionable-pipeline
branch
from
September 11, 2026 08:46
34b4ec2 to
428cba6
Compare
agissept
force-pushed
the
migration/3.3-support-collection-scc1
branch
from
September 11, 2026 08:46
36d9dd7 to
f017321
Compare
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.
Wave 3.3 — slice: putus SCC-1 saja. Rewrite
Collectionke signature L13 sengaja ditunda ke task terpisah (risiko seluruh-app beda kelas, ortogonal ke cycle-break). Stacked di atas #36 (retarget ke master setelah chain merge).Tujuan
Menghapus dua satu-satunya edge konkret Support→core yang menjerat 11-node SCC-1 (support/container/http/session/cache/database/cookie/encryption/events/filesystem/redis). Setelah ini,
Supporttak lagiusekelas konkretHttp/Container→ cycle putus → prasyarat package-swap per-cluster terbuka.Support → Container
CapsuleManagerTrait: typehintContracts\Container\Container(verbatim L13), drop default?: new Container.Database\Capsule\Manager&Queue\Capsule\Managerkini instansiasi default konkret sendiri ($container ?: new Container) — konkret pindah ke komponen yang memang berhak.Containerkonkret kiniimplements Contracts\Container\Container(kontrakextendsPSRContainerInterface). Satu-satunya penyesuaian:factory()param dilebarkan (buang typehintstring) agar kompatibel LSP dengan kontrak.bindMethod/beforeResolving/afterResolvingsudah ada.Support → Http
Support\Facades\Responsejadi Facade accessor murni (→Contracts\Routing\ResponseFactory), tak lagiuse Illuminate\Http\*ataunewkonkret.Routing\ResponseFactory implements Contracts\Routing\ResponseFactory— trim:make/view/json/jsonp/stream/download(hanya method yang fork punya; bukan port penuh L13 yang bawa Redirector/eventStream/file/Js).viewdi-resolve lazily dari container (persis perilaku facade statik lama) supayamake()/json()tetap jalan walauviewbelum bound.ponytail:note menandai upgrade path keContracts\View\Factoryinjeksi konstruktor begituViewimplement kontraknya.RoutingServiceProvider::registerResponseFactory().Verifikasi
grepedgeuse Illuminate\{Http,Container}\konkret disrc/Illuminate/Support/= 0.SupportFacadeResponseTestdiadaptasi (facade + container real) + 2 test baru (make()tanpaviewbound,view()lazy-resolve).Catatan
Contracts\Routing\ResponseFactorysengaja di-trim ke 6 method fork; saat swap keilluminate/routingv13, accessor tetap nunjuk kontrak yang sama (v13 bind superset) — aman.Support\Collection951→2009 baris ke API L13 + pisah keCollections/.🤖 Generated with Claude Code