From 5e60e5596a5422287f9d2205f405bef2ae0cef4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Mon, 11 Jun 2018 13:05:43 +0200 Subject: [PATCH] Prepare v2.6.0 release --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ README.md | 24 ++++++++++++++++++++++-- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 484e542d..13f2a500 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,33 @@ CHANGELOG for 2.x ================= +* 2.6.0 (2018-06-11) + + * Feature: Significantly improve memory consumption and performance by only passing resolver args + to resolver and canceller if callback requires them. Also use static callbacks without + binding to promise, clean up canceller function reference when they are no longer + needed and hide resolver and canceller references from call stack on PHP 7+. + (#113, #115, #116, #117, #118, #119 and #123 by @clue) + + These changes combined mean that rejecting promises with an `Exception` should + no longer cause any internal circular references which could cause some unexpected + memory growth in previous versions. By explicitly avoiding and explicitly + cleaning up said references, we can avoid relying on PHP's circular garbage collector + to kick in which significantly improves performance when rejecting many promises. + + * Mark legacy progress support / notification API as deprecated + (#112 by @clue) + + * Recommend rejecting promises by throwing an exception + (#114 by @jsor) + + * Improve documentation to properly instantiate LazyPromise + (#121 by @holtkamp) + + * Follower cancellation propagation was originally planned for this release + but has been reverted for now and is planned for a future release. + (#99 by @jsor and #122 by @clue) + * 2.5.1 (2017-03-25) * Fix circular references when resolving with a promise which follows diff --git a/README.md b/README.md index 9480fae3..6a0c5d1a 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,9 @@ Table of Contents * [Mixed resolution and rejection forwarding](#mixed-resolution-and-rejection-forwarding) * [Progress event forwarding](#progress-event-forwarding) * [done() vs. then()](#done-vs-then) -5. [Credits](#credits) -6. [License](#license) +5. [Install](#install) +6. [Credits](#credits) +7. [License](#license) Introduction ------------ @@ -833,6 +834,25 @@ wrapped in an exception of the type `React\Promise\UnhandledRejectionException`. You can get the original rejection reason by calling `$exception->getReason()`. +Install +------- + +The recommended way to install this library is [through Composer](https://getcomposer.org). +[New to Composer?](https://getcomposer.org/doc/00-intro.md) + +This will install the latest supported version: + +```bash +$ composer require react/promise:^2.6 +``` + +See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades. + +This project aims to run on any platform and thus does not require any PHP +extensions and supports running on legacy PHP 5.4 through current PHP 7+ and HHVM. +It's *highly recommended to use PHP 7+* for this project due to its vast +performance improvements. + Credits -------