The rear derailler doesn't care about 7, 8, or whatever speed. There are exceptions on some groups due to cable-pull, but I doubt this applies in your case. Only thing that matters is that the cage can wrap the amount of chain you have. The 7-8 speed mechanism is in the shifter. As others pointed out, make sure you have the limit screws set so you don't throw the chain into the spokes or dropout and you should be good to go.