Skip to content
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

Notifier Component #33687

Merged
merged 1 commit into from
Oct 5, 2019
Merged

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Sep 24, 2019

Q A
Branch? 5.0
Bug fix? no
New feature? yes
Deprecations? no
Tickets
License MIT
Doc PR not yet

Initial PR for the Notifier component. Tests missing for now.

@fabpot fabpot changed the title Notifier feature v1 Notifier Component Sep 24, 2019
Copy link
Member

@yceruto yceruto left a comment

Choose a reason for hiding this comment

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

Just minor CS so far ;)

@yceruto yceruto added this to the next milestone Sep 24, 2019
@fabpot fabpot force-pushed the notifier-feature-v1 branch 6 times, most recently from e25fd0f to 47c4b0a Compare September 25, 2019 20:35
@fabpot fabpot changed the base branch from 4.4 to master September 25, 2019 20:35
@fabpot fabpot removed this from the next milestone Sep 25, 2019
@Wirone
Copy link
Contributor

Wirone commented Oct 4, 2019

@fabpot @nicolas-grekas Side question: why are you amending changes all the time? In this case it's impossible to see changes introduced on each step of the review process, so when new version of a branch is pushed I don't know what should be reviewed again (Github marks whole files as "changed since last view", with large files it's difficult to read whole file every time). I recommend adding new commits and squash them just before merging, if you want to keep compact history.

Edit: ahh, Github generates compare view for those pushes, but they're linked under "force pushed" and it's not intuitive and transparent since text is not decorated in any way. In Gitlab there is "Compare with previous version" link, much easier to notice.

@fabpot
Copy link
Member Author

fabpot commented Oct 5, 2019

For some reasons, some of my comments were not published :(

@fabpot
Copy link
Member Author

fabpot commented Oct 5, 2019

@Wirone About providers that could be implemented: this initial PR provides just a few of the possible/popular providers to get us started. I hope that many other ones will be submitted over time.

Regarding setXxx() methos vs xxx() ones: I only used the xxx() styles for data objects.

@fabpot fabpot force-pushed the notifier-feature-v1 branch 2 times, most recently from 2554b5c to 0b219b9 Compare October 5, 2019 10:38
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

Let's merge and accept followups to tweak the rest, add tests, etc.
Help wanted!

@nicolas-grekas
Copy link
Member

Thanks @fabpot for working on this feature, this is much appreciated.

nicolas-grekas added a commit that referenced this pull request Oct 5, 2019
This PR was merged into the 5.0-dev branch.

Discussion
----------

Notifier Component

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | yes <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       |
| License       | MIT
| Doc PR        | not yet

Initial PR for the Notifier component. Tests missing for now.

Commits
-------

7f97a3f [Notifier] added the component
@nicolas-grekas nicolas-grekas merged commit 7f97a3f into symfony:master Oct 5, 2019
@fabpot fabpot mentioned this pull request Nov 12, 2019
fabpot added a commit that referenced this pull request Nov 30, 2019
This PR was squashed before being merged into the 5.0 branch (closes #34549).

Discussion
----------

[Notifier] Add Slack bridge tests

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | See #33687
| License       | MIT

Adds tests for the Slack bridge of the Notifier component.

#SymfonyHackday

Commits
-------

626fdaa [Notifier] Add Slack bridge tests
fabpot added a commit that referenced this pull request Nov 30, 2019
This PR was squashed before being merged into the 5.0 branch (closes #34539).

Discussion
----------

[Notifier] Add telegram tests

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | See #33687
| License       | MIT

Adds tests for the Telegram bridge of the Notifier component. Not sure if this is the right way to go, but would love some feedback.

#SymfonyHackday

Commits
-------

3b4d83c [Notifier] Add telegram tests
fabpot added a commit that referenced this pull request Feb 10, 2020
This PR was merged into the 5.1-dev branch.

Discussion
----------

Add Mattermost notifier bridge

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |  See #33687
| License       | MIT
| Doc PR        |

Added a http://mattermost.org (open source Slack alternative)  transport for the new Notifier component

Commits
-------

eaba6a5 Add Mattermost notifier bridge
fabpot added a commit that referenced this pull request Feb 10, 2020
This PR was squashed before being merged into the 5.1-dev branch (closes #34022).

Discussion
----------

[Notifier] add RocketChat bridge

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | See #33687
| License       | MIT

This would add [RocketChat](https://rocket.chat/) integration for the Notifier component. RocketChat is a self hosted chat service.

Fully tested with a trial version of RocketChat.

@Wirone I noticed you suggested this.

Commits
-------

4869ef6 [Notifier] add RocketChat bridge
fabpot added a commit that referenced this pull request Feb 10, 2020
This PR was squashed before being merged into the 5.1-dev branch (closes #33968).

Discussion
----------

[Notifier] Add Firebase bridge

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | See #33687
| License       | MIT

This would add [Firebase](https://firebase.google.com) integration for the Notifier component. With Firebase you can send push notifications to the users of you Android and iOS app and website (formerly known as Google Cloud messaging).

I'm not sure if it's possible to have this merged, like the other bridges. Or if I should create a stand-alone repository? That'd be fine too.

Also it's now using the `ChatMessage` as implementation of `Symfony\Component\Notifier\Message\MessageInterface`, but I feel like this component could use a `PushMessage` or something similar. Although I'm not sure if it would contain more than `subject` that the `ChatMessage` does.

Commits
-------

2776d2f [Notifier] Add Firebase bridge
fabpot added a commit that referenced this pull request Feb 11, 2020
This PR was squashed before being merged into the 5.1-dev branch.

Discussion
----------

[Notifier] add OvhCloud bridge

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | See #33687
| License       | MIT

This would add OvhCloud sms integration for the Notifier component.
Tested with 'ovh-eu' entrypoint.

Inspiration : https://github.com/ovh/php-ovh

Commits
-------

76bfb85 [Notifier] add OvhCloud bridge
fabpot added a commit that referenced this pull request Aug 6, 2020
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Notifier] Add Zulip notifier bridge

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | See #33687
| License       | MIT
| Doc PR        | symfony/symfony-docs#13604

This adds a [Zulip](https://zulipchat.com/) (another popular open source Slack alternative) transport for the new Notifier component.

#### Sample DSN

```ZULIP_DSN=zulip://test-bot@zulipchat.com:api-key@example.zulipchat.com?channel=builds```

#### Configuration

```yml
# config/packages/notifier.yaml
framework:
    notifier:
        chatter_transports:
            zulip: '%env(ZULIP_DSN)%'
```

#### Example

```php
public function index(ChatterInterface $chatter)
{
    $message = (new ChatMessage('New order arrived!', new ZulipOptions('Ordering')))
        ->transport('zulip');

    $chatter->send($message);

    ...
}
```

Commits
-------

bd4fd32 Adds Zulip notifier bridge
fabpot added a commit that referenced this pull request Aug 13, 2020
This PR was merged into the 5.2-dev branch.

Discussion
----------

[Notifier] Add Mobyt bridge

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       |  #33687
| License       | MIT
| Doc PR        | symfony/symfony-docs#13606
| recipe PR   | symfony/recipes#768

Add Mobyt notifier bridge.

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

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

Commits
-------

bf594b7 Add Mobyt Notifier bridge
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.

None yet