The 'Castle on the Hill' hitmaker is set to play himself in Danny Boyle's Beatles-inspired comedy musical and the 55-year-old actor has revealed they got to know one another over a round of the tabletop game Carrom whilst on set.
Sanjeev - who will also play himself - told The Sun newspaper: ''I did a day's filming with Ed. He was great fun.
''There is a traditional Asian game called Carrom and he had never seen it. It's a board and you flick counters around on it.
''Me and Ed had a game and I let him win.''
'Yesterday' will star 'Mamma Mia! Here We Go Again' actress Lily James as teacher Ellie, whilst 'EastEnders' actor Himesh Patel is on board to play male lead Jack Malik.
'Saturday Night Live' comic Kate McKinnon has also been cast in the role of Deborah.
The iconic Liverpool band's surviving members, Sir Paul McCartney and Sir Ringo Starr, are also set to make appearances along with James Corden.
'Love Actually' writer and director Richard Curtis is penning the script.
The plot follows a struggling musician (Jack) who learns he's the only person on Earth who can remember The Beatles.
Ed, 28, is no stranger to guest roles, as he appeared as himself in 2015 comedy 'Bridget Jones's Baby' when Bridget attended Glastonbury festival.
The singer also made a cameo in his favourite TV show 'Game Of Thrones', with a fleeting appearance in the first episode of the hit HBO series' seventh season in July 2017.
But the 'Perfect' hitmaker faced a harsh backlash from fans for his role - which saw him play a Lannister soldier, who had a chance encounter with Maisie Williams' Arya Stark.
He said afterwards: ''No one wants to see me come back. I wanted to be a cameo in it, and I've done the cameo. I'm cool with it, though. I enjoyed it.''
Ed also played Sir Cormac in five episodes of the historical drama 'The B*****d Executioner' created by 'Sons Of Anarchy' showrunner Kurt Sutter.
Listen to their new single 'People Change'.
For the first, and almost certainly last, time Cambridge indie rockers Mallory Knox performed at The Booking Hall in Dover.
'Devour You' is a fantastic follow up to Starcrawler's debut album and represents a move on in terms of sound and, in part, direction.
Salvation Jayne's third birthday bash was a riot of colour and a celebration of a band very much enjoying what they do.
We're feeling the nostalgia this month.
American Thighs was released on this day in 1994.
Gloo is a new supergroup consisting of UK mystic-beat producers Iglooghost and Kai Whiston as well as nu-pop singer/producer BABii.
Listen to her new single Forgive Me now.
As it's been 12 years since the last Bridget Jones movie, expectations aren't too high...
Bridget has always known how to get herself into a muddle - catastrophic muddles at...
After battling the dating scene and finally finding love with Mark Darcy, Bridget Jones is...
In July of 2015, Ed Sheeran played his biggest gigs to date, selling out Wembley...