Enums, readonly and match: the PHP 8 features that made my juniors' code reviewable
Code review in my agency used to be 40% "what values can this string have?" and "who changed this amount after the controller?". PHP 8 killed most of those comments. Here are the features that did it, with the code we actually write now. 1. Backed enums (8.1) enum OrderStatus: string { case Pending = 'pending'; case Paid = 'paid'; case Shipped = 'shipped'; case Cancelled = 'cancelled'; public function label():…