facebook / facebook-php-business-sdk

PHP SDK for Meta Marketing API
https://developers.facebook.com/docs/business-sdk
Other
816 stars 513 forks source link

Fix: Cursor.php return type hint breaks php < 8 #572

Open sesanzb opened 1 year ago

sesanzb commented 1 year ago

Fixes issue introduced in versions > 15.0.2 when current() function doc line: "* @return AbstractObject|bool" was changed by return type hint: "public function current() : AbstractObject|bool {"

Changed current() return typing from AbstractObject|bool to AbstractObject|null to better match what you would expect

stcheng commented 1 year ago

Hi @sesanzb thanks for submitting the pull request. We are considering dropping the support of PHP version < 8 for now. So this pull request might not be merged.

sesanzb commented 1 year ago

Hi @stcheng ! I understand, but in case this solution doesn't merge, it would be great to have a solution for 15.0.3 revision which were minor update and stopped working on PHP < 8, and to add a requirement in composer for 16.0.0 revision for php ^8

stcheng commented 1 year ago

@sesanzb right now we don't branch out older versions but only tag them. so since v16 has already released on top of the master branch, we're dropping the support since then.