| ▲ | makeitdouble 3 hours ago | |||||||
To note, it is surprisingly refreshing to completely forgo instanciable classes on a modern codebase. Phpstan deals well with type definitions, arrays are powerful enough to contain whatever needed, and functions can be stored and passed around easily enough. | ||||||||
| ▲ | chuckadams 3 hours ago | parent [-] | |||||||
Array shapes are still second-class citizens defined in phpdoc, with an inferior editor UX, and lack of any run-time enforcement. A proper record type for PHP with value semantics would be an ideal solution for me. Would go nicely with the pattern matching proposal that's still incubating. | ||||||||
| ||||||||