This is the first part of a fairly aggressive modernisation effort. The plugin has been going for nearly two decades now, and contains a lot of code for different times and different situations. WordPress and PHP have moved on, as has myself. The aim is to modernise and streamline everything so it could be a plugin written new today. The hope is this reduces a lot of the maintenance overhead, makes fixing bugs easier, and generally makes it a more enjoyable developer experience.
A lot of people use Redirection, and this brings with it extra challenges in terms of not breaking existing sites. Ideally no one notices the changes, and to help with this the modernisation will occur over several steps.
This first step (5.6) focuses on improving the PHP code by reformatting and linting, and ensuring everything checks out with PHPCS and PHPStan, as well as updating some of the build tools. A new settings class has been introduced to make unit testing easier, and the client has been reduced in size. These changes shouldn’t cause any functional changes, but the minimum supported version of PHP is bumped to 7.2 (from 7.0)
The second step (5.7) will focus on the client, ensuring it too is fully type checked, and uses more modern libraries. The PHP files will be moved to a better location in preparation for the final step. As before, this shouldn’t cause any functional changes, although the minimum supported version of PHP will be bumped to 7.4 (from 7.2).
The last step involves updating the PHP code to use namespaces and autoloading. Although there shouldn’t be any functional changes, it could affect people who directly use Redirection classes for custom functionality (please get in touch if you think this may affect you). The plugin will be at version 6.0 by this point so it should be clear it’s a major change. The minimum supported PHP may also be bumped to 8, although this will depend on the general WordPress environment.
There are many new features and improvements lined up after the modernisation, and I look forward to implementing them.