Skip to content

Commit 3c72e43

Browse files
committed
Rename development branch to 3.x and add installation instructions
1 parent ec444aa commit 3c72e43

File tree

1 file changed

+41
-9
lines changed

1 file changed

+41
-9
lines changed

README.md

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ A lightweight implementation of
66

77
[![CI status](https://github.com/reactphp/promise/workflows/CI/badge.svg)](https://github.com/reactphp/promise/actions)
88

9-
> The master branch contains the code for the upcoming 3.0 release.
10-
> For the code of the current stable 2.x release, checkout the
11-
> [2.x branch](https://github.com/reactphp/promise/tree/2.x).
12-
13-
> The upcoming 3.0 release will be the way forward for this package.
14-
> However we will still actively support 2.0 and 1.0 for those not yet
15-
> on PHP 7+.
9+
> **Development version:** This branch contains the code for the upcoming 3.0 release.
10+
> For the code of the current stable 2.x release, check out the
11+
> [`2.x` branch](https://github.com/reactphp/promise/tree/2.x).
12+
>
13+
> The upcoming 3.0 release will be the way forward for this package.
14+
> However, we will still actively support 2.0 and 1.0 for those not yet
15+
> on PHP 7.1+.
1616
1717
Table of Contents
1818
-----------------
@@ -52,8 +52,9 @@ Table of Contents
5252
* [Rejection forwarding](#rejection-forwarding)
5353
* [Mixed resolution and rejection forwarding](#mixed-resolution-and-rejection-forwarding)
5454
* [done() vs. then()](#done-vs-then)
55-
5. [Credits](#credits)
56-
6. [License](#license)
55+
5. [Install](#install)
56+
6. [Credits](#credits)
57+
7. [License](#license)
5758

5859
Introduction
5960
------------
@@ -699,6 +700,37 @@ getJsonResult()
699700
);
700701
```
701702

703+
Install
704+
-------
705+
706+
The recommended way to install this library is [through Composer](https://getcomposer.org/).
707+
[New to Composer?](https://getcomposer.org/doc/00-intro.md)
708+
709+
Once released, this project will follow [SemVer](https://semver.org/).
710+
At the moment, this will install the latest development version:
711+
712+
```bash
713+
$ composer require react/promise:^3@dev
714+
```
715+
716+
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
717+
718+
This project aims to run on any platform and thus does not require any PHP
719+
extensions and supports running on PHP 7.1 through current PHP 8+.
720+
It's *highly recommended to use the latest supported PHP version* for this project.
721+
722+
We're committed to providing long-term support (LTS) options and to provide a
723+
smooth upgrade path. If you're using an older PHP version, you may use the
724+
[`2.x` branch](https://github.com/reactphp/promise/tree/2.x) (PHP 5.4+) or
725+
[`1.x` branch](https://github.com/reactphp/promise/tree/1.x) (PHP 5.3+) which both
726+
provide a compatible API but do not take advantage of newer language features.
727+
You may target multiple versions at the same time to support a wider range of
728+
PHP versions like this:
729+
730+
```bash
731+
$ composer require "react/promise:^3@dev || ^2 || ^1"
732+
```
733+
702734
Credits
703735
-------
704736

0 commit comments

Comments
 (0)