Under EU law the phone must have a 2 year warranty with the retailer. The manufacturer may deal with this on the retailers behalf, but they don't have to.
But under UK law the phone has to last a reasonable amount of time. There is no definitive answer on what is reasonable and each case should be looked at on a case by case basis.
For example if your mint condition phone bricked its self after 25 months of use, you will likely be able to convince a reasonable person that the fault existed at the time of purchase.
If your battered, smashed screen phone stopped working after 25 months, you may have a tough time convincing a reasonable person that the fault existed at the time of purchase.
The problem the average consumer has is their own ignorance of the law, the retailers ignorance of the law and getting past the companies representative who's job it is to fob you off.
Also you are not entitled to a replacement, only a repair (can be refurbished) or a partial refund dependent on use and condition.