Using dependency injection in PHP.
In this 5 part ebook, I walk through different ways you can structure, refactor and test the PHP code you write for WordPress plugins using dependency injection.
This Book will take about an hour to read. It’s all based on real code I’ve written and includes Github links whenever possible. This isn’t a book that teaches you how to make a plugin from scratch — not something I get paid do do often. It’s about improving or fixing existing plugins, which are the most common tasks for WordPress plugin developers.
Less Foo, No Bar
I am not covering how to build a todo app as a WordPress plugin from scratch. This is about how to improve plugins that already exist.
This book is based on stuff I’m working on, all the code examples are copied from actual work I did. As much as possible, I linked to pull requests where you can see where I implemented these patterns.
What Is In The Book
- How to remove singletons
- Code examples based on plugins I’m working on now. Often with links to pull requests.
- How to write tests with phpunit for WordPress plugins
- How to make your plugins easier to extend by third-party developers
- Pictures of my dog, also flowers.
Also, it’s not very long. You can probably read this in an hour or so.
By A Guy With ADD For Folks With A Lot Going On
Who has time for a 4-inch thick book or a 25-hour course? I don’t. Maybe beginners do — but this isn’t an intro — it assumes you know object-oriented PHP. This should take an hour or two to read.
Frequently Asked Questions
How Can I Download The Latest Version?
If you have already published the book, go to https://app.lemonsqueezy.com/my-orders and log in with the same email address you can download the latest version.
What Formats Is The Book Available In?
Currently, it is a PDF. Members can also read the book online, and leave comments. ePub format is planned, but I can’t get it right yet.
Can I Read This On A Kindle?
Yes, you can send the PDF to your Kindle. This page describes how to send a PDF or ePub to your Kindle https://www.amazon.com/sendtokindle/email