3 ms·
A good start would be the easy to fix things that can be done in a day: - Start using git. - Start using migrations. (build migration file from current DB) -
by NorwegianDude 4y ago
A good start would be the easy to fix things that can be done in a day:
- Start using git.
- Start using migrations. (build migration file from current DB)
- Start using CI/CD. (Run migrations, pull/push PHP files, add new nginx routes and reload nginx)
- Start using docker for dev env.
Then I'd focus on the application itself, and that will probably take some days/weeks of work if the routes are complicated or the PHP version is very old(12 years/PHP 5.2 or 5.3 should not be too much work):
- Upgrade the codebase to PHP 8.1. (Reactor might be useful here, but PHP code is generally not hard to update.)
- Consider doing routing using a PHP entry file instead of nginx.
Then new features can follow whatever pattern you want, and old code/DB-schema can be upgraded as you go.
Many of your points are non-issues: PHP is fine. You don't have to use a framework. You only need caching if you need it. PHP itself does not necessarily need a templating language.
The fact that there are a bunch of route entries in nginx suggests that there at least is some form of pattern, for something.
A full all-at-once rewrite would probably break a lot of things at once, so I would just do the low hanging fruit first and modernize the codebase as it's being worked on.