Well, firstly there's a difference between Spartan Hoplite warfare and a Macedonian Phalanx. By the time the Legions came around, Sparta was no longer the power it once was and Macedonia had already spread its military traditions around the Mediterranean.. Both Hannibal and Pyrrhus used the Macedonian style Phalanx to defeat the Romans on several occasions. I was more under the impression that the phalanx disappeared because it was used by the weak and disorganized successor states, who were not led by great generals and did not use the combined armies the phalanx requires properly, not because it was inherently inferior.
Of course, there's that famous battle (featured in RTW, no less) where the city of Sparta crushed Pyrrhus' army. I do not know if the Spartans used their traditional Hoplites in that battle or used the more modern Macedonian style, but I'm sure someone here would.
Bookmarks