Sheikh Saleh Al-Fawzan may Allāh preserve him stated that:

Whosoever believes that the dead can benefit or harm and he takes vow to them and get close to them(by giving them act of worship) he is a Mushrik (a polytheist ) and have committed a major shirk that takes one out of Islam.

{ Al-muntaqah 83/1 }

Translation: Knowledge and Action