Yunus narrates from al-Hasan (may Allah have mercy on him) that regarding the saying of Allah: 'two just men from among you, or two others from outside you' [Surah al-Ma'idah: 106], (he said): from the Muslims, of the tribe or from outside the tribe.
Someone else narrated from al-Hasan (may Allah have mercy on him) the addition: 'You shall detain them both after the prayer.' [Surah al-Ma'idah: 106]
(b) Ikrimah (may Allah have mercy on him) says that 'or two others from outside you' means Muslims who are from other than your tribe.
Imam al-Shafi'i (may Allah have mercy on him) says: I heard some say that it is abrogated by the saying of Allah: 'And take as witnesses two just men from among you' [Surah al-Talaq: 2]. And I have seen the muftis of the people of the abode of Hijrah and the Sunnah give fatwas that the testimony of anyone other than just Muslims is not permissible, and that is my view.
It is reported from Imam al-Shafi'i (may Allah have mercy on him) that he related from Ibn al-Musayyib (may Allah have mercy on him), Abu Bakr bin Hazm (may Allah have mercy on him) and others that they refused to accept the testimony of the dhimmis.
The Shaykh (may Allah have mercy on him) says: This, together with what is narrated from Ibn al-Musayyib that he used to say regarding the saying of Allah, 'or two others from outside you' [Surah al-Ma'idah: 106]: from the People of the Book, shows that he held it to be abrogated, or applied the verse to something other than testimony.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20621