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] Add Mobyt bridge#36648

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
fabpot merged 1 commit intosymfony:masterfromDeamon:add-mobyt-notifier-bridge
Aug 13, 2020

Conversation

@Deamon
Copy link
Contributor

@DeamonDeamon commentedApr 30, 2020
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
Deprecations?no
Tickets#33687
LicenseMIT
Doc PRsymfony/symfony-docs#13606
recipe PRsymfony/recipes#768

Add Mobyt notifier bridge.

In this SMS Provider, you can choose a sort of "quality service" to send the message.

I updatedsrc/Symfony/Component/Notifier/Message/SmsMessage.php to add the notification in order to be able to use the notification importance when creating options.

@nicolas-grekasnicolas-grekas added this to thenext milestoneMay 1, 2020
@DeamonDeamonforce-pushed theadd-mobyt-notifier-bridge branch from512440f to3b5cdbbCompareMay 2, 2020 20:26
@DeamonDeamonforce-pushed theadd-mobyt-notifier-bridge branch from3b5cdbb to59acfa2CompareJune 12, 2020 15:24
@Deamon
Copy link
ContributorAuthor

Rebased few minutes ago on master.
Fixed conflicts and fixed notifier_transport that changed from xml to php.

return$message;
}

publicfunctiongetNotification(): ?Notification
Copy link
Member

Choose a reason for hiding this comment

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

This should be reverted

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Hi@fabpot, you mean this function only or the entire modification of the file ?

Copy link
Member

Choose a reason for hiding this comment

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

The whole change in the SmsMessage class.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Question about that, I need to know the notification level inside the Moby Transport class to select a "type_quality" parameter (which implies cost differences).

Is there an other way ?

Copy link
Member

Choose a reason for hiding this comment

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

I would use the less costly by default and let's talk about this issue in another PR. That would allow to merge this one and think about the issue is a more broader sense instead of just for this specific provider.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Thank for you feedback. Fix is on the way.

@fabpot
Copy link
Member

@Deamon Can you submit a PR on symfony/recipes (you can have a look at other notifier bridge recipes to get some inspiration)?

@Deamon
Copy link
ContributorAuthor

Deamon commentedAug 10, 2020
edited
Loading

Hello@fabpot, thanks for your comment,
Here is the pr:symfony/recipes#768

There is also a documentation pr waiting.

@fabpot
Copy link
Member

@daemon Can you also rebase this PR on current master and take my comment into account? Thank you.

return$messageinstanceof SmsMessage;
}

protectedfunctiondoSend(MessageInterface$message):void
Copy link
Member

Choose a reason for hiding this comment

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

This must return aSentMessage now.

"ext-json":"*",
"php":"^7.2.5",
"symfony/http-client":"^4.3|^5.0",
"symfony/notifier":"^5.0"
Copy link
Member

Choose a reason for hiding this comment

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

Should be ^5.2

@DeamonDeamonforce-pushed theadd-mobyt-notifier-bridge branch from59acfa2 tocee47a1CompareAugust 12, 2020 09:20
@Deamon
Copy link
ContributorAuthor

@fabpot, all changes have been pushed

{
$options =$this->options;
unset($options['message']);
unset($options['recipient']);
Copy link
Member

Choose a reason for hiding this comment

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

Could be merged with the previous line.

@@ -0,0 +1,4 @@
/Testsexport-ignore
/phpunit.xml.distexport-ignore
/.gitattributesexport-ignore
Copy link
Member

Choose a reason for hiding this comment

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

Can be removed to be consistent with the other similar files in core.


thrownewTransportException(sprintf('Unable to send the SMS: "%s".',$error['result']),$response);
}
}
Copy link
Member

Choose a reason for hiding this comment

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

You must return aSentMessage instance. Can you also test with a real account to be sure that everything works as expected?

@DeamonDeamonforce-pushed theadd-mobyt-notifier-bridge branch fromcee47a1 tobf594b7CompareAugust 12, 2020 16:10
@Deamon
Copy link
ContributorAuthor

Deamon commentedAug 12, 2020
edited
Loading

@fabpot your last feedback have been resolved.

the code is teste in v5.1 only, I couldn't get rid of the following error using dev-master branch:

Executing script cache:clear [KO] [KO]Script cache:clear returned with error code 1!!!!  In PhpDumper.php line 1838:!!!!    Cannot dump definition because of invalid class name ('chatter.transport_factory').!!!!!!Script @auto-scripts was called via post-update-cmdexit status 1

tried several ways but none worked for me.

and yes, the sentMessage part isn't tested because class doesn't exists in 5.1

@fabpot
Copy link
Member

Thank you@Deamon.

@fabpotfabpot merged commitacda2dc intosymfony:masterAug 13, 2020
@DeamonDeamon deleted the add-mobyt-notifier-bridge branchAugust 14, 2020 06:46
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestSep 9, 2020
This PR was merged into the master branch.Discussion----------[Notifier] Add Mobyt NotifierHi all,here is the doc forsymfony/symfony#36648Commits-------63ea8b7 Add Mobyt Notifier doc
@nicolas-grekasnicolas-grekas modified the milestones:next,5.2Oct 5, 2020
@fabpotfabpot mentioned this pull requestOct 5, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@OskarStarkOskarStarkOskarStark left review comments

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.2

Development

Successfully merging this pull request may close these issues.

5 participants

@Deamon@fabpot@OskarStark@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp