# How much logic is too much logic in a PHP enum Page: https://stenobird.com/podcast/no-compromises-1309932/how-much-logic-is-too-much-logic-in-a-php-enum Text version: https://stenobird.com/podcast/no-compromises-1309932/how-much-logic-is-too-much-logic-in-a-php-enum.md Podcast: [No Compromises](https://stenobird.com/podcast/no-compromises-1309932) Published: 2026-06-06T05:00:00+00:00 Episode link: https://share.transistor.fm/s/e307067f Audio file: https://media.transistor.fm/e307067f/57174e20.mp3 Processing state: not_requested JSON: https://stenobird.com/v1/public/podcasts/no-compromises-1309932/episodes/how-much-logic-is-too-much-logic-in-a-php-enum Duration seconds: 797 ## Resource 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. (00:00) - Why magic strings and constants fall short (01:43) - How PHP enums replaced interface constants (02:26) - What methods belong on an enum (06:58) - The rule for keeping enum methods focused (10:44) - Silly bit Join developers who think carefully about clean code decisions in the No Compromises community . ## Actions - request_transcript: `POST https://stenobird.com/v1/public/podcasts/no-compromises-1309932/episodes/how-much-logic-is-too-much-logic-in-a-php-enum/transcription-requests` — Idempotently request low-priority transcript generation for this episode. - read_markdown: `GET https://stenobird.com/podcast/no-compromises-1309932/how-much-logic-is-too-much-logic-in-a-php-enum.md` — Read the agent-friendly Markdown representation of this episode resource. A page view does not enqueue transcription. Agents should invoke `request_transcript` explicitly when they need this episode processed. ## Transcript Full transcripts are not published on public pages unless there is a clear rights basis.