littleredbutton / bigbluebutton-api-php

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

Move GuestPolicy to separate class #105

Closed SamuelWei closed 2 years ago

SamuelWei commented 2 years ago

Should we move the GuestPolicy to a seperate class like in the upstream repo? It would be a breaking change in my opinion, as the const are changing.

See: src/Core/GuestPolicy.php

sualko commented 2 years ago

Since the guest policy is only used in the parameters and all other parameter constants are also also inside the parameter classes, I see no advantage in moving them to a separate class.

SamuelWei commented 2 years ago

I agree, just wanted to discuss this. I'll close the issue. If anyone has a different opinion, please comment and reopen.

sualko commented 2 years ago

No problem. Maybe my view is even wrong. We can also add them as alternative without removing them from the parameter class.

FelixJacobi commented 2 years ago

I would consider such a change as useful but not yet.

I would propose to change minimum supported PHP version to PHP 8.1 in version 5.0 and to replace these constants by enumerations: https://www.php.net/manual/de/language.types.enumerations.php

This would require a change similar to moving the constants to another class. The constants can act as a BC layer in an earlier release to allow smooth upgrading without the need to change the consumer code (using enums and constants is almost syntactically identical from consumer perspective).

This would improve the type safety on this point.