blog.genijaho.devSimplifying work with custom stubs in LaravelTesting is almost always difficult when developing applications that interact with external services, APIs, or complex features. One way to make testing easier is to use stub classes. Here's how I usually work with them. Quick intro on benefits Stubs...May 17, 2025·4 min read
blog.genijaho.devUpgrading to Laravel 10, PHPUnit 10, and Pest 2We're upgrading from Laravel 9 to 10, and PHPUnit 9 to 10, and, if all goes well, we'll top it off by migrating to Pest, the latest version. To keep the positive vibes on I'll skip an upgrade from PHP 8.1 to 8.2, just because I don't want to restart ...Sep 17, 2023·4 min read
blog.genijaho.devSpeed up GitHub Actions by caching Composer, Rector, & PintGitHub's 2000 minutes per month of free usage of GitHub Actions is usually enough to handle light workflows. However, as more tech is run automatically, we are forced to upgrade to a paid plan or optimize our workflows. Currently, I am running Rector...Jun 20, 2023·5 min read
blog.genijaho.devDoing stricter checks in PHPA nice refactoring I've learned recently is to utilize types in conditionals. For years I’ve been doing if (!empty($posts)), but Rector, a tool to automatically refactor code, changed that to if ($posts === []). The main advantage of using $posts ===...Apr 8, 2023·3 min read
blog.genijaho.devUpgrading to Eloquent accessors & mutators from Laravel 9Laravel 10 is making the headlines these days. However, many apps are stuck in older versions, or at least still use the syntax and methods of older releases. One of the most significant changes introduced in Laravel 9 is the syntax for accessors and...Feb 26, 2023·3 min read