While there's always those rare sketchy occasions where the rules don't apply, I find you can usually mitigate most of this risk.
I've found that on roads with a lot of parked cars which are too narrow to safely ride outside of the door zone yet on the right of the lane, the traffic is probably moving slow enough that you can take the lane.
On faster roads, the parked cars are usually in their own lane (or whole lane's width worth of road), which you can take the leftmost edge of, or even ride right on the divide between right and left lanes, with there still being room for people to get past in the left lane.
When things get too tight, I slow right the heck down. Running into a door at 15kph is much better than at 35. Of course, getting doored and ending up on the ground in traffic is not such a pleasing alternative.
The key, for me, seems to be vigilance. That's why I can't understand the people lollygagging around downtown on bikes wearing headphones, oblivious to the world. They're often also cutting across intersections taking a left turn against a red light, riding in the middle of the road, or against the flow of traffic. They combine these behaviours shockingly frequently. It must be knocking a significant amount of years off their average life expectancy.