Yeah, it's called "breaking changes". If you make mandatory something that was previously optional, you are going to break people's code. It's like having two overloads of the same function and then removing one. Not sure if there is an annotation specifically used to express that (and also, if you can add such an annotation, you can make it required to begin with), but it's a good idea to warn people. What would be better, generally speaking, is to provide both versions for a while, mark the optional one deprecated, and phase it out over time.
↧