Download the PHP package ryantxr/slack-webhook without Composer

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

Slack Webhook

This library provides a client for Slack Webhooks. With minimal code, you should be able to send a message to a channel.

This library does not try to do everything. It does one thing well.

It sends messages to Slack channels using Slack incoming webhooks.

This library uses Slack incoming webhooks. In the early days of slack, these were much easier to use than their API. It was certainly easier to set up on the Slack platform. To some extent, this is still true. There are no oauth permissions to set and the API itself is easier to understand.

Motivation

I wanted a minimal library that can send a message with minimal effort. Think of it as a paperclip. It is easy to use and requires almost zero learning to use it. It should have very little complexity and require very little thinking to get it going.

This library is compatible with service containers.

Getting Started

You can either copy the PHP files directly into your project or use composer.

Composer require command

composer require ryantxr/slack-webhook

Features

Usage

Multiple Webhooks / Channels

If you need to write to multiple channels, make a webhook for each channel. Then, initialize the class like this:

Slack Communicator

This is a new class that uses the Slack conversations API instead of using webhooks. The only upside I can see is that it can be used to access multiple channels.

Here is how you use it.

Icons

It is possible to use different icons for the messages. If you don't specify one, slack will use the default for the slack app.

There are two ways to specify an icon.

  1. Emoji. ":rocket:"
  2. URL. "https://somewhere/something"

You can specify a default icon or use a different icon for each message.

Creating the communicator object

Construct a SlackCommunicator object from a container like this:


All versions of slack-webhook with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.8 || ^8.0
guzzlehttp/guzzle Version ^7.4 || ^6.3
psr/log Version ^1.1 || ^3.0.0
nesbot/carbon Version ^2.20
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 ryantxr/slack-webhook contains the following files

Loading the files please wait ....