littleredbutton / bigbluebutton-api-php

Unofficial (but better) PHP API for @BigBlueButton
GNU Lesser General Public License v3.0
25 stars 12 forks source link

Support multiple checksum algorithms #147

Closed SamuelWei closed 10 months ago

SamuelWei commented 1 year ago

Fixes #146

Changes

SamuelWei commented 1 year 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

SamuelWei commented 12 months ago

Changed the initial implementation using a 4th constructor argument to a fluent setter to be compliant with the official PHP API

FelixJacobi commented 11 months ago

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.

SamuelWei commented 10 months ago

@FelixJacobi I reverted it back to the original initial implementation