Skip to content

Latest commit

 

History

History
11 lines (6 loc) · 588 Bytes

README.md

File metadata and controls

11 lines (6 loc) · 588 Bytes

Doctrine 2 State Machine

State machines for Doctrine entities

Note: this lib is a work in progress. Nothing finished yet.

Why

State machines when used to enforce the workflow of DB records, need to be deeply integrated with the underlying DBMS in order to retain data integrity in a highly concurrency environment.

eg. Suppose you're working on an eCommerce with limited inventory, you wouldn't want to sell the same item to more than one person. That is why a state machine should adopt a locking strategy on the DB in order to prevent double state updates on the same record.