The president of the roofer's lobby has entered the chat!
Composition roofs need to be replaced when they are worn out and not before that. Good materials competently installed could last 50 years, more in mild climates. If you have the kind of weather that will wear down a roof in 10 years you probably cannot have solar panels.