Skip to content

chore(release): integrate L13 migration wave — tasks 3.1–3.5 (dev-13 → master) - #47

Merged
agissept merged 12 commits into
masterfrom
dev-13
Sep 15, 2026
Merged

agissept merged 12 commits into
masterfrom
dev-13

Conversation

@agissept

Copy link
Copy Markdown
Member

Bawa hasil migrasi L13 yang sudah kelar di dev-13 ke master. Bukan full migration — cuma tasks 3.1–3.5 yang sudah merged + tervalidasi.

Isi (6 task, urut)

PR Task Ringkas
#35 3.1 introduce Illuminate\Contracts namespace
#36 3.2 promote Macroable + Conditionable & Pipeline
#37 3.3a break SCC-1 (decouple Support dari Http & Container)
#38 3.3b bring Collection/Arr ke bentuk L13
#40 3.4 implement Contracts\Session\Session, decouple Store dari Symfony
#41 3.5 converge Config/Log/Filesystem ke API L13

Divergence master ↔ dev-13 (aman)

Validasi

  • Tiap task PR hijau di CI (PHP 8.4.23): Unit testing + Convergence ratchet (no new 4.2-only patterns).
  • Task 3.4 & 3.5 juga sudah diverifikasi live di canary awsnode-99 (login/persist/CSRF/remember-me untuk 3.4; logging/daily-file untuk 3.5).

Dampak ke app

Aplikasi consume dev-dev-13 (branch), bukan master — jadi ini kanonikalisasi framework, bukan deploy prod. App tetap narik dev-13 sampai di-repoint terpisah.

Belum termasuk

Stack #42#46 (tasks 3.6–3.9, 2.11) masih open → menyusul di rilis berikutnya.

🤖 Generated with Claude Code

agissept and others added 12 commits September 11, 2026 15:45
- 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.
… 3.2)

Wave 3.2 dari roadmap framework-first (blocked-by 3.1 Contracts).
Drop-in verbatim dari referensi Laravel 13 (v13.30.1) — memutus
langkah berikutnya yang butuh idiom `->when()` / `::macro()` L13.

- Macroable (Support\Traits\Macroable): signature L13 (mixin/flushMacros,
  Closure bind ke instance/kelas). `MacroableTrait` jadi alias
  backward-compatible (`use Macroable`) → 8 konsumen fork tak putus.
- Conditionable (when/unless) + HigherOrderWhenProxy — trait fondasi baru,
  tak ada di 4.2.
- Pipeline (send/through/via/then/thenReturn/...) + Hub +
  PipelineServiceProvider + Contracts\Pipeline\{Pipeline,Hub}. Inert sampai
  konsumen (Router/Kernel/Bus/Queue) direshape di wave berikutnya.
- Contracts\Support\DeferrableProvider (marker) — dibutuhkan provider.

Test: tests/Support/SupportMacroableConditionablePipelineTest.php (5).
Full suite hijau; convergence-ratchet lolos.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…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>
Copy the v13 collection-family into the fork's Support tree so the
Collection surface matches Laravel 13, sourced verbatim from the clean
v13.30.1 tag (git show) — NOT the local ../framework working tree, which
sits on an inconsistent merge branch.

New files: Enumerable, Traits/EnumeratesValues, LazyCollection,
HigherOrderCollectionProxy, Item/MultipleItemsFoundException, functions.php
(enum_value), Contracts/Support/CanBeEscapedWhenCastToString, and a minimal
SortDirection enum reconstructed because v13 references it from
Collection::sort*() but ships no defining file.

Two deliberate deviations from verbatim copy:
- strip `TransformsToResourceCollection` from Collection — it pulls in
  Http\Resources and would undo the SCC-1 decoupling from task 3.3a.
- keep the 4.2 holdovers the fork's Database layer still calls
  (Collection::lists()/fetch(), Arr::build()/fetch()); removed in task 2.5.

