t0date/php-google-chat-v2

PHP library for sending messages to Google Chat via incoming webhook

Maintainers

Package info

github.com/T0date/php-google-chat-v2

pkg:composer/t0date/php-google-chat-v2

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.0 2026-02-14 10:03 UTC

This package is auto-updated.

Last update: 2026-03-14 11:30:14 UTC


README

A PHP library template for Google Chat Incoming Webhooks.

Requirements

  • Docker
  • Docker Compose

Development Workflow

  1. Install dependencies
make setup
  1. Run tests
make test
  1. Run static analysis and coding style checks
make lint
  1. Apply formatting fixes (when needed)
make fix

Common Commands

  • make setup: composer install
  • make test: Run PHPUnit
  • make stan: Run PHPStan
  • make cs: Run PHP-CS-Fixer in dry-run mode
  • make lint: test + stan + cs
  • make fix: Apply PHP-CS-Fixer fixes
  • make example FILE=simple_text_message: Run any script under examples/

Usage

<?php

require __DIR__ . '/vendor/autoload.php';

use T0date\GoogleChat\GoogleChatSender;
use T0date\GoogleChat\Message;

$sender = new GoogleChatSender();
$sender->send(
    'https://chat.googleapis.com/v1/spaces/xxx/messages?key=xxx&token=xxx',
    (new Message())->setText('Hello from php-google-chat-v2')
);

Notes

  • DecoratedText.icon is deprecated in Google Chat Cards v2. This library intentionally does not implement it.