A Japanese warship sailed into a Philippine port near disputed South China Sea waters in another sign of deepening security ties between the World War II foes to counter Beijing.