Download the PHP package hanoii/platformsh2slack without Composer

On this page you can find all versions of the php package hanoii/platformsh2slack. 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 platformsh2slack

[!NOTE] This project has been archived. There's a better way of doing something like this which is through activity scripts.


Platform.sh -> Slack incoming webhook adapter

This is a simple php script that translates Platform.sh webhook into a Slack formatted message.

You can install this in your php app container and host it there for your project's specific webhooks.

Sponsored by Infomagnet - builds websites to any design using Drupal.

slack-example

Installation

You can install the package using the Composer package manager. You can install it by running this command in your project root:

Then create an incoming webhook on your Slack account for the package to use. You'll need the webhook URL to instantiate the adapter.

Basic Usage

Platform.sh build hook

If your application (.platform.app.yaml) is already being built with composer:

You can simply add:

To your composer.json file of the project and create a small script as per above.

If not, you will have to add a script to the repository and run composer install on your build hook manually.

Settings

Option Type Default Description
channel string null The default channel that messages will be sent to, otherwise defaults to what's set on the Slack's incoming webhook
commit_limit int 10 The number of commits from the payload to include in the Slack message
routes bool false Whether to show project's routes on every slack message. If false, it will be shown only when you branch.
redirects bool false Whether to include project's redirects with routes on every Slack message. If false, redirects will be shown only when you branch.
basic_auth bool false Whether to show project environment's HTTP Authentication username and password in Slack message. WARNING: If true, potentially sensitive data passwords will be sent in the clear to your Slack channel.
configurations bool false Whether to show project's configurations on every slack message. If false, it will be shown only for master when you push, merge or have a subscription plan update.
attachment_color string '#e8e8e8' RGB color for Slack attachment.
project string null If present, it will be used as the project name instead of the default string. Project name is misisng in Platform.sh's payload.
project_url string null If present, the project name will be used as a link to this URL on Slack notifications. Environment branch will be appended automatically to the URL.
debug string null An optional path where posssible unhandled webhooks JSON can be saved. This is useful if you want to send over the json for me to add support for it.
debug_all boolean false If debug is set, it saves the JSON of every webhook sent, not only the unhandled ones.
active boolean false If active is set, only webhooks of active environments will be sent to platform. Useful for some external integrations.

Token

This is an optional feature you can choose to use on the script. It's a nice simple validation so that you script is not abused.

If you added:

to your script, you will have to append the token the Platform.sh's webhook integration URL.

Add the integration on platform

Run the following:

Environoments

You can have this script on any environment, even master. As far as my trials went, even pushing to master works.


All versions of platformsh2slack with dependencies

PHP Build Version
Package Version
Requires maknz/slack Version ^1.7
symfony/http-foundation Version ^2 || ^3 || ^4
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 hanoii/platformsh2slack contains the following files

Loading the files please wait ....