PHP

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

[AdSense-A]

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.

(more…)

By hadi, ago
PHP

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

[AdSense-A]

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.

(more…)

By hadi, ago
PHP

Making Software

Dan Hollick created a beautifully illustrated reference manual that explains how the technology behind software actually works. Read more

By hadi, ago