Archive
enums
-
Enums replaced forty class constants
PHP 8.1 shipped on 25 November. A status class holding 41 constants, a static validator and a switch with a throwing default became one backed enum, and Doctrine still needed thirty lines of custom type to store it.