Skip to main content

· 5 min read
Iain Cambridge

For the most part, sanity checks are put into the code to ensure there are no bugs. For this reason, guaranteeing sanity checks are done correctly becomes necessary. If you do not check to see if the data is valid, and it is invalid, then you’re going to allow invalid data to proceed. Here, I’m going to discuss how I think we should do sanity checking in PHP.

· 4 min read
Iain Cambridge

Single Responsibility Principle (SRP) is probably one of the most well-known principles from SOLID. At its core is a desire to prevent classes from becoming overwhelming and bloated. While enabling the ability to change how a single thing works by only changing a single class. So the benefits of the Single Responsibility Principle are that you have an easier codebase to maintain since classes are less complex and when you wish to change something you only have to change a single class. In this blog, I will go through some ways to try and help avoid breaching the Single Responsibility Principle while doing code review.

· 2 min read
Iain Cambridge

Logging is a very important part of operating an application if you're unaware of what happened in your system you're unable to quickly and efficiently identify the issue. However, logging can open up some potential pitfalls. One of them being including secrets and other sensitive information within the logs accidentally. Twitter and Github both accidentally logged people's passwords in plain text. To help protect our users we've made it so that we automatically filter passwords out of the logs created via monolog. And we're going to share how we did it so you can also ensure your logs are also secret free.