| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| README.md | 2021-09-04 | 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:
:::bash
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:
:::bash
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.
- New IDE-friendly settings API!
- Async MySQL/Postgres/redis integration:
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)