PHP is somewhat crippled since it doesn't have return types (yet). I need my code to throw an exception when X already exists. I can write this in a scenario, but I'm not able to go from the scenarios to the interface my class should implement.
Actually this problem is the same in TDD I guess. There seems more that I can tell through my 'tests' than through my interfaces. Yet my interfaces define what components can interact, what responsibilities they should take.
The problem is bigger in PHP because it doesn't have return types but it also exists in other languages because there is no contract that says an exception should be thrown when x is the case.
How can I best deal with this?