
Sign up to save your podcasts
Or


Have you ever added a method to an enum and then wondered if you just turned it into something it was never meant to be?
In the latest episode of the No Compromises podcast, we discuss where to draw the line when adding methods and logic to PHP enums.
We trace the evolution from magic strings to constants to interfaces, and explain why enums were the missing piece PHP needed all along.
We also cover when label methods and data structure helpers belong on an enum, why Eloquent queries cross a line, and how to avoid turning a simple enum into a bloated helper class.
By Joel Clermont and Aaron Saray4.9
88 ratings
Have you ever added a method to an enum and then wondered if you just turned it into something it was never meant to be?
In the latest episode of the No Compromises podcast, we discuss where to draw the line when adding methods and logic to PHP enums.
We trace the evolution from magic strings to constants to interfaces, and explain why enums were the missing piece PHP needed all along.
We also cover when label methods and data structure helpers belong on an enum, why Eloquent queries cross a line, and how to avoid turning a simple enum into a bloated helper class.

57 Listeners

701 Listeners

8,059 Listeners

18 Listeners

64 Listeners

34 Listeners

10,208 Listeners

5,549 Listeners

27 Listeners