So this is a very frequently repeated misconception about what the EU law actually says.
Yes, there is an EU law that says retailers are responsible for 2 years(6 in a some cases) for any item they sold......but only to rectify any manufacturing defects. The law additionally states that any defect found in the first 6 months is presumed to be a manufacturing issue, anything after the first 6 months it's the responsibility of the customer to prove that the product has failed due to a manufacturing problem. I'm sure you can appreciate that this can be very hard to do.
It's not a "warranty" in the sense that most people mean warranty. If your laptop fails 18 months after purchase, the retailer only has to fix it if you can prove that it failed due to a manufacturing defect. It's different to manufactuer's warranty, which usually covers any defect no matter the reason.
And yes, there is also the law that states that products should last a "reasonable" amount of time - but what is reasonable is not a strict definition, and again, unfortunately sometimes has to be argued in small claims court. It's not so straigtforward.