Articles PHP
TAG ARCHIVE

Everything on PHP.

20 articles tagged PHP — sorted newest first.

php

PHP 8.5 Deprecations Cheat Sheet — What to Fix Before Upgrading

PHP 8.5 ships with a batch of deprecations that will become hard errors in PHP 9.0. Here's the complete list with one-line fixes and a Rector command to automate the scan.

5 min read
laravel

PHPStan Level 10 in Laravel — Fix the 5 Most Common Errors

Bumped Larastan to level 10 and got 300 new errors? Here are the five patterns you'll see again and again — and the exact fix for each.

6 min read
php

PHP 8.5 array_first and array_last — Clean Up Your Collection Fallbacks

PHP 8.5 adds two long-overdue functions that eliminate the awkward workarounds for accessing the first or last element of an array.

5 min read
laravel

Laravel 13 PHP Attributes: Cleaner Models, Jobs, and Commands

Laravel 13 ships opt-in PHP attribute syntax across 36+ framework locations. Here's what changed for models, jobs, and Artisan commands — with zero migration required.

6 min read
laravel

Dockerising Your Laravel App for Kubernetes: From Dockerfile to Running Pod

Take a Laravel app from Docker Compose to a running Kubernetes pod — covering the production Dockerfile, Nginx+PHP-FPM setup, and the K8s manifests you actually need.

8 min read
php

Stop Using parse_url(): PHP 8.5's URI Extension Explained

PHP 8.5 ships a built-in URI extension that replaces parse_url() with immutable, type-safe objects. No third-party package needed.

6 min read
php

PHP 8.5 clone with: Updating Readonly Objects Without Boilerplate

PHP 8.5 lets you pass an array to clone() to update properties in one expression. Here's how it replaces wither method boilerplate — and the gotchas you need to know first.

4 min read
php

PHP 8.5 Pipe Operator: Clean Function Chaining in One Line

PHP 8.5's |> operator lets you chain functions left-to-right instead of nesting them inside-out. Here's how it works and where it breaks down.

4 min read
docker

Optimising Laravel Docker images with multi-stage builds

A single-stage Dockerfile for Laravel ends up with 800 MB+ images full of build tools you don't need in production. Multi-stage builds fix that — here's how.

7 min read
php

Replacing String Constants with PHP Backed Enums in Laravel Models

String constants like STATUS_PENDING are typo-prone, unautocompleted, and impossible to enumerate exhaustively. PHP backed enums fix all of that — and Laravel has native support throughout.

5 min read
php

PHP Readonly Classes as Value Objects in Laravel

Primitive obsession is one of those code smells that's easy to ignore — until you're debugging which integer is pounds and which is pence. PHP readonly classes fix that cleanly.

6 min read
laravel

Upgrading from Livewire 3 to Livewire 4: A Practical Migration Guide

Livewire 4 shipped in early 2026 with SFCs, smarter wire:model, and a leaner Volt story. Here's how to upgrade a real app without surprises.

8 min read
php

PHP 8.4 Fibers: Async Patterns Without a Framework

PHP has had Fibers since 8.1, and PHP 8.4 quietly improved them. You don't need ReactPHP or Amp to get useful concurrency patterns — here's what Fibers actually give you and when to reach for them.

6 min read
pest

Enforcing Laravel architecture rules with Pest's arch() helper

Pest's arch() helper lets you write rules that enforce your app's structure at test time — no more accidentally importing Eloquent into a controller.

5 min read
laravel

Verifying Stripe webhook signatures in Laravel without Cashier

You don't need Laravel Cashier to verify Stripe webhook signatures. Here's the minimal setup using the Stripe PHP SDK directly in a controller.

5 min read
laravel

The Complete Laravel Developer Toolchain for 2026

Stop spending days configuring tools. Here is every tool in my Laravel stack for 2026, why I chose each one, and exactly how to set it up.

18 min read
laravel

Running Laravel Pint Automatically with Git Pre-Commit Hooks

CI failing because someone forgot to run Pint again. Here's how to wire up a Git pre-commit hook so it never slips through.

4 min read
php

PHP 8.4 Property Hooks in Laravel Models

PHP 8.4 property hooks are a tidy language-level alternative to getters and setters — but before you reach for them in your Eloquent models, there's a catch worth understanding.

4 min read
php

How to audit PHP dependencies (practical guide)

How to audit PHP Composer dependencies for security, license and maintenance issues, with tools and a small script you can run today.

5 min read
Laravel

Streamlining Laravel Developer Onboarding with a Makefile and Herd Pro

Speed up Laravel onboarding with a powerful Makefile. Automate Herd Pro setup, install dependencies, and seed databases for a consistent, one-command setup experience.

4 min read