PHPackages                             gruven/phpbotgram - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. gruven/phpbotgram

ActiveLibrary[Framework](/categories/framework)

gruven/phpbotgram
=================

Modern PHP 8.5 port of the aiogram Telegram Bot framework. Fiber-based runtime, codegen-driven typed methods/types, FSM with scenes, webhook + long-polling.

v0.2.0(1mo ago)010↓50%MITPHP ^8.5

Since Jun 21Compare

[ Source](https://github.com/Gruven/phpbotgram)[ Packagist](https://packagist.org/packages/gruven/phpbotgram)[ Docs](https://github.com/Gruven/phpbotgram)[ RSS](/packages/gruven-phpbotgram/feed)WikiDiscussions Synced 2w ago

READMEChangelog (2)Dependencies (16)Versions (3)Used By (0)

phpbotgram
==========

[](#phpbotgram)

[![PHP version](https://camo.githubusercontent.com/76d3d78f7c35d79d0377ff85e379ba391141e462dda443cee47c3bb4fffec258/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e352d3737376262342e7376673f6c6f676f3d706870)](https://www.php.net/releases/8.5/) [![PHPStan level](https://camo.githubusercontent.com/af2ad7105ce2cd0081a161391776b8845d1b2bb5903748e401aba746ccc00d2a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230392d3235363365622e737667)](https://phpstan.org/) [![Tests](https://camo.githubusercontent.com/9d8499319c4494cd29c179ecb886184694d3e6b54eecaf215f3fc0ccc77232a1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d3231393025323070617373696e672d3366623935302e737667)](#testing) [![Coverage gate](https://camo.githubusercontent.com/4be7f62b53919f863fe028e7fd886202ac6714e6dce075fbb7adbc536fbfe68a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d2d676174652d70617373696e672d3366623935302e737667)](#testing) [![License](https://camo.githubusercontent.com/07a7d0169027aac6d7a0bfa8964dfef5fbc40d5a2075cabb3d8bc67e17be3451/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE) [![Upstream](https://camo.githubusercontent.com/b55b7531c516ed43587ba4b01a300d260baea89821f61af1d8f91b13d7910c60/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f61696f6772616d2d332e32392e302d626c756576696f6c65742e7376673f6c6f676f3d707974686f6e)](https://github.com/aiogram/aiogram) [![Bot API](https://camo.githubusercontent.com/705d4a0e805117fb08eaea71c6f89dfed4730022e42ce408d51e415c60048b91/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f426f742532304150492d31302e312d3236613565342e7376673f6c6f676f3d74656c656772616d)](https://core.telegram.org/bots/api)

A modern PHP 8.5 port of the [aiogram](https://github.com/aiogram/aiogram) Telegram Bot framework.

`phpbotgram` keeps the layered architecture of the Python upstream — `Bot`, `Session`, `Dispatcher`, `Router`, filters, middlewares, FSM — but trades coroutines for [amphp](https://amphp.org/) v3 fibers and uses native PHP 8.5 features (readonly classes, asymmetric visibility, property hooks, attributes, native enums) throughout.

Links
-----

[](#links)

- **API documentation** — published at  (GitHub Pages, rebuilt on every push to `master`). Regenerate locally with `composer docs-api` (or `make docs-api`); output lands in `build/docs/api/index.html`.
- **Narrative documentation:**  (tutorial, cookbook, concepts).
- **Design spec** — [`docs/superpowers/specs/`](docs/superpowers/specs/).
- **Implementation plan** — [`docs/superpowers/plans/2026-05-12-phpbotgram-implementation.md`](docs/superpowers/plans/2026-05-12-phpbotgram-implementation.md).
- **Changelog** — [`CHANGELOG.md`](CHANGELOG.md).
- **Deployment templates** — [`deploy/`](deploy/) (nginx, systemd, Docker compose).
- **Runnable examples** — [`examples/`](examples/) (see table below).

Requirements
------------

[](#requirements)

- PHP 8.5+
- ext-sodium (Web App / Login Widget signature verification)
- HTTP transport — `amphp/http-client ^5` (required), used by the default `AmphpSession` adapter
- Composer 2.5+

Install
-------

[](#install)

```
composer require gruven/phpbotgram
```

Quickstart — echo bot
---------------------

[](#quickstart--echo-bot)

```
