carlos-mg89 / PHPoAuthLib

PHP 7 / 8 oAuth 1/2 Client Library
Other
4 stars 7 forks source link

Allow serialization of full token objects #5

Closed samwilson closed 2 years ago

samwilson commented 2 years ago

In https://github.com/carlos-mg89/PHPoAuthLib/commit/f08a062d5abe903a4092bcf92f855f6e2e7b676a the AbstractToken::__sleep() method was added, but it breaks serialization of request tokens (as stored in sessions).

Bug: https://github.com/samwilson/phpflickr/issues/50

samwilson commented 2 years ago

@carlos-mg89 I've asked on that commit about why this was added, because it doesn't seem to reference an issue. So this might be the wrong fix! But it works in my testing for PhpFlickr.

carlos-mg89 commented 2 years ago

Hi @samwilson , I have no idea why that change was done.

If you think is not right and you've done some testing about it, and since tests keep passing, I'm more than happy to accept the PR.

Will verify in a later occasion and see if there's any issue.

samwilson commented 2 years ago

Yeah I couldn't figure it out! But let's see how it goes. :) Thanks for making a new release.