I would absolutely NOT recommend it in almost all cases. I still to this day think one of my bosses is absolutely lovely. I’ve met her fiance (now husband), gone out for birthdays and lunches with her, and she was extremely supportive when I wanted to attend a protest march. Still though, I was well aware that she was my boss and had a certain level of respect for her. She’s also a unicorn because I can think of a couple of other people who I was even-leveled with who became bosses and acted like totally different people. Drunk power is something else, especially between former peers.
But then there’s the group you’re talking about where the boss tries to befriend a subordinate. The problem is if you two get too chummy and then the boss wants to give you some kind of year-end review or feedback, she can’t just judge from your work behavior. She now knows far more about you and your personal feelings about other co-workers and outside activities. So she can just hit you with, “But remember that time you did” and “You also said this other…” You think you’re talking to a “friend” and then you get a boss’ feedback. I strongly recommend keeping these two world’s apart — unless you can meet a unicorn like the first boss. I haven’t met anyone like her EVER again.