No manufacturer makes any promises about future system updates for a device. They would shoot themselves in the foot if they would, because if the device fails to get a good market share the resources needed to keep an device up to date would be lost.
I order to ensure that you get updates for your Android devices you have basically two options:
- Go with a Google device, that is the ones sold as Nexus. Those devices usually receive Android updates first and for a long time span (~2-3 years)
- Pick a device which has an established active mod community or is likely to get one. For example Samsung's Galaxy S was a massive success, it was one of the most sold Smartphones at a time. This is a massive incentive for modders to work on the device and deliver a good quality mod, like Cyanogenmod.
If you go with 2., you could for example go to the Cyanogenmod site an research which devices they currently support. Also try to get a feeling how good the device is supported, how active the maintainer for the device is.