Closed piksel closed 6 years ago
Perhaps. My intention was to switch the non-4k constants 2018-06-29 when the old ones serve no purpose anymore. As it is right now I need to support both the clients that have the new certs and those that still haven't renewed. By using different constants it can be user-configurable. That way I don't have to use a special version with locked dependencies for those that have not migrated.
It is user configurable right now; the second parameter of Client::__construct()
or the third parameter of Client::make()
.
Yes, that's where the constants go. You could of course just use a custom string in the constructor and have the constant outside of the library. It just seems that the right URLs should be provided by the library and not hard coded in the dependent.
I guess I can create a new composer package that only supplies the constants instead.
Yes, the URLs should absolutely be provided by the library. However, I will not introduce two BC-breaks when only one is necessary.
I will hold off until mid-june to update the library. Swish does not have the cleanest record regarding stability so I get very suspicious when they make changes like this. If you need an older version of this lib, feel free to lock your composer.json against a previous commit.
How is this breaking BC? It's just the addition of two new constants. By not actually changing the constants that is already in use, nothing breaks until the old servers actually stop working and by then you'd be forced to update anyway. If you want to use the new servers before the deadline, then you use the new constants, otherwise you can just wait until the default constants change (which WILL break BC for everyone that has not updated).
Locking down the version is not an option, but I can just use my fork instead.
It breaks BC because at some point after June 29th the 4K constants will disappear. By not changing the names a simple composer update
will suffice. If you need to use the newer URLs today you may do so, I have not tested them yet.
Closing in favor of 67b810d
New constans uses the added "4K" (since they use 4096 bit keys), but should obviously replace the normal constants after the migration window. We cannot replace them yet as the new infrastructure will not work with the old 2048 bit certs.