Download the PHP package agencelex/notifications-slack without Composer

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

Laravel-style Notification System - Slack Channel

Slack channel provider for lex_notifications. Send notifications from TYPO3 to Slack using Incoming Webhooks or the Slack Web API. Compose messages using plain text, legacy attachments, Block Kit PHP objects, or JSON copied from Slack's Block Kit Builder.

TYPO3 13.4 / 14.3+, PHP 8.2+, lex_notifications 1.5+, and slack-php/slack-block-kit 2.3+.

Supports Slack chat.postMessage (Bot Token), HTTPS Incoming Webhooks, GovSlack, plain text / mrkdwn, legacy attachments, native PHP Block Kit objects, raw JSON pasted from Block Kit Builder.


Requirements

Requirement Version
PHP ^8.2
TYPO3 ^13.4 \|\| ^14.3
agencelex/notifications ^1.5
slack-php/slack-block-kit ^2.3

Install

Activate the extension in the TYPO3 Extension Manager or via composer (Composer-mode installations activate it automatically).

Configuration

Place the following configuration in your TYPO3 installation at config/system/additional.php (not in the extension itself). Configuration/ExampleAdditional.php is a non-loaded example:

Only put secrets into environment variables (or a protected secret provider). The example loads them into $GLOBALS at bootstrap. Treat configuration/debug dumps as sensitive. The service reads the configuration when sending. Named webhooks are strongly recommended for queued notifications.

Slack setup

Send via NotificationManager (on demand)

NotificationManager::route() checks channel registration before dispatching. Do not define a message-only destination: the notification core checks the notifiable route before building Slack content.

Send from a Notifiable model

Message examples

Block Kit Builder JSON (without building classes)

Generate your message using the Block Kit Builder, then copy the JSON and use it in your code.

Native Block Kit library

Legacy attachments

Thread

Accessibility: Include withText() as readable fallback when sending Block Kit. This also improves push notification previews.

Security & errors

Testing

Install Composer dependencies before running tests:

Acceptance tests

Tests/Acceptance/ documents, as executable examples, every way to notify via Slack. Each test boots a real TYPO3 instance (SQLite) with lex_notifications and this extension, configured exactly like Configuration/ExampleAdditional.php (secrets read from environment variables). Only the network hop is replaced: a Guzzle handler registered in $GLOBALS['TYPO3_CONF_VARS']['HTTP']['handler'] records the request and answers like Slack, so no message ever leaves the machine.

Test class Covers
DestinationsTest Named webhooks (SlackRoute::webhookNamed(), webhook:name), direct webhook URLs, Web API IDs (C…, G…, U…, D…, W…), GovSlack, timeouts, no redirects
EntryPointsTest notify(), notifyNow() (with channel override), dispatcher send() / sendNow(), route(), routes(), AnonymousNotifiable, channel('slack')->send(), skipped recipients
MessageFormatsTest Text, Block Kit Builder JSON, bare block arrays, unknown block types, native Kit messages, arrays, legacy attachments, threads, broadcast, unfurling
QueuedDeliveryTest ShouldQueue through Messenger, serialized payload contains no token / named-webhook URL, URL resolved when consumed
FailureHandlingTest 429 + Retry-After, 5xx, 4xx, redirects, connection errors, Web API errors, misconfiguration, invalid routes, no secret in exceptions, no retry

The script clears .Build/public/typo3temp/var/tests first: on exFAT volumes the testing framework cannot remove previous test instances.

Live tests against a real Slack workspace

Tests/Functional/SlackLiveTest.php posts real messages (webhook, named webhook, bot message to a channel, Block Kit, thread reply and broadcast, DM to a user, legacy attachment) and checks real error answers (channel_not_found, invalid_auth). It belongs to the live-slack group, which Build/phpunit-functional.xml excludes, so it only runs when requested. Each test is skipped when its variables are missing.

Use a dedicated test channel and app. Slack limits chat.postMessage to about one message per second per channel; the tests never retry.

PHPUnit uses Tests/bootstrap.php. Unit tests mock TYPO3 RequestFactory and do not make Slack API calls. Run integration tests on both TYPO3 13.4 and TYPO3 14.3 before deploying. PHP 8.2/8.3/8.4 support must be checked against the exact installed CMS and PHPUnit versions.

Development

See CLAUDE.md for short Claude Code project rules. Files and conventions mirror lex_notifications 1.5.0 and notifications_microsoft_teams 1.1.0.


All versions of notifications-slack with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-json Version *
typo3/cms-core Version ^13.4 || ^14.3
agencelex/notifications Version ^1.5
slack-php/slack-block-kit Version ^2.3
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 agencelex/notifications-slack contains the following files

Loading the files please wait ...