Extremely defensive PHP
summary
Argues for concrete rules: no setters and constructor injection so optional dependencies disappear and tests stub fakes or null objects; prefer value objects over mixed types and assert external input early; make properties private and classes final by default; clone defensively or disable cloning and disallow serialization of nonserializable resources; aim for branch coverage (example login path requires five tests: true false plus three exception cases) and reduce public API surface to avoid brittle, time‑coupled operations.
AI-written summary · about
chapters (5)
related talks
58mObjects, Testing and Responsibility
50mBuilding Testable PHP Applications
40mBullet-proof projects
45mTesting Strategy with the Help of a Static Analyzer
01h 00mStop mocking everything
59mYour tests are mocking you
36mAn Introduction to OOP, Design Patterns, and TDD
29mEffective tests and testing effectively
