When sampling a 2D texture in GLSL (a uniform sampler2D), the texture function is used and the dimension is inferred from the sampler (2D in this case). This is the modern way of sampling a texture in the GLSL since 1.30 (GLSL Reference Pages). However you can also use the texture2D function.
Is the texture2D function deprecated and if so, will support for the texture2D function be removed (or has been removed) in some version of GLSL?