Tensions flared up on the border as migrants threw stones towards Polish troops.