Skip to content

Merge pull request from dicoding-dev/pre-release/4.2.94 - #58

Merged
agissept merged 7 commits into
masterfrom
pre-release/4.2.94
Sep 17, 2026
Merged

agissept merged 7 commits into
masterfrom
pre-release/4.2.94

Conversation

@agissept

Copy link
Copy Markdown
Member

Pre-release 4.2.94 — fork-tighten Wave 2 slice (stacked PR #52/#53/#54).

Tasks

  • 2.14 — View: drop named-view sugar, converge ke L13 flushState + rename internal.
  • 2.15 — Pagination: rename Paginator getters ke nama L13 + reshape Presenter/views.
  • 2.12 — Cookie/Session: widen CookieJar queue ke shape path-aware L13; widen make()/forever() dengan raw + sameSite (part 1 & 2).

Notes

  • Semua perubahan fork-only (strict-mode tighten); app-conform menyusul di RC.
  • ci/convergence-baseline.txt di-bump sesuai pola non-type.
  • Divergen dari master (belum berisi merge 4.2.92/4.2.93) tapi merge-tree bersih tanpa konflik.

🤖 Generated with Claude Code

agissept and others added 7 commits September 15, 2026 17:11
…sk 2.14)

Strict-mode tighten of View\Factory to the L13 surface:

- Remove named-view sugar removed in L13: `of()`, `name()`, `alias()`,
  `getNames()` + the `$names`/`$aliases` properties and the alias
  normalization in `make()`. Any surviving caller is now method-not-found
  (PHP+Psalm) — the forcing function for app conform.
- Rename render-flush to L13 names: add `flushState()` (owns renderCount +
  delegates to flushSections), rename `flushSectionsIfDoneRendering()` ->
  `flushStateIfDoneRendering()`; `flushSections()` stays (sections-only, as
  in L13's ManagesLayouts). Update View::render() callers.
- Keep `BladeCompiler::extend()` (not stripped pre-swap).

Tests: drop the 3 obsolete Factory tests (named views / alias make);
retarget View flush mocks to flushStateIfDoneRendering. tests/View green
(121 tests, 193 assertions).

App side (separate, in dicoding repo): 2 `Blade::extend` -> `Blade::directive()`
is convergence, not forced (extend() kept).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…5, part 1)

Converge the app-facing Paginator accessors to the L13 surface (strict-mode:
old getters removed -> method-not-found forces app/template conform):

  getCurrentPage -> currentPage   getLastPage -> lastPage
  getFrom -> firstItem            getTo -> lastItem
  getPerPage -> perPage           getTotal -> total
  getItems -> items

Update fork-internal Paginator callers: Presenter, the 3 bundled view
templates, BelongsToMany::paginate hydration, and the Pagination tests.
links() unchanged. The pagination Factory keeps its own getCurrentPage()
(internal wiring), untouched here.

Ratchet: pagination_getters 15 -> 10 (the 5 remaining are Factory
getCurrentPage() calls in Query/Eloquent Builder). Baseline updated.

Deferred to the Database-entangled window (task 2.5): removing the pagination
Factory + Presenter/BootstrapPresenter and dropping the Paginator $factory
ctor arg -- those rewire ->paginate() across Connection/Query\Builder/
Eloquent\Builder, so they ship with the Database work, not here.

Tests: tests/Pagination green (40), Database builder/relation tests green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… 2.12, part 1)

Converge the CookieJar queue surface to L13 (additive / callability widen):

- Path-aware queued storage: queue() now nests as [name][path]; queued(),
  hasQueued(), unqueue() take an optional $path (null = last-for-name, L13
  semantics). getQueuedCookies() flattens to a Cookie[] list (Arr::flatten)
  -- the Queue decorator + QueueingFactory consumers foreach over values, so
  they are unaffected.
- Add expire($name, $path, $domain) and flushQueuedCookies() (L13 methods).

Tests: switch the queued/unqueue asserts from array-key to hasQueued()
(getQueuedCookies is now a flat list) + add path-aware and expire/flush
coverage. tests/Cookie green (6), Auth/Session cookie tests green.

Deferred (flip/swap-coupled, task 2.12 remainder): make()/forever() raw +
sameSite params (security-relevant Symfony default), jar-default secure/
sameSite on setDefaultPathAndDomain, CookieValuePrefix (v2 HMAC), and the
EncryptCookies/AddQueuedCookiesToResponse/StartSession/AuthenticateSession
middleware (Guard/Queue decorator rewrite, kernel-flip-coupled). Session
Contracts decouple already landed (task 3.4, #40).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…12, part 2)

Add the L13 raw + sameSite params to make()/forever() and route secure/
sameSite through getPathAndDomain via new jar defaults. Additive and
behavior-preserving: the jar SameSite default is 'lax' (the effective
Symfony/L4.2 default today) rather than L13's null, so existing 7-arg callers
are unchanged; apps can now set per-cookie sameSite/raw.

setDefaultPathAndDomain kept at ($path, $domain) here -- widening its
secure/sameSite would null-out SameSite for current 2-arg callers, so it
ships with the config-driven EncryptCookies middleware (deferred).

Tests: +testSameSiteAndRawWidening (default 'lax' + overrides). tests/Cookie
green (7), Auth/Session cookie tests green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
refactor(view): drop named-view sugar, converge to L13 flushState (task 2.14)
…tters

refactor(pagination): rename Paginator getters to L13 names (task 2.15, part 1)
refactor(cookie): widen CookieJar to L13 shape — queue path-aware + make sameSite/raw (task 2.12)
@agissept
agissept merged commit 84bff85 into master Sep 17, 2026
2 checks passed
@agissept
agissept deleted the pre-release/4.2.94 branch September 17, 2026 07:27
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