~/talk

Refactoring a large legacy PHP Application: a case study

Talkat phpDay 2018 · 2018-05-11..05-12· [php, devops-and-delivery]
slides:none on file

A ten‑year old PHP monolith with thousands of unused lines and procedural controllers gets incrementally reshaped: a critical mail parser (the Beast) is tested and refactored (first attempt breaks things because intent is unclear), arrays become domain objects like DealerConfig and Vehicle models, a small custom simple data mapper replaces Doctrine, a new API lives in an App Island, weekly training plus a technical debt board yields migrations, CI, Composer autoloading, and steady reduction of legacy cruft.

AI-written summary · about

  1. 0:00Intro
  2. 1:06A bit of context
  3. 3:15"Living" Documentation
  4. 4:01Procedural code disguised as OO code No well established architecture No automated tests
  5. 8:20Mail parser aka "the beast"
  6. 9:27Pair programming on regular tasks
  7. 11:08Configuration system
  8. 19:40Code organization
  9. 21:24the code *must not use external code the code *must be tested
  10. 22:07Models + Repository Use Case
  11. 35:04Bad Idea: having 2 different approaches
  12. 35:24Code encapsulating business logic
  13. 38:05Use cases are no interchangeable
  14. 42:31Bad Idea: being optimist about preserving code quality
  15. 42:41Enforce good habits when developing
  16. 43:19Current directory structure was not clear enough
  17. 45:46Telemetry Controller Model Repository Use Case
  18. 47:10Testing
  19. 49:06Introducing big changes
  20. 54:42Eroding code from old controllers Identify Contexts
  21. 55:50Not everything can be rafactored
  22. 56:21Work on code and people
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 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
?
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.