7s shifter with 11s cassette

Hey there!

Bit of an amateur question here. But I was wondering if using my Shimano RD-M560 7s rear derailleur with a 11s cassette would work? If the biggest sprocket doesn't exceed the max cog size of 36t?

From what I understand, derailleurs "don't know" how many gears they have to shift, so intuitively it shouldn't be a problem? But maybe cassette width plays a role here? Maybe there's other things I haven't thought of too...

I feel like this question has already been asked but I don't seem to find a proper answer...

Thanks :)