PHPackages                             madmagestelegram/types - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. madmagestelegram/types

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

madmagestelegram/types
======================

Representation of telegram bot types in php classes

1.9.0(1y ago)210.8k↓56%11MITPHPPHP &gt;=8.1CI failing

Since Jul 28Pushed 1y agoCompare

[ Source](https://github.com/madmagestelegram/Types)[ Packagist](https://packagist.org/packages/madmagestelegram/types)[ RSS](/packages/madmagestelegram-types/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (2)Versions (27)Used By (1)

Telegram Types
==============

[](#telegram-types)

Representaion of [telegram bot types](https://core.telegram.org/bots/api#available-types) in php classes. Generated by [madmagestelegram/TypesGenerator](https://github.com/madmagestelegram/TypesGenerator).

Install
=======

[](#install)

`composer require madmagestelegram/types`

Usage
=====

[](#usage)

Simplest usage is getting and setting data

```
$message = new Message();
$message->setText('Hello world!');

echo $message->getText(); // "Hello world!"
// as assoc array
print_r($message->_getData());// ['text' => 'Hello world!']
```

more fields

```
$message = ( new Message() )
        ->setMessageId(1)
        ->setDate(time())
        ->setChat(( new Chat() )->setId(1)->setType('channel'))
        ->setText('Hello world!')
        ->setAudio(
            ( new Audio() )
                ->setFileId("1")
                ->setDuration(60)
                ->setTitle('Some title')
                ->setThumb(( new PhotoSize() )
                    ->setFileId("1")
                    ->setHeight(100)
                    ->setWidth(100)
                )
        )->setLocation(
            ( new Location() )
                ->setLatitude(60.60)
                ->setLongitude(60.60)
        );

    print_r($message->_getData());

/*

Array
(
    [message_id] => 1
    [date] => 1570945477
    [chat] => Array
        (
            [id] => 1
            [type] => channel
        )

    [text] => Hello world!
    [audio] => Array
        (
            [file_id] => 1
            [duration] => 60
            [title] => Some title
            [thumb] => Array
                (
                    [file_id] => 1
                    [width] => 100
                    [height] => 100
                )

        )

    [location] => Array
        (
            [longitude] => 60.6
            [latitude] => 60.6
        )

)
*/
```

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance40

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

Top contributor holds 96.3% 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.

###  Release Activity

Cadence

Every ~81 days

Recently: every ~107 days

Total

26

Last Release

501d ago

Major Versions

0.5.2 → 1.0.02022-01-06

PHP version history (3 changes)0.0.1PHP ^7.2

0.5.0PHP &gt;=7.4

1.2.0PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5528679?v=4)[Aleksandr Kalin](/maintainers/madmages)[@madmages](https://github.com/madmages)

---

Top Contributors

[![maddmages-l2lnch](https://avatars.githubusercontent.com/u/257162407?v=4)](https://github.com/maddmages-l2lnch "maddmages-l2lnch (26 commits)")[![anatolinicolae](https://avatars.githubusercontent.com/u/1231135?v=4)](https://github.com/anatolinicolae "anatolinicolae (1 commits)")

---

Tags

phptelegramtypesphprpctelegramtypes

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/madmagestelegram-types/health.svg)

```
[![Health](https://phpackages.com/badges/madmagestelegram-types/health.svg)](https://phpackages.com/packages/madmagestelegram-types)
```

###  Alternatives

[dagger/dagger

Dagger PHP SDK

261.1k](/packages/dagger-dagger)

PHPackages © 2026

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