Breaking changes:
- Removed the deprecated
$MadelineProto->startAndLoopmethod. Please useMyEventHandler::startAndLoopinstead, remove anynew \danog\MadelineProto\APIline you have in your code if you're only using the event handler. - Removed support for the long-deprecated
snake_casemethods, now onlycamelCaseis supported (get_infowill not work, onlygetInfo; and so on). onStartnow blocks all updates until it finishes executing. Use the amphp async primitives to start long-running processes inonStartlike starting a webserver.
Features:
- Added an
extractMessageIdmethod.
Fixes:
- Fixed
getPwrChat - Properly handle PTS exceptions
- Avoid fiber leaks by completely refactoring the loop API
- Fix garbage collection of API instances. To properly garbage collect API instances, run
EventLoop::run()after unsetting all API instances; or if you just destroyed one instance and others are still running, keep using MadelineProto as usual, the garbage collector callbacks will be invoked by the event loop automatically.
Deprecations:
- The
\danog\Loop\Generic\PeriodicLoopand\danog\Loop\Generic\GenericLoopclasses were deprecated. The alternatives are the new\danog\Loop\PeriodicLoopand\danog\Loop\GenericLoop, with a new and refactored API, see https://github.com/danog/loop for the new API. The old classes are still available, but will be removed in the next major release. - The
asyncandloopmethods were deprecated, and will be removed in the next major release (v9). - All coroutine-related methods (Tools::callFork, etc) were deprecated, and will be removed in the next major release (v9). Use the amphp APIs, instead (ie
\Amp\asyncor\Revolt\EventLoop::queueinstead ofTools::callFork,Amp\Promise\awaitAllinstead ofTools::alletc). - Coroutine support in the event handler will be completely removed in the next major release (v9).