You may well have to replace the inverter (the box that converts direct current from the panels mains alternating current) after 10 – 15 years at a cost of perhaps £800 at 2022 prices. The panels themselves should still produce at least 80% of initial power after 25 years.
For batteries, many manufacturers provide a warranty of perhaps 10 years or some number of cycles (filling and emptying the battery), whichever is the smaller, with some level of degradation, for example 20%. However, it’s too early to know what the lifetime of batteries will be in practice.