In the most recent post of this series (which is admittedly some time ago), I talked at length about Composer and its lock file.
I recommend reading the previous two articles because Composer is eventually going to play a role in this material that this and future posts are going to share. But if you opt not to catch up on them (or are already familiar with Composer) then the gist of the previous posts are, respectively, as follows:
I don’t recommend checking the vendor directory into your repository. That can become a huge directory later, and it can undermine the whole purpose of Composer.
Composer
The goal is to make sure that every one is running the same version of the dependencies of the project – not older versions, not newer versions – but the same version.
The Composer Lock File
With that said, there are numerous dependencies or packages that we can install that help us to make sure that we’re writing the highest quality code possible.
Sure, some of these may be in the form of something like coding standards, but those are really more rules than they are elements of writing high quality code (though I don’t think they should be left out of the discussion – just left out at this time 🙃).
Back to the tools in question: What are some tools that help write high quality WordPress code? I’m going to share a few of my favorites and them I’m going to talk about how we can run them all against a code base.
First, let’s take a look at static analysis with PHPStan.
Continue reading