sergix44/nutgram
Nutgram is a modern PHP Telegram bot framework with a Laravel-style API and first-class Laravel integration. Build bots with handlers, middleware, conversations, webhooks, and testable code without boilerplate.
Architecture fit. Nutgram is a standalone PHP 8.1+ Telegram Bot API framework with an optional Laravel service provider (nutgram/laravel). Its handler/middleware pipeline is idiomatic to Laravel developers but is not built on the Laravel container — it is an independent framework with its own kernel, so treat it as a third-party runtime embedded in the app rather than an extension of it. For a Laravel service that needs a Telegram bot (webhook or long-polling), the fit is good: it is mature, actively maintained, and tracks the Bot API closely.
Integration feasibility. Straightforward. Composer install, publish config, set NUTGRAM_BOT_TOKEN, register the webhook route or run the provided artisan hook command. No infrastructure dependencies beyond outbound HTTPS and a queue driver for async handlers. A sandbox bot can be running in an afternoon.
Technical risk. Release 4.50.3 is a patch release with a single change: correcting Bot API type mismatches in media, ephemeral edits, entities, and rich text. Two things follow:
The broader structural risk is inherent to the domain: Telegram ships Bot API updates frequently, so the library is a moving target. This release is evidence of healthy responsiveness, not of instability.
Key questions.
nutgram/laravel released in lockstep at 4.50.3, and what Laravel/PHP version constraints does it carry?Stack fit. PHP 8.1+/8.2+ on Laravel 9/10/11 via the official bridge. Composer for dependency management, Laravel queues for async handler dispatch, PSR-3 logging, PSR-18/Guzzle for outbound HTTP. No conflict with existing Laravel middleware or routing; the webhook endpoint is just a route.
Migration path (greenfield).
composer require nutgram/nutgram nutgram/laravel, pinned to 4.50.3.config/nutgram.php; supply token via environment/secret manager, never source control.Nutgram class — this preserves the option to swap frameworks and makes handlers unit-testable.Compatibility. Verify before merging: php constraint, laravel/framework constraint on the Laravel bridge, and that the app's HTTP client version satisfies the package's PSR-18 requirement. Because 4.50.3 is a patch, the upgrade itself needs no application code changes; the only risk is stricter typing on the four affected DTO areas.
Sequencing.
Maintenance. Actively released; expect patches every few weeks, tracking Bot API revisions. Budget a recurring monthly slot for patch upgrades plus a quarterly review of Bot API changelog alignment. Keeping the package current is cheaper than absorbing a large multi-version jump later, especially given the typed-DTO surface that changed here.
Support. Community-supported OSS via GitHub — no vendor SLA. Bus factor is the main concern, partly offset by an active contributor base (this release includes a first-time contributor). Internal ownership must be explicit: someone must be able to read the framework source, not just the docs.
Scaling. Webhook mode scales horizontally behind a load balancer and is the only viable production topology; long-polling is single-consumer and does not scale. The real ceiling is Telegram's rate limits (~30 messages/second globally, roughly 1/second per chat), so the architecture needs a throttling layer, per-chat serialization, and backoff on 429 using retry_after. Webhook handlers must return 200 quickly and defer work to queues, or Telegram will retry and amplify load.
Failure modes.
update_id.file_ids — validate limits client-side.Ramp-up. Moderate: one to two days for a Laravel-fluent PHP developer to ship a working bot, with the real learning curve in conversation state management, entity/rich-text parsing, and Telegram's operational quirks rather than in the package itself. Documentation is adequate; the source is readable. Plan a short internal knowledge transfer so more than one engineer can triage failures.
How can I help you explore Laravel packages today?