Hroarr the Resource for Historical European Martial Arts and Sports Community has a great article about Phalanx and Shield Wall.
How they functioned from Ancient thru Middle Ages, and descriptions of tactics for attacker and defender.
A longer section in the same article goes into detail about how the sword was used by Phalanx or formation members.
They spend some time discussing the evolution of sword weapons for use behind the shield wall. The Byzantine spathion from the Late Roman period, The Thracian and Dacian rhompaia a special sword for specific purpose in the formation.
Very thoughtfully done.