PHP: Patterns and Principles is the upcoming book by Brent Roose, creator of stitcher.io, Laravel Beyond CRUD, and PHP Annotated. It focuses on teaching PHP developers patterns and principles in dealing with larger web apps.
PHP: Patterns and Principles is currently a work in progress, but you can leave your email address to receive occasional progress updates, an early access discount, and more.
I tried to write this section in third person, but it feels rather weird. So let's take the more personal approach. Hi, I'm Brent, I've been an active member of the PHP community for over a decade. I have a well-known blog and newsletter called stitcher.io, I'm a Developer Advocate for PHP at JetBrains, and host the community-focussed YouTube channel PHP Annotated.
I've written three books prior to PHP: Patterns and Principles : Laravel Beyond CRUD, Front-Line PHP, and Event Sourcing in Laravel. These three books were written for Spatie, the company I worked at for several years. PHP: Patterns and Principles is my first solo project.
In PHP: Patterns and Principles, my aim is to teach PHP developers about projects that require more than what their framework docs have taught them. The book won't try to push you towards one solution, but rather lay out a multitude of possibilities, and teach you how to pick the right one for your project.
When it comes to code, we'll use both Laravel and Symfony, as well as standalone code. In essence, PHP: Patterns and Principles is framework-agnostic and only uses frameworks to bring examples into practice. We'll often implement features from scratch, to truly understand what's going on behind the scenes: an event dispatcher, a command bus, entity repositories, state machines, and more. Any PHP developer who's in need of more complex patterns, no matter their framework, will be able to learn.
My hope is that, after reading PHP: Patterns and Principles, you'll have a range of tools at your disposal to tackle problems along your way; but most importantly: you'll know when to use which tool, and how to deepen your knowledge about it, when needed.
The Table of Contents will be published soon. Leave your email address if you want to be kept up-to-date.