While Apple’s support for mobile devices is (unfortunately) unmatched, Apple isn’t promising a deadline. Tomorrow they may announce that the iPhone X will no longer receive updates, and as a consumer, you legally don’t have a leg to stand on.
That’s a shame, because in practice they always keep updates for six to ten years. They can easily promise a minimum of five years of updates, and in doing so, outperform Samsung and other competitors in their commercials. Samsung has made that promise now, albeit in the very short term, so Apple can hold it accountable. In the worst case scenario, Samsung will extend its support for a few years, but the consumer will only come out with better results.
However, it seems that Samsung has taken a new approach to updates in the software design of more modern smartphones. Like Apple, they seem to be delivering updates longer and longer. They started with three years of updates, then there were four, and for some devices they now have five years of support. If they keep releasing updates the same way Apple does (update, but without making any guarantees up front), it will take a few more years before they can show you equivalent updates, even though they are functionally good.