Twelve years ago, Brett Gardner was sandwiched between Alex Rodriguez and Robinson Cano along the back wall of spring training lockers in what was then Legends Field.

Gardner had made cameo appearances the previous spring training, occasionally summoned from minor league camp, but in 2007 he was among the non-roster invitees. The College of Charleston walk-on who turned into a third-round pick in 2005 lived among the stars — Derek Jeter, Mike Mussina, Roger Clemens, Mariano Rivera, Bobby Abreu, Johnny Damon and Jason Giambi were all also in the room.

As young players used to do, Gardner kept his ears open and mouth shut.

Now, fast-forward to last week inside George M. Steinbrenner Field. Gardner’s locker has moved to the left and once belonged to Bernie Williams and Darryl Strawberry. At 35, Gardner is the longest-tenured Yankee, a player who has carved out a very good career.

“I didn’t know what to expect, [Cano and Rodriguez] were great to me. I was thrown into the fire, No. 91,’’ Gardner said of 2007, a year before making his major league debut. “In a way, I don’t think I have been here that long, but I guess when I look back, I have, obviously. Things change in a hurry.’’

Gardner was 23 in spring training of 2007 and will be 36 in August.

Search the lists of Yankees career leaders and Gardner’s name surfaces in just one — he is ninth in triples with 61. Yet the career .261 hitter has retained the ability to get on base (career .344 percentage) as an above-average outfielder who can play center and left field.

“Everything has been more than I could have ever imagined as a young kid growing up. Obviously, playing college baseball, getting drafted, the minor leagues,’’ Gardner said. “The closer you get to fulfilling your dreams, the more things become reality and clearer.’’

Jeter and Rivera left the Bronx with five World Series rings and hungered for more. That Gardner has one in 10-plus years has instilled a sense of unfulfillment.

“The only thing that hasn’t been [fulfilling] is, if you had told me I would have been here 11 years and we would have only won one World Series. For me, that’s the only thing missing for me,’’ Gardner said. “The people I have met along the way and the coaches I have gotten to learn from and form relationships with and the teammates I got to play with. Somehow I am still one of the last guys in here standing. I definitely don’t take that for granted. … Very fortunate to have been here as long as I have, fortunate to be back for another season and hoping this one will be the best one yet.’’

Helping that turn into reality is Gardner not suffering a second-half slide like he did last year. In the first three months of 2018, Gardner helped the Yankees to a 42-34 ledger by hitting .255 with a .348 on-base percentage in 66 games. In the final three months, the Yankees went 42-32 and Gardner hit .218 with a .298 on-base percentage in 74 games. Aaron Judge missing 45 games didn’t help during that stretch.

Knowing the names he has played with early makes the following statement one that can’t be ignored. In addition to the tools that turned him into a productive big leaguer, Gardner is a good judge of talent.

“I really think this is the most talented group of guys that I have been a part of. I feel like we have more depth across the board than we have ever had,’’ Gardner said. “Over the course of a season, things don’t ever go as planned and that depth is going to get tested. This year we are very prepared.’’

That depth is already being tested. Gardner starts Thursday in center field because Aaron Hicks is on the injured list and joined by CC Sabathia, Dellin Betances, Luis Severino and Didi Gregorius.

The kid in the middle of Cano and Rodriguez has morphed into a clubhouse leader and chops-breaker who is often asked whether the years have flown by or if he feels like he has been a Yankee forever.

“For me, it has absolutely flown by. The old saying that time flies as you get older and I am 35 and I am starting to feel that a little bit,’’ Gardner said. “Not my body, physically I feel fine. I sit back sometimes and think, ‘Where did the time go?’ ’’