I’ve blogged about PHP assertions and assertion libraries a while back. I haven’t started using the assertions anywhere outside of unit tests yet, but with more and more bloat added to the code to check for types and particular values, I keep coming back to the idea.
Today I came across a nice article by Matthias Noback which once again made me consider assertion libraries in my codebase. I’ll discuss with colleagues and hopefully we’ll make the decision once and for all on whether assertions are a good way to go forward.