Legacy code is present of any successful company. The longer your live and profit, the older your code is.
How to get out of this? You can rewrite (don't do that!) or refactor manual (don't do that either!). It's 2019 and there is a tool for that now - Rector.
I help companies to refactor their huge legacy code in a couple of weeks. You can also switch frameworks, from PHP 5.3 to PHP 7.4, from Laravel to Symfony... the sky is the limit :)
I will show you how you can make your legacy code shine again!