Establish what is really used
Static analysis shows which code is never called and which Composer packages are unused. That is not enough, because in PHP a lot is resolved only at runtime. I therefore also place unobtrusive markers in suspicious code that log whether it is still executed in production. Server access logs and a list of all cron jobs and imports complete the picture.
A sufficiently long observation period is essential: code that only runs at the end of the month or once a year, such as for year-end closing, must not be mistaken for unused code.
