Skip to content

refactor(pagination): rename Paginator getters to L13 names (task 2.15, part 1) - #53

Merged
agissept merged 1 commit into
pre-release/4.2.94from
migration/2.15-pagination-getters
Sep 16, 2026
Merged

agissept merged 1 commit into
pre-release/4.2.94from
migration/2.15-pagination-getters

Conversation

@agissept

Copy link
Copy Markdown
Member

Task 2.15 (part 1) — Paginator getter rename [fork]

Konvergensi accessor Paginator yang dipakai template/controller app ke surface L13 (strict-mode: getter lama dihapus → method-not-found → memaksa app conform).

L4.2 L13
getCurrentPage() currentPage()
getLastPage() lastPage()
getFrom() firstItem()
getTo() lastItem()
getPerPage() perPage()
getTotal() total()
getItems() items()

Caller fork-internal ikut diupdate: Presenter, 3 view template bundled, BelongsToMany::paginate hydration, test Pagination. links() tetap. Factory pagination tetap punya getCurrentPage() sendiri (wiring internal) — tak disentuh di sini.

Ratchet: pagination_getters 15 → 10 (5 sisa = call getCurrentPage() ke Factory di Query/Eloquent Builder). Baseline diupdate.

⏭️ Ditunda ke window Database (task 2.5)

Membuang Factory pagination + Presenter/BootstrapPresenter dan drop arg $factory di ctor Paginator merewire ->paginate() lintas Connection/Query\Builder/Eloquent\Builder — itu bagian kerja Database (XL), bukan di sini. Jadi PR ini sengaja = bagian getter (bernilai app-facing, bounded, low-risk).

Verifikasi

phpunit tests/Pagination40 hijau; Database builder + BelongsToMany relation tests hijau; lint bersih; DB-builder Factory-getter dipastikan tak tersentuh.

Urutan

Stacked di atas #52 (stack: #45#46#48#52ini). Blocker (1.1) ✅.

🤖 Generated with Claude Code

…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>
@agissept agissept self-assigned this Sep 15, 2026
Base automatically changed from migration/2.14-view-strict-mode to pre-release/4.2.94 September 16, 2026 03:05
@agissept
agissept merged commit 813a198 into pre-release/4.2.94 Sep 16, 2026
2 checks passed
@agissept
agissept deleted the migration/2.15-pagination-getters branch September 16, 2026 03:06
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