From ff96248ebda8f7a438f8e27adccd33e391805bef Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Wed, 19 Jun 2019 18:54:31 +0200 Subject: [PATCH] Update async docs --- docs/docs/ASYNC.md | 18 +----------------- docs/docs/INSTALLATION.md | 5 ++++- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/docs/docs/ASYNC.md b/docs/docs/ASYNC.md index dfa70c03..3cb40724 100644 --- a/docs/docs/ASYNC.md +++ b/docs/docs/ASYNC.md @@ -9,7 +9,6 @@ MadelineProto now features async, for **incredible speed improvements**, and par Powered by [amphp](https://amphp.org), MadelineProto wraps the AMPHP APIs to provide a simpler generator-based async API. * [Usage](#usage) - * [Loading the latest version of MadelineProto](#loading-the-latest-version-of-madelineproto) * [Enabling the MadelineProto async API](#enabling-the-madelineproto-async-api) * [Using the MadelineProto async API](#using-the-madelineproto-async-api) * [Async in event handler](#async-in-event-handler) @@ -62,21 +61,6 @@ This means that you can handle multiple updates, download/upload multiple files If your code still relies on the old synchronous behaviour, don't worry, there is backward compatibility. However, I highly recommend you switch to async, due to the huge performance and parallelism benefits. -## Loading the latest version of MadelineProto - -In order to use the `yield` operator in MadelineProto, you have to load the **latest version** of MadelineProto from the **master** branch (alpha) by loading it through composer (`dev-master`) or with madeline.php: -```php -Next section \ No newline at end of file +Next section diff --git a/docs/docs/INSTALLATION.md b/docs/docs/INSTALLATION.md index f05b2357..bc984a0c 100644 --- a/docs/docs/INSTALLATION.md +++ b/docs/docs/INSTALLATION.md @@ -25,6 +25,9 @@ require_once 'madeline.php'; This code will automatically download, auto-update and include MadelineProto. +If you want, you can set a `MADELINE_BRANCH` constant that defines which branch of MadelineProto madeline.php should load. +When the constant is not set, the latest stable release is loaded; if the value is an empty string, the `master` branch is loaded; otherwise, the selected branch name is loaded. + ## Simple (manual) @@ -105,4 +108,4 @@ Then you can require the package by addding the following lines to the require s "amphp/dns": "dev-master#aa1892bd as 0.9" ``` -Next section \ No newline at end of file +Next section