I think warlocks get detect magic as an at will spell in 5e as an invocation? I may be wrong on that...
And thats something I hate about pathfinder: diplomacy checks and most magic spells are broken, to the point my friend told me he can convince my guy, regardless of what his save was, because he had this stupidly high diplomacy bonus, of stripping naked and giving him all his stuff.
He also made the entire dungeon full of traps no longer fun because of detect magic since he knew every single room and literally sat around the entire time because half of the rooms sounded bad to him ON TOP OF HIM LOCKING EVERYONE IN THE PARTY IN A ROOM, NEVER TO ESCAPE WHEN THE LAST ROOM WAS COMPLETED. The DM was so mad, that he actually rigged the sphinx encounter to be against him and he only succeeded because he rolled a nat 20 on an intelligence check (which I call bullshit on) and he was only allowed to do it because he kept saying his character is too smart to NOT know the answer (and his int is his second lowest stat next to str because he's a kid and a charisma based caster).
Seriously, this guy says pathfinder is the best because he breaks every game he plays, making it no longer fun anymore. He refuses to play any other edition and he loses it when in my backstory I said that my brother had wounds that didn't get healed properly and he said magic answered everything, and he even studied my backstory and pretty much told me its all wrong because magic and pathfinder gods smite anyone who follows any gods that aren't actually in the pathfinder pantheon (so I can't have my backstory of my family being the last worshipers of an old pantheon of gods because my family would've been smote on the day they decided to worship anyone who isnt in the pantheon).
Throw in the fact he does everything to nerf my character because I don't play it the way he wants it, and you have that one guy who you wish wasn't there... Seriously, when I said I was making a two weapon ranger, he said I'm an idiot for not being a two handed ranger. Throw in he went up to the DM who had no problem with my wolf having his actual hit dice rolled and got mad that my wolf wasn't forced to have 9hp at second level. Seriously, this is just me he does it to, the party bard is ok, the wizard is ok, the rogue is ok but the ranger gets yelled at all the fricking time. When I made a ranger the way he wanted it as my character's brother, he still wasn't happy because I took a raven instead of a Roc as my animal companion (I picked it because I didn't know you could take a Roc and it suited his character). Seriously, I can't even have a good storyline for my character without him getting pissed at me.