5 years the last one.
The hardware, including battery, worked great. But it has been lacking updates for some years and I'm worried about vulnerabilities. LineageOS was also not available for this phone.
I bought a phone with 7 years updates and my initial intention is keeping it for 7 years. More if an stable and secure version of LineageOS is available down the line.