Category: Modern PHP Development
-
Safe PHP Upgrades for WordPress: The developer’s guide to fixing deprecated code
Upgrading PHP wasn’t a topic for WordPress developers for a long time. This has to do with the WordPress project’s approach to PHP. Much like with the features in Core,…
-
Common Unit Test Issues in WordPress
A list of the most common issues encountered when writing WordPress unit tests. Includes workarounds for the most common automated testing problems.
-
Understanding WordPress PHP Unit Test Fixture Setup and Teardown
When I get started writing unit tests in WordPress, I continuously ran into what seemed to be strange behaviours by the WordPress Unit Testing framework. Strange when comparing to other PHP…
-
WP_UnitTest_Factory: The Missing Documentation
The WP_UnitTestCase class has a factory() method that gives access to the WP_UnitTest_Factory factory classes. And it’s these classes that you use to create data objects (called fixtures) like posts,…
-
How To Make Your Code More Readable By Using Early Returns
A step by step refactoring of a function to use early returns. This technique makes the code easier to read and understand.
-
Code Review Checklist
Code review has been an integral part of my career as a developer. Whether it in the beginning through reviewing themes for WordPress.org, reviewing client code at WordPress.com VIP, or…