Why not remove those loops and allow `addRoleProvider();` to accept arrays too? Same for the others.
It's a kind of small BC change, but the end user behaviour remains the same