Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Telegram Laravel Package

laravel-notification-channels/telegram

View on GitHub
Deep Wiki
Context7
7.0

What's Changed

Breaking Changes

  • TelegramFile::file() now strictly normalizes inputs to PSR-7 streams and rejects unsupported types earlier. Passing arbitrary values through to Guzzle is no longer allowed.

Added

  • Laravel 13 support.

  • New Telegram payload builders and fields:

    • businessConnectionId(), messageThreadId(), directMessagesTopicId()
    • protectContent(), allowPaidBroadcast(), messageEffectId()
    • replyParameters(), suggestedPostParameters()
  • TelegramLocation enhancements: horizontalAccuracy(), livePeriod(), heading(), proximityAlertRadius().

  • TelegramMessage: entities(), linkPreviewOptions().

  • TelegramFile: captionEntities(), showCaptionAboveMedia().

  • New builders: TelegramDice, TelegramMediaGroup.

  • Low-level client helpers:

    • sendDice, sendMediaGroup, sendChatAction
    • editMessageText, editMessageCaption, editMessageMedia, editMessageReplyMarkup
    • stopPoll, deleteMessage, deleteMessages

Changed

  • Minimum PHP version bumped to 8.3.

  • Dropped Laravel 11 support.

  • Codebase now enforces stricter typing (strict_types, improved PHPDoc shapes).

  • Centralized response decoding via Telegram::decodeResponse() using Guzzle JSON utilities.

  • Improved Telegram error parsing with safer fallbacks.

  • Refactored:

    • TelegramChannel recipient resolution and response handling
    • TelegramFile upload handling (clear remote vs local distinction)
    • TelegramMessage chunked sending behavior
    • Shared media logic extracted to InteractsWithTelegramMedia
  • onError() now accepts any callable.

  • HasSharedLogic typing hardened; keyboard layouts normalized for invalid column counts.

  • TelegramBase now accepts optional Telegram instance (better testability).

  • TelegramUpdates::get() safely returns empty array on invalid responses.

  • Config now supports both services.telegram.* and legacy keys.

Dev / Tooling

  • Upgraded to Pest 4 + pest-plugin-laravel 4.
  • PHPUnit 12 configuration and coverage updates.
  • CI workflows modernized (tests, coverage, changelog, PHPStan, PHP versions).
  • PHPStan raised to level: max with stricter rules enabled.

Tests

  • Expanded coverage:

    • Response decoding and error parsing
    • Channel routing and early returns
    • Chunked message handling
    • Updates fallback handling
    • Dice, media groups, and client helpers
  • Updated test suite to align with refactored runtime and tooling.

Docs

  • README refreshed with new builders, helpers, and configuration details.

New Contributors

Full Changelog: https://github.com/laravel-notification-channels/telegram/compare/6.0.0...7.0.0

6.0

What's Changed

  • Add support for Laravel 12.
  • Add TelegramVenue to support sendVenue method.
  • Add sticker method to the TelegramFile to send sticker file.
  • Add sendWhen method to conditionally send a message.
  • Add ParseMode Enum and refactor parsing mode setting logic.
  • Add buttonWithWebApp method to open web app from a button.
  • Add onError method to handle exceptions. Based of https://github.com/laravel-notification-channels/telegram/pull/201 by @Hesammousavi.
  • Refactor sendFile to support raw data sending.
  • Refactor escapedLine method.
  • Refactor HasSharedLogic trait.
  • Refactor classes to use PHP 8.2 features.
  • Revise keyboard method parameters to $requestLocation and $requestContact to be consistent.
  • Drop support for Laravel 10.
  • Drop support for PHP 8.1.

New Contributors

Full Changelog: https://github.com/laravel-notification-channels/telegram/compare/5.0.0...6.0.0

3.0

What's Changed

New Contributors

Full Changelog: https://github.com/laravel-notification-channels/telegram/compare/2.1.0...3.0.0

2.0.0
  • Add Laravel 9 Support.
  • Add Laravel conditional trait to payload builder to use when on methods chain. PR #139.
  • Drop support for older version of PHP < 7.4 and Laravel < 8.
1.0.0
  • Register Telegram instance to container.
  • Add TelegramUpdates to retrieve bot updates. PR #133.
  • Refactor TelegramChannel. PR #136.
  • Add Retrieving Chat ID docs and improve docs.
  • Add missing type declaration and minor improvements to various methods.
  • Add Contact Support. PR #138.
0.9.0
  • Add Poll Support. PR #130.
  • Remove StyleCI in favor of GitHub Actions Workflow for Code Styling. PR #131.
0.8.0
  • Add message chunking feature (chunk($limit)) in cases where the message is too long. Closes #127.
0.7.0
  • Dropped PHP 7.1 support. PR #118.
  • Dispatch event NotificationFailed on exception. PR #119.
  • Test against PHP 8.1. PR #120.
  • Add support to use TelegramChannel::class in on-demand notification route. PR #122.
  • Refactor channel registration with the channel manager. PR #122.
0.6.0
  • Add GitHub Actions workflows for tests and coverage. PR #103.
  • Add alternate method to resolve Telegram notification channel. PR #110.
  • Add buttonWithCallback() method. PR #114.
  • Revise file upload logic.
  • Add more info on proxy setting.
  • Remove dead badges.
0.5.1
  • PHP 8 Support.
0.5.0
  • Add previous ClientException when constructing CouldNotSendNotification exception. PR #86.
  • Add Laravel 8 Support. PR #88.
  • Add Bot token per notification support. Closed #84.
  • Add view file support for notification content. Closed #82.
  • Add support to set HTTP Client.
0.4.1
  • Add Guzzle 7 Support. PR #80.
0.4.0
  • Add support to set custom api base_uri for web bridge.
  • Revise README with instructions for Proxy or Bridge support.
  • Revise on-demand notification instructions - Fixes #72.
  • Fix typo in test.
  • Remove redundant test.
  • Remove exception when chat id isn't provided - PR #75.
0.3.0
  • Add ability to set param in disableNotification method.
0.2.0
  • Laravel 7 Support.
  • Support response handling from Telegram.
0.1.1
  • Support PHP 7.1 and up.
0.1.0
  • New Helper Methods to work with file attachments.
  • Code cleanup.
  • Documentation updated with more examples and previews.
  • Micro optimization and improvements.
  • Typehint and return type declaration.
  • Fixed tests.
0.0.6
  • Laravel 6 Support.
  • Add Photo, Document, Audio, Location and other file notification type support.
  • Token getter and setter.
0.0.5
  • Laravel 5.7 Support.
  • Add ability to change button columns.
0.0.4
  • Laravel 5.6 Support.
0.0.3
  • Laravel 5.5 Support with Auto-Discovery.
0.0.2
  • Laravel 5.4 Support.
0.0.1
  • Initial Release.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
comsave/common
alecsammon/php-raml-parser
chrome-php/wrench
lendable/composer-license-checker
typhoon/reflection
mesilov/moneyphp-percentage
mike42/gfx-php
bookdown/themes
aura/view
aura/html
aura/cli
povils/phpmnd
nayjest/manipulator
omnipay/tests
psr-mock/http-message-implementation
psr-mock/http-factory-implementation
psr-mock/http-client-implementation
voku/email-check
voku/urlify
rtheunissen/guzzle-log-middleware