Download the PHP package codebuds/mattermost-publication-bundle without Composer

On this page you can find all versions of the php package codebuds/mattermost-publication-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mattermost-publication-bundle

Mattermost Publication Bundle

Configuration

This bundle allows you to easily publish text to a Mattermost webhook.

In order to do so you need to add configuration to your symfony by, for example, adding a mattermost_publication.yaml file to the config/packages containing :

and adding the webhook URL to your environment variables :

This will set the general configuration for all publications. If these are not set you have to make sure to at least add a webhook URL to the message element you want to publish.

Usage

Basic text publication

You can use the publisher directly inside a controller function by adding it as a parameter (if you have a general webhook_url configured):

In an eventSubscriber you can inject the publisher in the constructor :

and then, inside any function, you can publish a message thanks to the bundle :

You can also use twig to create message templates, if you create the following template file in templates/mattermost/message.md.twig :

You can render it and use it like the following :

Configured publication

As it was possible to publish simple text it is also possible to configure the message to all available Mattermost incoming webhook features.

In order to do so instead of just publishing text a CodeBuds\MattermostPublicationBundle\Model\Message must be created.

Doing it this way will override the general settings from the configuration file. If something has been set in the configuration file and the setter is not used the general value will be in the message.

If you want to send a direct message and the incoming webhook is not locked to a channel in mattermost you can set the channel to the username preceded by @ :


All versions of mattermost-publication-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
symfony/http-client Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package codebuds/mattermost-publication-bundle contains the following files

Loading the files please wait ....