Even without solar, few last 30 years without major repairs where I am (pacific northwest). There are lots of things to consider. Some/most solar installs don't take debris into account, creating dams that can send water places it shouldn't be, like up and under shingles. Not an issue in the desert but in rain forest it is a big deal. And the number of penetrations ... I've seen people put dozens of screws through what used to be a good roof. They cannot all be perfect.
Around here (midwest) hail or wind usually knocks out composite roofing in 10-15 years—much less if you're unlucky. There's little point in springing for the "50 year" composites and similar.
I guess the solar panels would protect the roof a bit, but I'd expect a bad hail storm to be bad news for those, too.