Skip to content

Commit

Permalink
Use COMPOSER_ROOT_VERSION to support circular dependency to root
Browse files Browse the repository at this point in the history
We currently have an indirect cyclic dependency between
socket -> socket-client -> dns -> socket
which causes the test setup to fail otherwise.
  • Loading branch information
clue committed Dec 29, 2016
1 parent a3363d3 commit 8740211
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ php:
sudo: false

install:
- composer install --prefer-source --no-interaction
- COMPOSER_ROOT_VERSION=`git describe --abbrev=0` composer install --no-interaction

script:
- phpunit --coverage-text
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and [`Stream`](https://github.com/reactphp/stream) components.
* [ConnectionInterface](#connectioninterface)
* [getRemoteAddress()](#getremoteaddress)
* [Install](#install)
* [Tests](#tests)
* [License](#license)

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

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

## Tests

To run the test suite, you first need to clone this repo and then install all
dependencies [through Composer](http://getcomposer.org).
Because the test suite contains some circular dependencies, you may have to
manually specify the root package version like this:

```bash
$ COMPOSER_ROOT_VERSION=`git describe --abbrev=0` composer install
```

To run the test suite, you need PHPUnit. Go to the project root and run:

```bash
$ phpunit
```

## License

MIT, see [LICENSE file](LICENSE).

0 comments on commit 8740211

Please sign in to comment.