Immutability in PHP Beyond readonly
A deep dive into immutability in PHP, from readonly properties and interior mutability to immutable value objects, collections, dates, cloning, boundaries, and testing.
Wendell Adriel's Blog and Website, where I write about Software Development, Open Source, and other topics.
A deep dive into immutability in PHP, from readonly properties and interior mutability to immutable value objects, collections, dates, cloning, boundaries, and testing.
A deep dive into PHP attributes, from metadata and Reflection to practical design patterns, Laravel examples, performance, testing, and the cases where explicit code is better.
A deep dive into the Laravel Scheduler, from event registration and cron evaluation to mutexes, background processes, sub-minute tasks, and production-safe scheduling.
A practical deep dive into UUIDs, ULIDs, and Sqids, from generation models and sorting behavior to database storage, public IDs, and security trade-offs.
A deep dive into Laravel Context, from request metadata and automatic log enrichment to hidden context, scoped values, queues, scheduled commands, and internals.
Learn how to use Eloquent Query Classes to organize important database logic in Laravel without adding a full repository layer.
Learn how Expressive can improve a Laravel application by keeping Eloquent as the database layer while moving business logic to fully typed objects.
A deep dive into the Laravel request lifecycle, from public/index.php and application bootstrapping to middleware, routing, controllers, responses, and termination.
A deep dive into idempotency, from the theory behind safe retries to a practical Laravel implementation using the Laravel Idempotency package.
A deep dive into Role-Based Access Control, from the theory behind roles and permissions to a practical, team-aware Laravel implementation without external packages.
A deep dive into how Laravel transforms raw route segments into models, scoped children, enums, and custom bound values before your controller runs.
Learn what the ADR (Action/Domain/Responder) pattern is and how to apply it in Laravel with a simple, practical example.
My thoughts on why Agentic Engineering is a better path than Vibe Coding, and the workflow I use to turn AI agents into a structured engineering process.
After a lot of years working with PHP and Laravel on PHPStorm, I am trying to use VSCode and this is how I configured it for the task.
Explore Laravel’s Service Container from the ground up: resolution, binding, scopes, contextual dependencies, auto-wiring, and more, and demystify how your app runs.
Learn what the State Machine Pattern is and how to apply it in your PHP applications with this in-depth article about it
Discover the mechanics behind the Laravel Queue System
Laravel’s Eloquent makes it feel almost magical to move data in and out of your database. Under the hood, that magic is powered by the Active Record pattern, that's a straightforward way to treat a database row as a first-class PHP object with built-in CRUD behaviour. In this article I'll explain what the Active Record pattern is, its pros and cons and we will build a tiny implementation of it in…
Enumerations, commonly known as Enums are a powerful tool in Software Development and can play an important role in the Architecture and Design of applications if used correctly. In this article let's review how we can strategically use them to improve our applications.
When creating applications with PHP, Exceptions play a vital role in handling errors and irregularities that arise during the application lifecycle. We are going to see how to use Custom Exceptions to improve our applications.
Value Objects is a fantastic concept that we can use to improve our applications. They are small objects, such as Money, DateRange, Email, or Age, that we utilize on complex applications. They are key elements in creating efficient, understandable, and maintainable code.
The debate between the advantages and disadvantages of both composition and inheritance has taken centre stage in the PHP development community recently. In this article, I'll talk about those two concepts and the advantages of using Composition over Inheritance.
Arrays are a convenient way of organizing and passing data in PHP applications, but should we do it? In this article, I'll show the cons of abusing the use of associative arrays and a simple alternative for that.
Action classes and Invokable Controllers are a hot topic in Laravel nowadays. In this article I'll explain why I think Invokable Controllers are a bad idea and an architectural pattern I created and named as AaaS.
Laravel Collections are really powerful for working with arrays of data. Let's learn how to use the methods they provide to improve our applications.
Have you ever heard of API versioning? This is very handy when you need to add an alternative logic for some endpoints but want to keep the current logic for some users. Let's learn a simple way to achieve that in Laravel.
Data structure standards are the way to go for having good maintainability in our applications. Let's learn how we can use Laravel Responsables to create standardised API responses for our applications.
Data Transfer Objects can be a great way to improve your applications. Let's learn why and how to use them in Laravel.
Let's learn how we can structure a server-side application in a simple way, while using a clean and efficient architecture that could be used for small to large applications.
Let's learn how to create and work with multiple themes in CSS.
Let's learn how to theme websites using CSS variables.
Let's learn the new way of working with asynchronous code on JavaScript.
Let's see how ES6 features can help you get the job you want