Doctrine2 docs said that soft-delete behavior should be better implemented as a State pattern But not provide any example of that implementation.
How to achieve soft delete behavior using a state pattern?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think they refer to filters which are available since version 2.2:
The DoctrineExtensions library includes a “soft-delete” behaviour. You might want to have a look at their implementation to see how it works in detail.