OOP Building Blocks
All five SOLID principles, then the choice that defines everything after it: composition over inheritance.
Thirty lessons that take you from “I know what an interface is” to designing service graphs a container can wire itself — with the tests to prove they behave. SOLID, dependency injection, reflection, containers, TDD and object lifecycle.
Local, CLI-first and version-locked to PHP 8.5. Every lesson ships runnable examples, a code
challenge and a closed-book quiz, and a check.php harness walks the challenges in
order and stops at the first one still unsolved.
Strictly sequential. Each assumes the one before it — Module 4 cannot be understood without Module 3, and Module 5 exists to prove why Module 3 mattered.
All five SOLID principles, then the choice that defines everything after it: composition over inheritance.
Use the type system as an enforcement mechanism, not documentation. Liskov, variance, hooks and enums.
Why new inside a constructor is the root of untestable code, and the three ways to fix it.
Build a service container from scratch with Reflection, then replace it with PHP-DI and ship a real API.
Why DI is the prerequisite for testing at all — then PHPUnit, doubles, red-green-refactor, and what not to assert.
PHP's share-nothing model, and what breaks the moment you move to a long-running worker.
Every design decision in the course runs through this list. They are not independent — composition enables DI, DI enables testability, testability sustains good design.
This course is about how to wire components. The sequel is about what the components should be — moving from loggers and mailers to a job card that knows the rules for cancelling itself, and a bill that refuses to be issued twice.