Download Latest Version Layer 220 and phpseclib fixes source code.tar.gz (977.9 kB)
Email in envelope

Get an email when there's a new version of MadelineProto

Home / 6.0.144
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2021-12-07 3.5 kB
Totals: 1 Item   3.5 kB 0

MadelineProto was updated!

MadelineProto 6 introduces ultra-fast startup with a built-in IPC server, PHP transpilation using phabel.io, MySQL/Postgres/redis database support to reduce RAM usage, and new, IDE-friendly settings.

The main event:
- MadelineProto is now transpiled using phabel.io!

Phabel.io is a PHP transpiler that allows native usage of PHP 8+ features in projects and libraries, while allowing maintainers to publish a version targeting lower versions of php.
Async await syntax is also supported!

Usage:

:::php
composer require --dev phabel/phabel

You can now publish your packagist package, and it will be automatically transpiled to any PHP version supported by phabel.

After git tagging a new release, just run:

:::php
vendor/bin/phabel publish

๐Ÿ’ก Your PHP 7 users can now install your PHP 8 library ๐Ÿ’ก
๐Ÿ’ก All your dependencies will also be transpiled to the correct PHP version. ๐Ÿ’ก

Supported PHP versions:

Syntax/feature support:
- โœ… 8.0+
- async/await syntax

Target:
- โœ… 7.1+
- ๐Ÿ˜ 5.6, 7.0 in final testing stage.
- ๐Ÿ’ก 5.4, 5.5 support coming soon!

  • Now MadelineProto has a built-in IPC server, this means:

Very fast startup for small scripts: ~0.02 seconds, before was 1-5 seconds

To use this IPC server, just use MadelineProto normally:

:::php
$API = new \danog\MadelineProto\API('session.madeline');  
$API->start();  
$API->messages->sendMessage(['peer' => $_POST['peer'], 'message' => $_POST['message']]);

This is useful for small sendMessage.php scripts, to be called from outside; for maximum performance in bots use an async event handler.

Use a database to reduce memory usage to 1-5 MB even for thousands of groups!
See here for examples and documentation.
Native database integration in the event handler is also now supported!

Other brand-new features in MadelineProto 6:
- New PHP API documentation - Updated Telegram API to layer 131 - Updated tg-file-decoder library
- New localization keys for all UI elements
- New settings for custom HTML, Javascript and CSS in login page templates
- New PSR logger API - New session conversion API

Coming up soon: **** **IP implementation ;)

Internal improvements:
- Many, many bugfixes, stability fixes and performance improvements
- RPC requests are containerized by default, when possible
- Complete refactoring of MTProto message subsystem
- Added a periodic garbage collector
- Implemented native PHP prime factorization (C++ factorization is still recommended using https://prime.madelineproto.xyz)

Source: README.md, updated 2021-12-07