mirror of
https://github.com/jwilsson/spotify-web-api-php.git
synced 2026-04-26 23:45:49 +03:00
[PR #259] [MERGED] Add return self on setters #283
Labels
No labels
bug
docs
enhancement
enhancement
enhancement
feedback wanted
good first issue
help wanted
help wanted
help wanted
invalid
pull-request
question
question
upstream
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotify-web-api-php#283
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jwilsson/spotify-web-api-php/pull/259
Author: @stephdotnet
Created: 2/11/2023
Status: ✅ Merged
Merged: 2/11/2023
Merged by: @jwilsson
Base:
main← Head:add-return-self-on-setters📝 Commits (1)
3f90f86Add return self on setters📊 Changes
6 files changed (+60 additions, -15 deletions)
View changed files
📝
src/Request.php(+3 -1)📝
src/Session.php(+15 -5)📝
src/SpotifyWebAPI.php(+9 -3)📝
tests/RequestTest.php(+2 -1)📝
tests/SessionTest.php(+10 -5)📝
tests/SpotifyWebAPITest.php(+21 -0)📄 Description
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
assertObjectHasAttributethat 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)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.