Tools to automatically format PHP, JavaScript and CSS files

Good writeup by Freek on how to get PHP-CS-Fixer and Prettier up and running. When working on a project with other people, it’s important to pick a coding standard. Agreeing on a coding standard makes the code more readable for all developers that need to touch the project. It’s easy to make mistakes against those […]

Laravel Valet Environment Variables

To set/override Environment Variables in Laravel Valet, one had to manually edit the Nginx config files and restart Nginx after doing so. With the release of Laravel Valet 2.1.6 this is no longer needed: Valet 2.1.6 contains a merged PR that provides built-in support for an specific file named .valet-env.php in which you can set […]

What’s new in the upcoming PHP 7.4?

Good overview by Brent on the new features that will be landing in PHP 7.4, which is due somewhere December 2019. I’m especially looking forward to Typed properties. New in PHP 7.4 → 💭 One thing I personally find missing in PHP’s typehinting, is a way to typehint array contents — e.g. “I’d like an […]

Fixing the valet share 301 Redirect Loop

One of the nice things of Laravel Valet is that it includes an easy way to make your local site available publicly. For this it has the aforementioned Ngrok built-in. To use it, just run the valet share command, and your local site will be shared through a *.ngrok.io subdomain. However, when combining valet share […]

Missing ~/.valet folder?

Earlier today I updated my Valet installation from version 2.0.x to 2.1.1. To my surprise the ~/.valet/ folder had gone missing, immediately making me think the update process somehow had gone wrong (even though Valet kept on serving sites). Turns out that the ~/.valet/ folder got moved to ~/.config/valet/ with the release of Valet 2.1.0. […]

Swoole – PHP asynchronous programming framework

Swoole is an high-performance network framework using an event-driven, asynchronous, non-blocking I/O model which makes it scalable and efficient. It is written in C language without 3rd party libraries as PHP extension. It enables PHP developers to write high-performance, scalable, concurrent TCP, UDP, Unix Socket, HTTP, WebSocket services in PHP programming language without too much […]

Switching PHP versions with Laravel Valet

⚠ī¸ Running Valet 2.x with a PHP version lower than 7.1 won’t work, until this issue is resolved. You can still switch to that version for use on the CLI. You just won’t be able to use it with Valet 2.x ℹī¸ UPDATE 2018.10.23: Freek has developed some handy aliases to easily switch PHP versions. […]

Destructuring arrays in PHP: Practical examples

Being more focussed on JavaScript nowadays, I kinda forgot that it’s possible to destructure arrays in PHP ever since the release of PHP 7.1. Frank de Jonge provides us with some practical examples such as this simple one: // JavaScript let options = {enabled: true, compression: ‘gzip’}; let { enabled, compression } = options; console.log(enabled); […]