Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Notifier] Remove superfluous parameters in *Message::fromNotification()#35167

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

fancyweb
Copy link
Contributor

QA
Branch?5.0
Bug fix?no
New feature?no
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

Those classes are final so I think we don't need those extra arguments.

@fancywebfancywebforce-pushed thenotifier-message-from-notification branch from10b01dd to24a8f38CompareJanuary 2, 2020 10:07
@@ -35,7 +35,7 @@ public function __construct(RawMessage $message, Envelope $envelope = null)
$this->envelope = $envelope;
}

public static function fromNotification(Notification $notification, Recipient $recipient, string $transport = null): self
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Alternative: for the $transport, we could set the transport directly from this method then? But the current code uses the setter everytime.

@@ -32,7 +31,7 @@ public function __construct(string $subject, MessageOptionsInterface $options =
$this->options = $options;
}

public static function fromNotification(Notification $notification, Recipient $recipient, string $transport = null): self
public static function fromNotification(Notification $notification): self
Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Maybe we need $recipient here in the future? But being forced to pass an useless argument is worse in practice for me.

@nicolas-grekasnicolas-grekas added this to the5.0 milestoneJan 4, 2020
@nicolas-grekas
Copy link
Member

There is a failure on deps=low

@fancywebfancywebforce-pushed thenotifier-message-from-notification branch from24a8f38 to98d24d9CompareJanuary 4, 2020 13:28
@nicolas-grekasnicolas-grekas modified the milestones:5.0,nextJan 4, 2020
@fancywebfancywebforce-pushed thenotifier-message-from-notification branch from98d24d9 toe4dec22CompareJanuary 6, 2020 10:19
@fancywebfancyweb changed the base branch from5.0 tomasterJanuary 6, 2020 10:19
@fancywebfancywebforce-pushed thenotifier-message-from-notification branch frome4dec22 tod0dacf5CompareJanuary 6, 2020 10:21
Copy link
Member

@fabpotfabpot left a comment

Choose a reason for hiding this comment

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

I did that on purpose. I'm 👎 for this change.

@fancyweb
Copy link
ContributorAuthor

@fabpot In this case, shouldn't the methods at least set the passed $transport? I don't understand how keeping any unused argument can be better for usability. Especially the mandatory $recipient on ChatMessage. Could you explain your intention please? Thank you :)

@fabpot
Copy link
Member

Thank you@fancyweb.

fabpot added a commit that referenced this pull requestFeb 4, 2020
…fromNotification() (fancyweb)This PR was merged into the 5.1-dev branch.Discussion----------[Notifier] Remove superfluous parameters in *Message::fromNotification()| Q             | A| ------------- | ---| Branch?       | 5.0| Bug fix?      | no| New feature?  | no| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        | -Those classes are final so I think we don't need those extra arguments.Commits-------d0dacf5 [Notifier] Remove superfluous parameters in *Message::fromNotification()
@fabpotfabpot merged commitd0dacf5 intosymfony:masterFeb 4, 2020
@fancywebfancyweb deleted the notifier-message-from-notification branchFebruary 4, 2020 14:14
@nicolas-grekasnicolas-grekas removed this from thenext milestoneMay 4, 2020
@nicolas-grekasnicolas-grekas added this to the5.1 milestoneMay 4, 2020
@fabpotfabpot mentioned this pull requestMay 5, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@dunglasdunglasAwaiting requested review from dunglas

@lyrixxlyrixxAwaiting requested review from lyrixx

@srozesrozeAwaiting requested review from sroze

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees
No one assigned
Projects
None yet
Milestone
5.1
Development

Successfully merging this pull request may close these issues.

4 participants
@fancyweb@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp