Skip to content

Commit 8740211

Browse files
committed
Use COMPOSER_ROOT_VERSION to support circular dependency to root
We currently have an indirect cyclic dependency between socket -> socket-client -> dns -> socket which causes the test setup to fail otherwise.
1 parent a3363d3 commit 8740211

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ php:
1111
sudo: false
1212

1313
install:
14-
- composer install --prefer-source --no-interaction
14+
- COMPOSER_ROOT_VERSION=`git describe --abbrev=0` composer install --no-interaction
1515

1616
script:
1717
- phpunit --coverage-text

README.md

+18
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and [`Stream`](https://github.com/reactphp/stream) components.
1616
* [ConnectionInterface](#connectioninterface)
1717
* [getRemoteAddress()](#getremoteaddress)
1818
* [Install](#install)
19+
* [Tests](#tests)
1920
* [License](#license)
2021

2122
## Quickstart example
@@ -144,6 +145,23 @@ $ composer require react/socket:^0.4.4
144145

145146
More details about version upgrades can be found in the [CHANGELOG](CHANGELOG.md).
146147

148+
## Tests
149+
150+
To run the test suite, you first need to clone this repo and then install all
151+
dependencies [through Composer](http://getcomposer.org).
152+
Because the test suite contains some circular dependencies, you may have to
153+
manually specify the root package version like this:
154+
155+
```bash
156+
$ COMPOSER_ROOT_VERSION=`git describe --abbrev=0` composer install
157+
```
158+
159+
To run the test suite, you need PHPUnit. Go to the project root and run:
160+
161+
```bash
162+
$ phpunit
163+
```
164+
147165
## License
148166

149167
MIT, see [LICENSE file](LICENSE).

0 commit comments

Comments
 (0)