Arr: keep the fork class (first/last already v13 value-first), add
from/mapWithKeys/partition/select, and flip Arr::where to v13 value-first
semantics (fix its whereNotNull + UrlGenerator callers).

Eloquent\Collection (only Collection subclass): widen contains()/unique()
and delegate the v13 args to parent; drop the now-redundant max()/min()
overrides (base v13 handles model collections via data_get).

Update SupportCollectionTest/SupportArrTest assertions to v13 semantics
(immutable sort, key-preserving chunk/takeLast, keys()->Collection,
random-on-empty throws, toJson via jsonSerialize, offsetExists via isset)
and MorphTo::gatherKeysByType (->values()) for v13 map key-preservation.

Full suite green (1641); SCC-1 stays broken; ratchet baseline tightened
(macroable_trait 14->12, legacy_contracts 50->37).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e from Symfony (task 3.4)

Bring Illuminate\Session\Store to the L13 shape: it now implements
Illuminate\Contracts\Session\Session (introduced in task 3.1) instead of the
Symfony-extending Illuminate\Session\SessionInterface. All Symfony HttpFoundation
coupling is removed from the store — the bag machinery ($bags/$metaBag/$bagData,
registerBag/getBag/getMetadataBag/getBagData, the loadSession/save bag loops,
clear()), the SessionBagInterface/MetadataBag/Request imports, and the
$lifetime params on invalidate()/migrate(). Adds the contract-required exists().

The Symfony bridge is the ported v13 SymfonySessionDecorator: Http\Request now
mirrors v13 (setLaravelSession/session()/getSession()/hasSession()) so the store
is wrapped in the decorator for Symfony-facing code while $request->session()
still returns the unwrapped Store. The two setSession callsites (Session\Middleware
and Application::prepareRequest) switch to setLaravelSession. The deleted
SessionInterface.php is dropped from the optimize compile list.

Deliberate fork-superset deviations (removed later, not needed to decouple Symfony):
- keep set()/replace()/remove()/getToken() — set()'s 7 app call sites migrate to
  put() in a later B2 task; dropping now buys no decoupling.
- keep flash.{new,old} keys (not v13 _flash.*) — a live-session data-cutover
  concern for the swap window, marked with a ponytail comment.

SCC-1 stays broken; ratchet unchanged (no new 4.2 patterns). Full suite green
(1641). Session suite green (23); 3 request/routing tests updated to the
setLaravelSession idiom.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Config\Repository:
- Add Macroable trait + implements Contracts\Config\Repository
- Add typed accessors: string(), integer(), float(), boolean(), array()
- Add getMany(), prepend(), push(), all()

Log\Writer -> Logger:
- Rename class to Logger, implement Psr\Log\LoggerInterface
- Add Conditionable trait, write() L13 signature
- Add getLogger(), withContext(), withoutContext()
- Keep BC: getMonolog(), useFiles/useDailyFiles/useErrorLog

Filesystem\Filesystem:
- Add Macroable + Conditionable traits
- Widen 7 method signatures (get/append/getRequire/requireOnce/files/allFiles/directories)
- Add 20 L13 methods (missing/json/hash/replace/chmod/link/basename/...)
- FilesystemServiceProvider: bindShared -> singleton

Update all internal references (Mailer, Facade, Application alias map, tests).
feat(contracts): introduce Illuminate\Contracts namespace
…itionable-pipeline

feat(support): promote Macroable + add Conditionable & Pipeline (task 3.2)
…tion-scc1

refactor(support): break SCC-1 — decouple Support from Http & Container (task 3.3a)
feat(support): bring Collection/Arr to L13 shape (task 3.3b)
…y-decouple

refactor(session): implement Contracts\Session\Session, decouple Store from Symfony (task 3.4)
…esystem

feat(support): converge Config/Log/Filesystem to L13 API (task 3.5)
@agissept
agissept merged commit 4d327ef into master Sep 15, 2026
2 checks passed
@agissept
agissept deleted the dev-13 branch September 15, 2026 06:16
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