PHPackages                             php-telegram-bot/workspace - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. php-telegram-bot/workspace

ActiveProject[Testing &amp; Quality](/categories/testing)

php-telegram-bot/workspace
==========================

Workspace for development and tests

31PHP

Since Mar 24Pushed 4y ago3 watchersCompare

[ Source](https://github.com/php-telegram-bot/workspace)[ Packagist](https://packagist.org/packages/php-telegram-bot/workspace)[ RSS](/packages/php-telegram-bot-workspace/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

 Table of Contents1. [About this repository](#about-this-repository)
2. [Getting Started](#getting-started)
    - [Cloning the repository](#cloning-the-repository)
    - [Working on php-telegram-bot](#working-on-php-telegram-bot)
3. [Using Docker](#using-docker)
4. [Using the bot](#using-the-bot)

About this repository
---------------------

[](#about-this-repository)

This repository is a boilerplate for development of the [php-telegram-bot](https://github.com/php-telegram-bot/core).

([back to top](#top))

Getting Started
---------------

[](#getting-started)

### Cloning the repository

[](#cloning-the-repository)

```
git clone --recurse-submodules https://github.com/php-telegram-bot/workspace.git
```

After cloning the workspace, you can use the workspace as if it were a project. We provided a few scripts and a docker-compose.yml that configures a webserver and a local Telegram Bot API server for using and testing webhooks.

### Working on php-telegram-bot

[](#working-on-php-telegram-bot)

To work on the php-telegram-bot repository itself you need to `cd` into the `packages/php-telegram-bot` directory and checkout a branch with

```
git checkout develop
```

To pull all the current changes from upstream you can call from any location

```
git submodule update --remote --merge
```

If you want to commit changes to upstream, you can simply do that as anywhere else.

([back to top](#top))

Using Docker
------------

[](#using-docker)

By default the Docker setup launches preconfigured with the following containers:

1. **nginx** *Webserver*
    - to accept webhook calls from the custom bot api server
2. **php-fpm** *PHP 8.1*
    - runs all the code
3. **mariadb** *Database*
    - already has the structure imported
4. **[tdlight](https://github.com/tdlight-team/tdlight-telegram-bot-api)** *Custom Bot API Server*
    - Lighter version of the custom Telegram bot API server.

To start the container copy the `.env.example` into a `.env` file and fill out your `TELEGRAM_API_ID`and `TELEGRAM_API_HASH` data from .

After this you can start the containers with

```
docker-compose up -d
```

([back to top](#top))

Using the bot
-------------

[](#using-the-bot)

By default there is a /start command.

So if you've also filled out your `TELEGRAM_BOT_USERNAME` and `TELEGRAM_BOT_TOKEN` in your `.env` file, you can execute the `setWebhook.php` inside the php Docker container.

If successful, you should be able to send a `/start` to your bot.

([back to top](#top))

Manually calling the webserver
------------------------------

[](#manually-calling-the-webserver)

If you need to call the webserver directly or have a look at the stats of the Bot API server you can create a `docker-compose.override.yml` file and add the needed port forwarding like in this example:

```
version: '3'
services:
  nginx:
    ports:
      - 8080:80

  api-server:
    environment:
      TELEGRAM_STAT: yes
    ports:
      - 8082:8082
```

The first block inside `services` extends the nginx service and adds a port forwarding from 8080 (on your host) to 80 inside the container. You can then call any php script or static files with `http://localhost:8080`

The second block extends the api-server service, enables the stats with an environment variable and forwards the port 8082 from the container to your host. This allows you to call `http://localhost:8082` to access the stats page of the Telegram Bot API server and check i.e. if the webhook was registered correctly.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity26

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e7ff8761fd0f3c0ecd77e009b9984ac34a247533221fb8c546421f05300f5769?d=identicon)[Tii](/maintainers/Tii)

---

Top Contributors

[![TiiFuchs](https://avatars.githubusercontent.com/u/1958744?v=4)](https://github.com/TiiFuchs "TiiFuchs (12 commits)")

### Embed Badge

![Health badge](/badges/php-telegram-bot-workspace/health.svg)

```
[![Health](https://phpackages.com/badges/php-telegram-bot-workspace/health.svg)](https://phpackages.com/packages/php-telegram-bot-workspace)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
