Skip to content

Commit

Permalink
Prepare v2.6.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Jun 11, 2018
1 parent 8345e87 commit 5e60e55
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------
Expand Down Expand Up @@ -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
-------

Expand Down

0 comments on commit 5e60e55

Please sign in to comment.