“Years of deprecation” is putting it mildly. The original mysql library was long known to be a huge Achilles’ heel for PHP, missing lots of critical security features, such as prepared statements. mysqli was released as an improved alternative with PHP 4.1, which shipped in December 2001. The original mysql library was officially deprecated as of PHP 5.5; that one shipped in June 2013. By that point, all the literature on PHP best practices had been screaming at people to stop using the original library for more than a decade.
I’m struggling to think of any platform I’ve ever worked with that’s given people that much warning that some feature was going to go away.