Skip to content

[Notifier] add support for smsapi-notifier #36940

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
Aug 18, 2020

Conversation

szepczynski
Copy link
Contributor

@szepczynski szepczynski commented May 24, 2020

Q A
Branch? master
Bug fix? no
New feature? yes
Deprecations? no
License MIT
Doc PR symfony/symfony-docs#13716

Hi,

I've created integration to notifier to support polish sms operator - smsapi.pl

Here is smsapi-notifier integration: https://github.com/szepczynski/smsapi-notifier. Can you grab this code and make as symfony/smsapi-notifier?

This PR includes changes in notifier and framework-bundle to support smsapi transport as well as other included in notifier component.

Could someone integrate this into notifier component?

@nicolas-grekas
Copy link
Member

Since this is a new feature, can you please rebase to target master?

@szepczynski szepczynski changed the base branch from 5.0 to master May 28, 2020 12:42
@szepczynski
Copy link
Contributor Author

ok, done

I create also a recipe PR here: symfony/recipes#776

@fabpot fabpot changed the title add support to smsapi-notifier to Notifier component [Notifier] add support for smsapi-notifier Aug 17, 2020
Copy link
Member

@fabpot fabpot left a comment

Choose a reason for hiding this comment

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

The code should be part of the PR. Can you add it here?

@@ -50,6 +50,10 @@
<tag name="texter.transport_factory" />
</service>

<service id="notifier.transport_factory.smsapi" class="Symfony\Component\Notifier\Bridge\Smsapi\SmsapiTransportFactory" parent="notifier.transport_factory.abstract">
<tag name="texter.transport_factory" />
</service>
Copy link
Member

Choose a reason for hiding this comment

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

Can you move it to the new PHP config file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I've done

@fabpot
Copy link
Member

fabpot commented Aug 17, 2020

You should rebase to get rid of the merge commit.

@@ -0,0 +1,3 @@
/Tests export-ignore
/phpunit.xml.dist export-ignore
/.gitignore export-ignore
Copy link
Member

Choose a reason for hiding this comment

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

missing new line.

return $message instanceof SmsMessage;
}

protected function doSend(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.

As of 5.2, you must return a SentMessage instance.

$port = $dsn->getPort();

if (!$authToken) {
throw new IncompleteDsnException('Missing path (maybe you haven\'t update the DSN when upgrading from 5.0).', $dsn->getOriginalDsn());
Copy link
Member

Choose a reason for hiding this comment

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

I think this is a copy/paste that should be removed as there is no upgrade here as the provider is new.

Copy link
Member

@fabpot fabpot left a comment

Choose a reason for hiding this comment

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

LGTM. Can you rebase to get rid of the merge commit?

@fabpot
Copy link
Member

fabpot commented Aug 17, 2020

Can you also fix issues reported by fabbot (please, ignore the error message suggestion as this is a false positive)?

@fabpot
Copy link
Member

fabpot commented Aug 18, 2020

Thank you @szepczynski.

@fabpot fabpot merged commit e6cdba6 into symfony:master Aug 18, 2020
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.2 Oct 5, 2020
@fabpot fabpot mentioned this pull request Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants