Arsenal defender Gabriel Magalhaes requires surgery on his hamstring injury and will miss the rest of the season as a result.