wp-browser 4 RC1
June 19, 2023
When I started working on the branch called version-4/minimum-compat-pass
in May last year, I thought updating wp-browser to be compatible with Codeception version 5 in a minimal way would have been a matter of a few weeks.
The idea was to fix the most glaring issues of the WordPress testing framework and then move on to a more thorough refactoring of the codebase.
I was wrong.
The first pass took a year and a month and it's now available as a release candidate in the branch v4
.
Not because of Codeception, but because of 9 years of code I had to Mary-Kondo through. My love for the craft of code, which to this day is still raging, made it very difficult for me to overlook the many issues I found in the codebase and I ended up rewriting most of it.
My first commit was on June 16, 2014; I knew so little about PHP I believed all the following to be true:
- I cannot write code without PHPUnit tests or the plugin repository will reject my plugin.
- No company would work with a PHP developer that does not test her code.
- Every one uses XDebug.
There is no judgement here, I was just naive and I had no idea what I was doing.
Being a first pass, it's still not yet all the things I want it to be, but it's a good start and it is, above all, compatible with Codeception version 5, PHP 8.0
, 8.1
and 8.2
.
Where possible, I tried to keep back compatibility with existing tests: I'm an avid user of my own framework and I didn't want to have to rewrite all my tests to use the new version. Some tests will need rewriting, though, and I'll try to document them as I go and find out.
Next steps are, in an order I wish I will respect but likely won't:
- Documentation update to reflect the changes in the new version.
- A new first setup experience leveraging containers for a no-hassle setup for theme, plugins and site projects.
- A new test case, provisionally called
SuperWordPressTestCase
(no jokes) to leverage the new features of the framework.
I'm also planning to write a series of posts on the new features of the framework and what they bring to the table in terms of new possible use cases.