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.

This book is about what comes after the docs.

About me

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.

About the book

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.

Table of Contents

The Table of Contents will be published soon. Leave your email address if you want to be kept up-to-date.

FAQ

When will PHP: Patterns and Principles be ready ?
I plan to have a first version of the book by the end of Q1 in 2024. You'll be able to preorder the book at a reduced price then. Preordering will give you early access once the first full draft is done, and you'll get the finished version when it's done.
How much will PHP: Patterns and Principles cost?
Somewhere between € 30 and € 60, depending on whether you're buying as an individual or as a company.
How to receive updates?
By leaving your name and email address below. Make sure to confirm your email address once registered by clicking the confirm button in the mail.