You may have heard talk in the open source community over the past week or so about the future of PHP_CodeSniffer, or PHPCS for short. Crucial for maintaining consistency, readability, and quality in codebases, especially in collaborative environments, it checks PHP, JavaScript, and CSS code against a set of defined coding standards, helping ensure that the code adheres to specific formatting and stylistic conventions.
What’s going on with PHPCS?
Yoast founder Joost de Valk provided an in-depth writeup of the situation for PostStatus. He explains:
“Juliette Reinders Folmer has been the solo maintainer or majority co-maintainer of many popular PHP and WordPress libraries that their corresponding communities rely on. PHP_CodeSniffer (PHPCS) has been historically owned/sponsored by a company called Squiz and primarily by one developer, Greg Sherwood.
Greg has been running releases, while Juliette has been providing the majority of code contributions for a few years now. Greg / Squiz have decided to abandon the PHPCS project. Unfortunately, while I think we as a community should be thankful for what Greg has done up until this point, this is where things get a bit bitter: Squiz has refused to give the project a lifeline by providing admin access or transferring ownership to Juliette to keep it alive.
The combined projects PHPCS, PHPCompatibility, and, specifically for the WordPress world, WordPress CS and PHPCompatibilityWP were already stretched extremely thin. The majority of Juliette’s time has been unpaid for years.”
For more on the context and background of this situation, we recommend checking out Joost de Valk’s post on PostStatus or the Github repo.
Why is this a big deal?
For starters, it’s unsustainable to have a single contributor on any one project: it’s a huge commitment and requires a great deal of work to maintain.
Regarding the projects themselves, tens of millions of websites rely on them: they are used directly and indirectly by WordPress.org and related projects. For the thousands of companies and developers depending on PHPCS for their projects, their development flows, and even products and hosting directly benefit from those contributions, this is a crisis.
Many agencies, freelancers, and developers of all shapes and sizes have a vested interest in keeping PHPCS alive: these tools are used widely across the internet and without them, our code would have more security issues, stability issues, bugs… the list goes on.
If spending innumerable hours debugging code that was previously problem-free doesn’t sound appealing, it’s crucial that we lend our support to keeping PHPCS alive and well.
What can we do to help?
In short, we can rally around this project as a community.
While it’d be ideal to live in a world where the most crucial open source tools weren’t heavily reliant on the work of (often unpaid) individuals, if you can’t volunteer time, funding is also very welcome. PHPCS is seeking funding for the project’s expenses, and Juliette continues to seek funding for her own income as the maintainer.
If you’re a company using PHPCS as part of your day-to-day, digging deep to provide sponsorship is an easy way to ensure your code stays clean. If you’re an individual, every little helps. The more support we gather from far and wide, the better chance we have of creating a sustainable project for the long-term.
As frequent users of the tools ourselves, Human Made has made the decision to contribute $1,000 a month for a year through Open Collective. We’d encourage other WordPress agencies to join with us in this commitment if they’re at all able.
How about switching to the newly forked PHPCS project?
The soon-to-be-abandoned PHPCS project has been forked by Juliette, and you’ll be able to switch your code to the new PHPCS repository once version 3.8.0 is released.