Mendix always supports up to 2 past major versions
So when Mendix 8 will release, there will be support for Mendix 6, 7 and 8. In other words, support for Mendix 5 will come to an end.
You can find the information about the product support over here:
https://docs.mendix.com/developerportal/support/#8-product-support-period
Mendix supports the current major release and the two prior major releases (and we support each major release for a minimum of 24 months). Because of this, we recommend that you upgrade your projects to the latest version of the Mendix Modeler at least once a year. We will reach out to you in time if you are running on a version that will become unsupported so that you have ample time to perform an upgrade.