8000 Zulip notifier UnsupportedSchemeException "The "zulip" scheme is not supported." · Issue #40374 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
8000

Zulip notifier UnsupportedSchemeException "The "zulip" scheme is not supported." #40374

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

Closed
big-r81 opened this issue Mar 5, 2021 · 0 comments

Comments

@big-r81
Copy link
Contributor
big-r81 commented Mar 5, 2021

Symfony version(s) affected: 5.2.4

Description

I'm testing the zulip notifier package. If I inject the ChatterInterface to send a chat message then I'm always getting a 500 error with the message "The "zulip" scheme is not supported".

How to reproduce

See complete steps.

     * @Route("/", name="home")
     */
    public function index(ChatterInterface $chatter): Response
    {
        $message = new ChatMessage('Test-Message');
        $zulipOptions = (new ZulipOptions())
            ->topic('Test-Topic');
        $message->options($zulipOptions);
        $sendMessage = $chatter->send($message);

        return $this->json([
            'message' => 'Welcome to your new controller!',
            'path' => 'src/Controller/HomeController.php',
        ]);
    }

Additional context

notifier.yaml:

framework:
    notifier:
        chatter_transports:
        #    slack: '%env(SLACK_DSN)%'
        #    telegram: '%env(TELEGRAM_DSN)%'
            zulip: '%env(ZULIP_DSN)%'
        #texter_transports:
        #    twilio: '%env(TWILIO_DSN)%'
        #    nexmo: '%env(NEXMO_DSN)%'
        channel_policy:
            # use chat/slack, chat/telegram, sms/twilio or sms/nexmo
            urgent: ['email']
            high: ['email']
            medium: ['email']
            low: ['email']
        admin_recipients:
            - { email: admin@example.com }

.env

ZULIP_DSN=zulip://symfony-****-bot@zulip.***.com:BLf4a7********5B9GrN4g2Hy******uKh6K@zulip.***.com?channel=test

composer show | grep notifier

symfony/notifier                   v5.2.4  Sends notifications via one or more channels (email, SMS, ...)
symfony/zulip-notifier             v5.2.4  Symfony Zulip Notifier Bridge
@big-r81 big-r81 added the Bug label Mar 5, 2021
big-r81 added a commit to big-r81/symfony that referenced this issue Mar 5, 2021
Changing ZulipTransportFactory to 'chatter.transport_factory' to prevent the exception UnsupportedSchemeException "The "zulip" scheme is not supported."

Fixing symfony#40374
@fabpot fabpot closed this as completed Mar 5, 2021
fabpot added a commit that referenced this issue Mar 5, 2021
…n UnsupportedSchemeException (big-r81)

This PR was merged into the 5.2 branch.

Discussion
----------

Changing ZulipTransportFactory tag to prevent the exception UnsupportedSchemeException

| Q             | A
| ------------- | ---
| Branch?       | 5.2 <!-- see below -->
| Bug fix?      | yes
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tickets       | Fix #40374 <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT
| Doc PR        |  <!-- required for new features -->
<!--
Replace this notice by a short README for your feature/bugfix. This will help people
understand your PR and can be used as a start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - Never break backward compatibility (see https://symfony.com/bc).
 - Bug fixes must be submitted against the lowest maintained branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too.)
 - Features and deprecations must be submitted against branch 5.x.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
-->
Changing ZulipTransportFactory to 'chatter.transport_factory' to prevent the exception UnsupportedSchemeException "The "zulip" scheme is not supported."

Commits
-------

61c5baf Update notifier_transports.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0