proglab/space-transport-bundle

A transport for JetBrain Space for the symfony Notifier

Installs: 184

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

v1.0.7 2022-06-29 11:23 UTC

This package is auto-updated.

Last update: 2024-11-29 06:16:44 UTC


README

A bundle symfony for Jetbrains Space Transport in symfony notifier.

Installation

Open a command console, enter your project directory and execute:

composer require proglab/space-client-bundle

f you're not using symfony/flex, enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

return [
    // ...
    Proglab\SpaceClientBundle\SpaceClientBundle::class => ['all' => true],
];

Copy src/Resources/config/proglab_space_transport.yaml to your config/packages/proglab_space_transport.yaml and update the space url

And finally you must add this to your .env file :

###> proglab/space-transport-bundle ###
SPACE_DSN=space://{{token}}@{{host_url_space}}?channel={{default_channel}}
###< proglab/space-transport-bundle ###

Usage

The default space Channel is defined in your .env file.

use Proglab\SpaceClientBundle\SpaceTransport\SpaceNotification;


$notification = new SpaceNotification('Welcome Aboard', ['chat/space']);
$notification->setChannel('Xxx'); // you can override the default channel if necessary
$notifier->send($notification);