Closed SamuelWei closed 10 months ago
Looks good.
@sualko Can you just have a quick look into the linked issue, as I started a question on how to deal with it. This is just one implementation idea
Changed the initial implementation using a 4th constructor argument to a fluent setter to be compliant with the official PHP API
Changed the initial implementation using a 4th constructor argument to a fluent setter to be compliant with the official PHP API
Hm, I was fine with the initial implementation, except the type hint 😄 . In my opinion, setters, which changes the behavior of the object are bad at all. Imagine the following use case: A developer to knowing the internals of this library injects the object using dependency injection in his own class and just thinks it's a good idea to just set the algorithm. This changes the state afterward permanently and globally. As the algorithm is a connection parameter like the URL and secret, I would not allow changing it after setting it in the constructor.
@FelixJacobi I reverted it back to the original initial implementation
Fixes #146
Changes