Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Closed
@big-r81

Description

@big-r81

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: [email protected] }

.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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions