~/talk

Building Robust Applications with readonly class

TalkinJapaneseat PHP Conference Japan 2023 · on Sunday, 2023-10-08· [php]
links:none on file
slides:none on file

Shows how using PHP 8.2 readonly classes makes domain objects immutable to prevent mysterious in-place state changes and simplify reasoning. Describes migrating ~250 legacy domain classes (about 70% complete), and practical issues encountered: Eloquent models are mutable so require per-record → domain conversion and repository layers; array-based instance caches need redesign; and modified instances are created via copy/with patterns or clone helper packages. Also notes a production bug that was exposed by previously lax typing.

AI-written summary · about

  1. 0:00Introduction
  2. 2:27What is readonly class
  3. 4:36Why use readonly class
  4. 9:55When to use readonly class
  5. 14:10Challenges with readonly class
  6. 22:03Summary
  7. 23:11Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.