nextcloud / collectives

Collectives is a Nextcloud App for activist and community projects to organize together.
GNU Affero General Public License v3.0
102 stars 19 forks source link

fix(CollectiveStorage): adjust `getOwner` to NC31 #1491

Closed mejo- closed 1 month ago

mejo- commented 1 month ago

🏁 Checklist

max-nextcloud commented 1 month ago

Wait... that change looks like it's only adding a return type to the function.

Would this break with NC <= 30 because PHP does not yet support that syntax

mejo- commented 1 month ago

Wait... that change looks like it's only adding a return type to the function.

Would this break with NC <= 30 because PHP does not yet support that syntax

Exactly, it only adds the return type to be in line with the parent class on Nextcloud 31. I first thought it would then be incompatible with the parent classes on Nextcloud 30 and below, but manual testing and CI both proved me wrong. So should be good to be merged :blush:

provokateurin commented 1 month ago

The change is backwards compatible as you can add return types for methods you inherit if the parent doesn't have any return type.