RSSAmplifier

Blog

cosmastech

Thoughts and tutorials on open-source with a focus on PHP/Laravel

cosmastech.comRSS feed ↗10 posts

Latest posts

What’s True About AI

I used to love programming. I still do, but I do it a lot less now.

TIL: Identifying Exceptions in Laravel Middleware

My team and I have been working on building a light observability layer around an important API in our Laravel app. We had crafted the functionality: data models to represent what happens during an event, new infra to keep our core database free from noisy writes, and an AI-assisted planning doc that was too long to read. We were doing software engineering in 2026. :sunglasses:

JSON Decoding HTTP Responses

With the release of Laravel 12.48.0, you can now specify which flags you want to use when decoding an HTTP response from the HTTP client.

Simplicity Matters

Simplicity matters. It’s important for humans and our tiny brains. It’s important for AI Agents with their tiny context windows. It’s important for businesses that are fighting and clawing for market share as competitors clone their product in a span of months.

Musings on 2025

As 2025 wraps up, I wanted to touch on some broader topics that I thought deeply about this year.

Leveraging Promises and HTTP Pooling

Laravel 8 first introduced HTTP request pooling, thanks to a contribution from Andrea Marco Sartori. This allows developers to write code which will execute any number of HTTP requests concurrently. Under the hood, this is made possible thanks to the async request functionality of Guzzle and cURL’s multi handler functionality.

Improving unit test run time in a Laravel modular monolith

I recently started a new job and was given my first exposure to a modular monolith. On the surface, they have a lot to love: all aspects of your app in one repo, one set of dependencies to keep updated, reduced code duplication, and allowing multiple engineering teams to work in in their own isolated sections of the code are first that spring to mind. Modular monoliths of course present some…

Cleaner middleware: static factory functions

A pattern to simplify parameterized middleware

Creating type-safe configs in Laravel

A pattern that I like to use for type-safe configs.

FailOnException: Short-circuit Laravel job retries

A simple way to stop a job when further attempts will fail.