Tempest 3.0

tempestphp.com

Tempest 3.0 has been released with a new exception handler, PHP 8.5 as minimum requirement, improved CSRF protection using browser headers, database performance improvements, and closure-based validation rules.

Read more [tempestphp.com]

A clean API for reading PHP attributes original

by Freek Van der Herten – 3 minute read

PHP 8.0 introduced attributes, and they're a great way to add structured metadata to classes, methods, properties, constants, and parameters. The concept is solid, but the reflection API you need to actually read them is surprisingly verbose. What should be a simple one-liner ends up being multiple lines of boilerplate every time. And if you want to find all usages of an attribute across an entire class, you're looking at deeply nested loops.

We just released spatie/php-attribute-reader, a package that gives you a clean, static API for all of that. Let me walk you through what it can do.

Read more

Join 9,500+ smart developers

Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

"Freek publishes a super resourceful and practical newsletter. A must for anyone in the Laravel space"

Joey Kudish — Shipping with AI as a teammate

No spam. Unsubscribe anytime. You can also follow me on X.

How to set up PHP autoformatting in Zed using Pint and PHP CS Fixer original

by Freek Van der Herten – 3 minute read

I only switched to Zed last week (you can see my full setup on my uses page), so I'm still learning the ropes. One thing I ran into is that its external formatter configuration is global. You configure one formatter command for PHP, and that's what gets used in every project you open.

The problem is that not all of my projects use the same formatter. Some use Pint, some use PHP-CS-Fixer directly. My Zed config originally pointed to ./vendor/bin/pint, which meant it silently did nothing in projects that don't have Pint installed.

Let me walk you through how I solved this.

Read more

Laravel Response Cache v8 is here: now offers flexible caching original

by Freek Van der Herten – 6 minute read

Our laravel-responsecache package speeds up your app by caching entire responses on the server. When the same page is requested again, the cached response is served without hitting your controller at all.

We just released v8, a new major version with a powerful new feature: flexible caching. It uses a stale-while-revalidate strategy, so that every visitor gets a fast response, even when the cache is being refreshed.

Let me walk you through it.

Read more

AI Horseless Carriages

koomen.dev

Pete Koomen argues that most AI apps are "horseless carriages," bolting AI onto old paradigms instead of letting users shape the prompts that drive them. He makes the case that the best AI apps should be agent builders, not just agents.

Read more [koomen.dev]

Laravel Permission v7 has been launched original

by Freek Van der Herten – 3 minute read

Laravel's built-in authorization is great when permissions are defined in code. With gates and policies, you can write logic like this:

// Defined in code, requires a deploy to change
Gate::define('edit-posts', function (User $user) {
    return $user->is_admin;
});

But in some projects roles and permissions are dynamic: created by users, managed through an admin panel, or changed at runtime without deploying code. Our Laravel Permission package can help you dynamically create roles and permissions.

We just released v7 which doesn't bring any new features, but cleans up the internal code and modernizes it. Let me walk you through what the package can do.

Read more

Laravel Fuse: Circuit breaker for queue jobs

github.com

Laravel Fuse is a circuit breaker package for Laravel queue jobs. When an external service like Stripe or Mailgun goes down, instead of letting thousands of jobs timeout (30s each), the circuit opens after a configurable failure threshold and jobs fail instantly. It supports three-state circuit breaking (closed/open/half-open), intelligent failure classification (429s and auth errors do not trip the circuit), peak hours config, and a built-in status page.

Read more [github.com]