Where did you hear that? Have they perchance been trying to mislead you about renewables?
A solar cell is a huge flat diode. A panel is a chain of them in series. It sits there and makes electricity when exposed to light. There are no moving parts other than electrons. It requires no lubrication and no maintenance. Since they're sealed units under glass, the only thing you might have to worry about is leaks and damage from weather, which can be addressed with sealant if the panel is still functional. Admittedly if you crack it badly enough it will be unrepairable.
The inverter is slightly more fragile, being a big piece of power electronics, but still usually guaranteed for 10 years. The most fragile part of the system is probably the pump.