From time to time, I get thrown onto a project that has many, many errors in the unit tests. It can be hard to try to figure out what to fix first with so many errors on the screen. Sadly, I’ve had my scroll-back buffer filled many times. (more…)
All entries of my technical and business blog.
Composer Dry Run
Just another case of RTFM I’m sure, but I was wondering how to preview the changes that will happen if I do a composer update on my current project. I wanted to get an idea of how many libraries would change so I could see if it would be a short or long project (potentially) to do a 3rd Party Library update. (I already hear you - and I agree - the number of files... (more…)
AssertSame vs AssertEqual in PHPUnit
When you’re testing inside of your PHPUnit test methods, you will use many assert-based methods. Two that are seemingly very similar are assertSame() and assertEqual() (more…)
Laravel Default Throttle Configuration and Common JWT Blacklist Vulnerable to Cache Attacks
One thing I like about Laravel is the amount of built-in functionality that is available. But when this functionality is left in default configuration (much like many default configuration items getting hacked), there can be consequences. (more…)
Track the Things You've Done Today with Alfred
For our agile workflow, it’s important to provide a check-in each day. What did you do yesterday, what do you plan on doing today, do you have any blockers? My biggest challenge is actually remembering what I did “yesterday” - especially after the weekend. (more…)
Mac App to Keep Slack Active
I tend to use either the web interface for Slack or I use Franz to manage my open connections. When this is not focused, however, it tends to mark you automatically inactive/away after 30 minutes. If you’re hard-core programming, you might not have slack focused for hours - and this is really confusing for your teammates as you might look non-active or even out for the day. (more…)
Add a Case-Sensitive Disk in MacOS
In an earlier entry here, I described the need for a case-sensitive disk in my development set up. I’ve enjoyed using my SD-based drive, but I wanted to change to using my own drive for two reasons: a) I have 1TB drive, so I have plenty of space and b) the SD is slower than the SSD - at least last time I tested it was. (more…)
PHPUnit Test Helpers for Mockery and Non-Public Properties
I’ve written a few helpful methods and systems that help out my unit testing. There are many arguments for and against these tools (don’t test protected methods, don’t introduce global namespace methods, etc) - and those are discussions for another day - but perhaps these might help you out in the mean time. (more…)
PHPStorm File Watcher for Immediate Error Log Alerts
When PHP errors happen, often times there is an error log. This might be in the PHP error log itself or in a log file. For example, in one of my Laravel projects, I have two log files, one for errors and one for info or debug level information. (more…)
Easily Test JSON Keys in Laravel API Response
In my Laravel application, I have an end point that will retrieve a collection of Client models. I have many other unit tests that validate that my repository returns the proper clients when requested, that my client model is sound. My last test is a feature test checks that if I retrieve a list of clients from the end point there is proper pagination and client models exist. I don’t really need to test the... (more…)