The Type Keyword

Not the keyword you're looking for? See all keywords.

Finite-State Machine as a Type System illustrated with a store product

In this article, I would like to talk about how to implement a Finite-State Machine (FSM) with the PHP type system. The example is a store product (in an e-commerce solution for instance), something we are likely to meet once in our lifetime. Our goal is to simply avoid impossible states and transitions.