Download the PHP package agencelex/notifications-microsoft-teams without Composer

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

lex_notifications_microsoft_teams

Microsoft Teams channel provider for lex_notifications. Send rich Adaptive Cards to any Teams channel from any TYPO3 extension, scheduler task, middleware, or domain service — using the same Laravel-inspired notification API you already know.


Table of Contents


Requirements

Requirement Version
PHP ^8.2
TYPO3 ^13.4 \|\| ^14.3
agencelex/notifications ^1.3

Installation

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


Setting Up a Teams Webhook

This extension sends messages via the Teams Workflows webhook (the modern replacement for the deprecated Office 365 Connectors).

  1. Open the Teams channel you want to post to.
  2. Click Workflows.
  3. Search for "Post to a channel when a webhook request is received" and select it.
  4. Follow the wizard — give it a name and click Next.
  5. Copy the generated webhook URL (it looks like https://prod.webhook.office.com/webhookb2/…).

Official guide: Create an Incoming Webhook — Microsoft Learn


Quick Start

Send it from anywhere:


Core Concepts

This extension provides two independent traits. Each addresses a different side of the notification contract.


CanSendToTeams — on the Notification class

Add this trait to any class that extends Lex\Notifications\Notification to declare that it can be sent to Teams. The trait enforces a single contract: the class must implement toTeams(object $notifiable): TeamsMessage.

TeamsChannel checks for the presence of toTeams() at runtime and throws an \InvalidArgumentException (code 1789350405) if the notification was dispatched to the teams channel without implementing it.


HasRouteNotificationForTeams — on the notifiable model

Add this trait to the notifiable model (e.g. a FrontendUser, a BackendUser, or any domain entity using the Notifiable trait) to declare that it can provide a Teams webhook URL. The trait enforces that the class implements routeNotificationForTeams(): string.


Routing the Webhook URL

The channel resolves the webhook URL in this order — the first non-empty value wins:

Priority Source How
1 (highest) TeamsMessage::webhookUrl() Call ->webhookUrl('https://…') when building the message
2 Notifiable model Implement routeNotificationForTeams(): string (via HasRouteNotificationForTeams)

Option A — Per-message (highest priority)

Useful when the URL differs per notification, or when the notifiable has no concept of a webhook URL:

Option B — On the notifiable model (recommended for most cases)

The channel automatically calls routeNotificationForTeams() when no URL is set on the message:


Building Adaptive Cards

Adaptive Cards are JSON documents that Teams renders natively. Use the fluent PHP builders below — no JSON authoring required.

Interactive designer: Adaptive Cards Designer Full schema reference: Adaptive Cards Schema Explorer Teams-specific guidance: Adaptive Cards in Teams — Microsoft Learn


AdaptiveCard

The root container for all card content.


TextBlock

Displays plain or formatted text. wrap(true) is enabled by default.


FactSet & Fact

Renders a two-column key/value table — ideal for structured metadata.


Image & ImageSet


Container

Groups elements with shared styling or a background.


ColumnSet & Column

Divides content into side-by-side columns.

Column width accepts:


RichTextBlock

Inline-styled text in a single paragraph. Mix weights, colours, and sizes without separate TextBlock elements.


ActionSet

Embeds action buttons at a specific position in the body (rather than always at the bottom).


Actions

All actions accept common properties: ->id(), ->style(), ->iconUrl(), ->tooltip(), ->isEnabled(), ->mode().

Action\OpenUrl — open a URL

Action\Submit — submit form data

Action\ShowCard — reveal an inline card

Action\ToggleVisibility — show/hide elements


Real-World Examples

Order Confirmation

Notifies the fulfilment team when a new order is placed.

The notifiable (e.g. the fulfilment channel entity) provides the webhook URL:


Server Alert

Sends a critical alert with severity colour coding when a monitor threshold is exceeded.


New User Registration with Avatar

Posts a profile card with a person-style avatar when a new frontend user registers.


Content Approval Request

Sent to the editorial team when an editor submits a page for review. Uses ToggleVisibility to reveal the full editorial note on demand.


Multi-Channel Notification (Teams + Mail)

Both traits can be composed freely. Include teams alongside any other channel in via().


References

Resource Link
Set up a Teams Incoming Webhook Microsoft Learn — Incoming Webhooks
Adaptive Card schema explorer adaptivecards.io/explorer
Adaptive Cards interactive designer adaptivecards.io/designer
Adaptive Cards in Microsoft Teams Microsoft Learn — Cards reference
Teams Workflows (Power Automate) Microsoft Learn — Power Automate & Teams
Message card object reference Microsoft Learn — Message card reference
lex_notifications (core) GitHub — agencelex/typo3-notifications

All versions of notifications-microsoft-teams with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
agencelex/notifications Version ^1.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-microsoft-teams contains the following files

Loading the files please wait ...