Release Notes
Versioning Scheme
LaraGram and its other first-party packages follow Semantic Versioning. Major framework releases are released every year (~Q1), while minor and patch releases may be released as often as every week. Minor and patch releases should never contain breaking changes.
When referencing the LaraGram framework or its components from your application or package, you should always use a version constraint such as ^4.0, since major releases of LaraGram do include breaking changes. However, we strive to always ensure you may update to a new major release in one day or less.
Named Arguments
Named arguments are not covered by LaraGram's backwards compatibility guidelines. We may choose to rename function arguments when necessary in order to improve the LaraGram codebase. Therefore, using named arguments when calling LaraGram methods should be done cautiously and with the understanding that the parameter names may change in the future.
Support Policy
For all LaraGram releases, bug fixes are provided for 18 months and security fixes are provided for 2 years. For all additional libraries, only the latest major release receives bug fixes. In addition, please review the database versions supported by LaraGram.
| Version | PHP (*) | Release | Bug Fixes Until | Security Fixes Until | Status |
|---|---|---|---|---|---|
| 3 | 8.2 - 8.5 | July 17th, 2025 | February 1th, 2027 | July 1th, 2027 | Stable |
| 4 | 8.5 | July 16th, 2026 | February 1th, 2028 | July 1th, 2028 | Stable |
| 5 | 8.5 | Q2 2027 | Q4 2028 | Q2 2028 | Upcoming |
(*) Supported PHP versions
LaraGram 4
LaraGram 4 is the largest release in the framework's history. Where LaraGram 3 focused on being an excellent Bot API framework, LaraGram 4 grows into a full-stack framework: it keeps everything you already use to build Telegram bots and adds a complete web layer, first-class Telegram Mini App support through Luna, and native MTProto user-client capabilities — all while preserving a familiar, LaraGram-flavored developer experience.
Despite the scope of the new features, LaraGram 4 introduces minimal breaking changes. The vast majority of the release is additive, so most applications can upgrade with little more than a dependency bump. See the upgrade guide for the full details.
PHP 8.3
LaraGram 4 requires a minimum PHP version of 8.3 (previously 8.2). The supported range for this release is PHP 8.3 through 8.5.
MTProto & User Clients
The headline feature of LaraGram 4 is native MTProto support. MTProto is Telegram's own transport and cryptographic protocol; connecting through it (rather than the Bot API) means your application is a Telegram client, with the same capabilities a phone or desktop app has.
This unlocks an entirely new class of applications:
- Full account access — log in with a phone number and act as a user (a "userbot"), not just a bot.
- No Bot API limits — download files larger than 20 MB, read full chat history, list every dialog, and call methods the Bot API doesn't offer.
- Rich update stream — receive typing indicators, read receipts, user status, reactions, stories, and hundreds of other update types.
- Multiple accounts in one process — run a fleet of user and bot sessions side by side.
Both user clients (phone + 2FA / QR login) and bot clients (bot token over MTProto) are driven through the same high-level API, so the listeners and requests you write are identical either way. The MTProto documentation is split across Getting Started, Authentication, Listening, Requests, Chats, Media, Features, and Configuration.
Luna: Full-Stack Frontends & Telegram Mini Apps
Luna is the official adapter that lets you build modern, single-page style frontends for your LaraGram application using React, Vue, or Svelte — without building an API, without client-side routing configuration, and without losing the server-side conveniences you already know (routing, controllers, middleware, validation, and authorization). You write your routes and controllers exactly as before; instead of returning a Blade view or JSON, a controller returns a Luna response naming a JavaScript page component and the props it should receive.
Luna also makes Telegram Mini Apps (TMA) a first-class citizen. A Mini App is a Luna SPA that additionally speaks the Telegram WebApp protocol: it validates signed init data, shares the Telegram identity with the frontend, adopts Telegram's theme, and drives native UI such as the back button and MainButton. The full device-feature surface — CloudStorage, biometrics, location, sensors, popups, sharing, and invoices — is available as well.
Luna is documented across Luna, Pages, Routing, Forms, Frontend, Telegram Mini Apps, and Telegram Features.
A Complete Web Layer
To support Luna and Mini Apps, LaraGram 4 ships a full HTTP and frontend stack. Much of this will feel immediately familiar to LaraGram (and Laravel) developers:
- Routing and URL generation for defining and building web endpoints.
- HTTP requests and responses, plus an expressive HTTP client built on Guzzle for outgoing requests.
- Blade templates and views for server-rendered HTML.
- Asset bundling with Vite via an official plugin and Blade directive.
- HTTP sessions with database, Redis, Memcached, and other backends.
- A Frontend guide tying the PHP and JavaScript approaches together, and starter kits to scaffold authenticated applications quickly.
Conversations
Many bots need to ask a user a series of questions — a registration flow, a support ticket, an order form — and remember every answer. The new Conversation component gives you a clean, declarative way to build these multi-step question-and-answer flows. You declare the questions; LaraGram sends them one by one, validates each reply, collects the answers, and hands them back when the flow completes. State is persisted automatically between updates, so a conversation survives across the many separate requests a webhook bot receives.
Broadcasting
Sending an announcement to every user of a bot used to mean a hand-written loop, a queue, and careful error handling. Broadcasting turns it into one line: Broadcast::users()->sendMessage('Hello!')->queue(). Any Bot API call or template can be delivered to all users, all groups, all channels, or your own audiences. LaraGram records the chats your bot can reach, splits the work into queued jobs, paces it with anti-flood, skips chats that blocked the bot, and tracks progress. Broadcasts can be filtered by language, activity, tags and group membership, render Temple8 templates per recipient in their own language, be scheduled or limited to delivery hours, and be edited or recalled after they are sent. The same component broadcasts events to Mini Apps and web pages over WebSockets through Redis.
A Typed Bot API Client
The Bot API client is generated from the Bot API itself, and now documents what each call gives back as well as what it takes, so an editor completes both sides of a request. A response reads as the array Telegram sent, as the object the method returns ($request->getMe()->first_name) or through its own helpers (isOk(), description(), toArray()). Failures are no longer strings to be parsed: $request->throw() raises the exception that matches the failure — a blocked bot, a migrated group, a flood wait with its retryAfter() — and every Bot API type has a class with one init parameter per field for building payloads, and from() for reading them back as objects.
Rich Messages
Telegram's rich messages carry a small HTML document instead of a line of text. Rich messages bring them into Temple8: @rich turns simplified markup into a sendRichMessage call, short tags replace Telegram's verbose ones, @richPhoto and friends register local files and file_ids in the message's media array, and @richTable, @richList and @richChecklist build markup from PHP arrays. Loops, conditions, includes, components and layouts all work inside a block, the markup is validated against Telegram's tags and limits before it is sent, and the same payload can be built from PHP with the RichMessage class.
API Resources, Pagination & Precognition
LaraGram 4 rounds out the data and validation layer with several additions ported from the wider ecosystem:
- Eloquent API Resources provide an expressive transformation layer between your models and JSON responses.
- Pagination integrates with the query builder and Eloquent, with Tailwind and Bootstrap views out of the box.
- Precognition lets you anticipate the outcome of a future HTTP request — most notably to provide live, frontend validation without duplicating your backend rules. Precognition support is built directly into Luna Forms.