While looking into this issue regarding backward-incompatible changes, I was thinking about how to realize that best. I am not talking about the switching of the types as suggested by @ChristophWurst but the best way to keep the development of the app up.
As the \OCP\DB\Types
class was just recently added to the master
branch on the server repository I have the problem that I cannot simply use it. There might be old installations that are not yet updated and thus do not know of this class. I do not even know if this will be backported to the versions before 21. Is it going to be backported for any new release also of the old major versions?
I could of course add a test for the version of the NC server or if a class is existing. This would cause trouble as soon as an instance of the class is needed as this would break the dependency injection. Here DI is not the problem but the question is also related in this direction.
Another option would be to have multiple branches for our app development and keep a version per NC server major version. This sounds quite tedious for me. Therefore, I ask what ist the intended use case to cover with such situations?
Thanks
Christian