Skip to content

Convert the issue assignee parameter to array #738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2018

Conversation

acrobat
Copy link
Collaborator

@acrobat acrobat commented Sep 5, 2018

The assignees parameter should be an array, this will return an exception in the near future. See #737

Copy link
Collaborator

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good. Just a minor

@@ -57,6 +57,10 @@ public function add($username, $repository, $issue, array $parameters)
throw new MissingArgumentException('assignees');
}

if (!is_array($parameters['assignees'])) {
$parameters['assignees'] = [$parameters['assignees']];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add @trigger_error('Good message', E_USER_DEPRECATED)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added a deprecation, is the message ok?

@acrobat acrobat force-pushed the fix-issue-assignee-parameter branch 3 times, most recently from 2fcc7b4 to 3399d3b Compare September 5, 2018 18:27
Copy link
Collaborator

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect!

@acrobat acrobat force-pushed the fix-issue-assignee-parameter branch from 3399d3b to 6e9759c Compare September 5, 2018 18:29
@acrobat acrobat merged commit 6e843e6 into KnpLabs:master Sep 5, 2018
@acrobat acrobat deleted the fix-issue-assignee-parameter branch September 5, 2018 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants