Weave 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 Bot Bundle

Telegram Bot Bundle Laravel Package

m4n50n/telegram-bot-bundle

A Symfony bundle for building Telegram bots with a fluent, Laravel-style API. It wraps the Telegram Bot API in a clean service layer, offering command routing, webhook and polling updates, keyboards, and message helpers so you can ship bots quickly with familiar, testable PHP code.

View on GitHub
Deep Wiki
Context7

This bundle provides a wrapper for using longman/telegram-bot inside Symfony.

Frequently asked questions about Telegram Bot Bundle
Is m4n50n/telegram-bot-bundle a Laravel package?
No. It is a Symfony bundle that wires the longman/telegram-bot library into Symfony's dependency injection container and kernel, and the Laravel-style API framing does not change that. Laravel has no bundle registry, no Kernel::registerBundles(), and no Bundle base class, so the package cannot be installed and booted in a Laravel application as-is. Treat it as a Symfony-only wrapper and evaluate the underlying library separately.
Can I install m4n50n/telegram-bot-bundle with Composer in a Laravel app?
You can require it, but Composer installation is not the blocker, bootstrapping is. The bundle's value is the Symfony Extension and Configuration glue, which Laravel never loads, so you would end up with an unregistered package and unused config. If you want the functionality, install longman/telegram-bot directly and bind its services yourself.
What does this bundle actually add on top of longman/telegram-bot?
Most likely a thin DependencyInjection Extension and Configuration pair that maps YAML config to constructor arguments for the underlying library's services. Command routing, update dispatching, keyboards, and message helpers come from longman/telegram-bot, not from this wrapper. Read DependencyInjection/*Extension.php before assuming there is logic worth keeping.
Which Symfony and PHP versions does m4n50n/telegram-bot-bundle support?
Symfony 7 and PHP 8.3/8.4 compatibility are unverified, and the pinned constraint range on longman/telegram-bot is not documented. The last release was 2024-02-22 with no published cadence, so check composer.json and the CI matrix before relying on it. Assume nothing until the bundle's tests have run against your target versions.
Does it support webhook mode or only long polling?
The underlying longman/telegram-bot library supports both setWebhook and getUpdates polling, but whether the bundle exposes webhook configuration is unconfirmed. This decides your deployment topology: a public HTTPS endpoint plus controller versus a long-running worker or scheduled command. Verify the config surface before you design around it.
How do I build a Telegram bot in Laravel if this bundle won't work?
Two viable paths. First, adopt longman/telegram-bot directly and write a first-party Laravel service provider that binds the Telegram, Request, Response, and command-router services as singletons with a publishable config/telegram.php, which is roughly a one-to-two day spike. Second, use a Laravel-native package such as irazasyed/telegram-bot-sdk or defstudio/telegraph if you have no prior investment in longman's command and conversation model.
Should I fork m4n50n/telegram-bot-bundle to port it to Laravel?
Only if the Symfony extension turns out to contain non-trivial configuration surface worth preserving. In most cases it is plain DI wiring, and reimplementing it as a service provider is faster and cleaner than carrying a fork. Read the extension source first; the answer to is this worth forking is usually no.
Is m4n50n/telegram-bot-bundle safe to use in production?
The risk here is maintenance and supportability rather than code quality. It has 18 stars, zero dependents, a bus factor of one, and no evidence of production adoption, so you would be an early adopter of a wrapper rather than of a proven integration. You would also be tracking a second project for security and version bumps on top of longman/telegram-bot.
How do I test a Telegram bot built with this bundle?
There is no confirmed test suite or CI signal for the bundle itself, so verify coverage before committing. The good news is that longman/telegram-bot is framework-agnostic, so you can mock the Telegram, Request, and Response services and assert on dispatched commands without touching the network. In Laravel, bind fake instances through the container and use Http::fake for any direct Bot API calls.
What are the Laravel alternatives to this Symfony bundle?
The closest match in capability is irazasyed/telegram-bot-sdk, which is Laravel-native, and defstudio/telegraph, which offers a fluent API plus testing helpers. If you specifically want longman/telegram-bot's command and conversation model, use that library directly with your own service provider rather than a Symfony wrapper. All three options keep you on projects with real adoption and active maintenance.
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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib