It’s been a week and a month since I forked Nitro Porter.
10% of all commits on the decade-old project are now mine from this past month. So, things are moving briskly.
A few highlights:
- Refactored all 30 packages into per-item methods (users, roles, comments, etc) instead of one monster workflow. This will let me run and test them selectively, eventually.
- Refactored the bootstrap & dispatcher a bit to simplify them. This makes the whole project easier to understand and less prone to bugs.
- Deleted a whackload of dead / obsolete code, and fixed a lot of obvious bugs and errors. Adding a static analysis tool (PHPStan) made this much easier.
- Moved related groups of functions (namely the CLI and Render functionality) into a few new classes. The remaining miscellaneous functions at least have a plan for them now.
- Installed Discourse (jiminey what a slog) to investigate how to best derive an export from it.
- Did research on how best to support non-MySQL database sources. Started what will be a long process to swap out the custom database layer with Illuminate Database to natively support PostgreSQL and SQL Server, sidestepping some really unfortunate caveats of the existing Porter.
- Moved database connection data out of the opening form / input and into a config file.
- Stubbed in a framework for seeding test databases with Phinx.
- Added a proper
bin
file for running the Porter.
I’m only working on it during the weekends, and could only touch it 3 of the 4. Not a bad clip.
I’m keeping my to-do list pretty fluid, but at the moment it looks like reworking the main export model to use the new database layer (and untangle its mess of logic) is the next major challenge.
My hope is in a month I’m able to run an export using the new database layer and get some seeded tests running in December. Ideally I’d have the 3.0 release out in Q1, but… no timelines, remember?