Category: Today I Learned

Back to blog
Pest: Run Only Tests In One File

Pest: Run Only Tests In One File

Pest is our tool of choice when it comes to testing in PHP. It is built on top of the tried and tested PHP Unit and adds a bunch of useful helpers which improve the DX. One I use often is the...

Read more

Ensuring All Stray PHP Files Are Run Through ECS

Ensuring All Stray PHP Files Are Run Through ECS

Easy Coding Style is a really nice code-style checking tool. It combines the best of both PHP-CS-Fixer and PHP Code Sniffer, it's easy to use and has a declarative config with all kinds of useful...

Read more

Streaming Command Output To The Browser

Streaming Command Output To The Browser

Following on from my last post about output buffer streaming I wondered if it was possible to stream the output from a Laravel Artisan command to the browser. You might be asking "but why?"...

Read more

Go directly to the browser. Do not pass GO, do not collect $200

Go directly to the browser. Do not pass GO, do not collect $200

Recently I needed to provide a simple CSV export function which allowed users to download some dynamic data. I wanted to use PHPs inbuilt fputcsv function so I didn't have to think about...

Read more

Livewire Testing: Undefined array key "fingerprint" Error

Livewire Testing: Undefined array key "fingerprint" Error

Recently I've been using Filament CMS quite a lot. It makes use of Livewire through out and as with any new technology I've been exploring what it can do. While writing a component test I ran...

Read more

Keeping Up With Web Dev

Keeping Up With Web Dev

The internet moves fast. New libraries, new tools, major updates to existing tools, security vulnerabilites etc. To keep up with this we created a #learning channel in Slack. This serves two...

Read more

Asking for help

Asking for help

Sometime back in the summer just gone, I got a bit stuck. I’d been running this business for something like eight years, and somehow I’d lost track of where we were going. A lot of things that...

Read more

Testing With Laravel In Maintenance Mode

Testing With Laravel In Maintenance Mode

It is standard in our projects to include simple routes which are used to signify if the application is alive and working. They are primarily polled by Kubernetes liveness probes. The tests are...

Read more

Customising The fallbackPlaceholder In Laravel's Fallback Route

Customising The fallbackPlaceholder In Laravel's Fallback Route

There is a neat feature in Laravel called a Fallback Route. This is the route which will handle the request if none of the others can: Route::fallback(Controller::class); The fallback...

Read more

PhpStorm "No appropriate protocol" Database Error

PhpStorm "No appropriate protocol" Database Error

We recently started migrating from MySQL Workbench to use PhpStorm's internal database integration. In doing so we came across a rather cryptic error: The last packet successfully received from...

Read more