To add some practical results to that: the Data Retention Directive[1] was struck down by a bunch of national constitutional courts before being completely annulled by the EU Court of Justice.
1: https://en.wikipedia.org/wiki/Data_Retention_Directive