Is it a bad practice to use primary key in junction tables?

These table names are hurting my brain. :-p Why wouldn’t you call that sucker “user_favorite_photo_label_colors”?

Overall I agree that your practical usage example looks like a situation where it’s better to have a single-column primary key in what would otherwise be a junction table. But I think you need to emphasize more clearly that the problem arises only when you need to reference the junction as a foreign key. Because otherwise, the composite key could span 10 columns and it wouldn’t be a problem. It’s only when you need to relate the junction as a foreign key that even a 2-column key would be inconvenient.

For what it’s worth, in Doctrine terminology (circling back to OP), we would probably stop thinking of these things as junction tables and start thinking of them as separaite entities, and rather than a single many-to-many relationship with an implicit junction table, instead there would be a new entity with two one-to-many relationships. In Juice’s example, for instance, there would be a UserFavoritePhoto entity with a one-to-many relationship with users and a one-to-many relationship with photos.