Nasri joined West Ham for free on Dec. 31, 2018 and spent the second half of the 2018-19 season at the London Stadium before being released in the summer.
The Frenchman started his career with Marseille before joining Arsenal in 2008. After four seasons in North London, he joined City where he won the Premier League in his first season.
Nasri won another title and the League Cup in 2014 while at City before joining Sevilla on loan in the 2016-17 campaign and leaving for Turkish side Antalyaspor the following season.
He received a six-month doping ban from football before signing for West Ham.
Anderlecht manager Kompany left City in the summer after captaining them to their fourth Premier League title.