First of all, thanks for your work, this package is perfect.
The reason of this PR is to add a little improvement, especially usefull when using the api like following
$api = new SpotifyWebAPI\SpotifyWebAPI();
$api->setAccessToken(session()->get('access_token'));
$user = $api->me();
It will now be possible to chain the setters such as
$me = (new SpotifyWebAPI\SpotifyWebAPI())
->setAccessToken(session()->get('access_token'))
->me();
Since I'm using this package in my project, i faced this and wanted to contribute on my own to this project.
I also added the tests to cover this expectation. I hope everything will be fine to you.
PS: I also i noticed a deprecation on assertObjectHasAttribute that will be remove in PhpUnit 10. I didn't want to mix up the PR so feel free to say if you want i can mass search and replace the usages 👍 (it will become assertObjectHasProperty)
Hi,
First of all, thanks for your work, this package is perfect. The reason of this PR is to add a little improvement, especially usefull when using the api like following
It will now be possible to chain the setters such as
Since I'm using this package in my project, i faced this and wanted to contribute on my own to this project. I also added the tests to cover this expectation. I hope everything will be fine to you.
PS: I also i noticed a deprecation on
assertObjectHasAttribute
that will be remove in PhpUnit 10. I didn't want to mix up the PR so feel free to say if you want i can mass search and replace the usages 👍 (it will becomeassertObjectHasProperty
)