The question here is how type strictness would benefit the language. I agree with you on most parts. But still... if the class was declared like this:
class CancelOutdatedOrdersDTO { public int $olderThan; } Wouldn't that be solved entirely? Code would crash (through a TypeError), it would never be pushed to production and we would never have experienced this problem. PS: I just gave one example... we didn't actually loose 100k, but I had to spend an hour manually addressing the sales back to pending status. Regards, On Wed, Apr 20, 2016 at 4:01 PM, Stanislav Malyshev <smalys...@gmail.com> wrote: > Hi! > > > The outcome is easy to grasp. Because it did not crash by a TypeError > > (which would also require the file to be declared as strict), and we lost > > 100k in sales. But PHP does not need more strictness... > > In other words, somebody wrote code that is supposed to only accept ints > but does no checks. Somebody wrote tests that actually don't test > anything. Somebody signed off on code that was not properly designed or > tested to go into production. And the language is to blame. Right. > > -- > Stas Malyshev > smalys...@gmail.com > -- Guilherme Blanco Lead Architect at E-Block