Skip to content

Commit 9d9d293

Browse files
committed
changed dependencies
1 parent f09381e commit 9d9d293

File tree

7 files changed

+31
-33
lines changed

7 files changed

+31
-33
lines changed

.travis.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ services:
44
- docker
55
env:
66
matrix:
7-
- HHVM_VERSION=4.20.0
8-
- HHVM_VERSION=4.21.0
9-
- HHVM_VERSION=4.22.0
10-
- HHVM_VERSION=4.23.0
11-
- HHVM_VERSION=4.24.0
12-
- HHVM_VERSION=4.25.0
13-
- HHVM_VERSION=4.26.0
7+
- HHVM_VERSION=4.25.1
8+
- HHVM_VERSION=4.26.1
9+
- HHVM_VERSION=4.27.1
10+
- HHVM_VERSION=4.28.2
11+
- HHVM_VERSION=4.29.0
12+
- HHVM_VERSION=4.30.0
13+
- HHVM_VERSION=4.31.0
1414
- HHVM_VERSION=latest
1515
install:
1616
- docker pull hhvm/hhvm:$HHVM_VERSION

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@
1818
}
1919
],
2020
"require": {
21-
"hhvm": "^4.20",
22-
"hhvm/hsl": "^4.15",
23-
"hhvm/hsl-experimental": "^4.15",
24-
"hhvm/hhvm-autoload": "^2.0.0",
21+
"hhvm": "^4.25",
22+
"hhvm/hsl": "^4.0",
23+
"hhvm/hsl-experimental": "^4.25",
24+
"hhvm/hhvm-autoload": "^2.0.10",
2525
"facebook/hack-http-request-response-interfaces": "^0.2",
2626
"nazg/http-server-request-handler": "^0.3.0"
2727
},
2828
"require-dev": {
29-
"hhvm/hacktest": "^1.6",
30-
"facebook/fbexpect": "^2.5.2",
31-
"hhvm/hhast": "^4.0",
32-
"ytake/hungrr": "^0.5"
29+
"hhvm/hacktest": "^2.0.0",
30+
"facebook/fbexpect": "^2.7.3",
31+
"hhvm/hhast": "^4.0.0",
32+
"ytake/hungrr": "^0.6"
3333
},
3434
"autoload": {
3535
"psr-4": {

tests/AsyncRequestHandleExecutorTest.hack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class AsyncRequestHandleExecutorTest extends HackTest {
1313
public async function testShouldReturnNullStackEmitter(): Awaitable<void> {
1414
$stack = new EmitterStack();
1515
$stack->push(new OverrideSapiEmitter());
16-
list($readHandle, $writeHandle) = IO\pipe_non_disposable();
16+
list($readHandle, $writeHandle) = IO\pipe_nd();
1717
$executor = new AsyncRequestHandleExecutor(
1818
$readHandle,
1919
$writeHandle,

tests/EmitterStackTest.hack

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ final class EmitterStackTest extends HackTest {
2020
public function testShouldEmitTrue(): void {
2121
$sapiEmmiter = new SapiEmitter();
2222
$this->stack?->push($sapiEmmiter);
23-
list($readHandle, $writeHandle) = IO\pipe_non_disposable();
23+
list($readHandle, $writeHandle) = IO\pipe_nd();
2424
ob_start();
2525
$result = $this->stack?->emit(
2626
$readHandle,
@@ -33,10 +33,10 @@ final class EmitterStackTest extends HackTest {
3333
public function testShouldReturnMessageBody(): void {
3434
$sapiEmmiter = new SapiEmitter();
3535
$this->stack?->push($sapiEmmiter);
36-
list($readHandle, $writeHandle) = IO\pipe_non_disposable();
36+
list($readHandle, $writeHandle) = IO\pipe_nd();
3737
$writeHandle->rawWriteBlocking('content');
3838
ob_start();
39-
$result = $this->stack?->emit(
39+
$_ = $this->stack?->emit(
4040
$readHandle,
4141
new Response($writeHandle, StatusCode::OK)
4242
);
@@ -48,24 +48,24 @@ final class EmitterStackTest extends HackTest {
4848
public function testEmitsResponseHeaders(): void {
4949
$sapiEmmiter = new OverrideSapiEmitter();
5050
$this->stack?->push($sapiEmmiter);
51-
list($readHandle, $writeHandle) = IO\pipe_non_disposable();
51+
list($readHandle, $writeHandle) = IO\pipe_nd();
5252
$writeHandle->rawWriteBlocking('content');
5353
$response = new TextResponse($writeHandle, StatusCode::OK);
5454
ob_start();
55-
$result = $this->stack?->emit(
55+
$_ = $this->stack?->emit(
5656
$readHandle,
5757
$response
5858
);
5959
$out = ob_get_contents();
6060
ob_end_clean();
6161
expect($out)->toBeSame('content');
6262
list($header, $_, $_) = $sapiEmmiter->getPutHeaders()[0];
63-
expect($header)->toContain('Content-Type: text/plain');
63+
expect($header)->toContainSubstring('Content-Type: text/plain');
6464
}
6565

6666
public function testMultipleSetCookieHeadersAreNotReplaced(): void {
6767
$sapiEmmiter = new OverrideSapiEmitter();
68-
list($readHandle, $writeHandle) = IO\pipe_non_disposable();
68+
list($readHandle, $writeHandle) = IO\pipe_nd();
6969
$sapiEmmiter->emit($readHandle, (new Response($writeHandle))
7070
->withStatus(200)
7171
->withAddedHeader('Set-Cookie', vec['foo=bar', 'bar=baz']));
@@ -78,16 +78,12 @@ final class EmitterStackTest extends HackTest {
7878

7979
public function testDoesNotLetResponseCodeBeOverriddenByHack(): void {
8080
$sapiEmmiter = new OverrideSapiEmitter();
81-
list($readHandle, $writeHandle) = IO\pipe_non_disposable();
81+
list($readHandle, $writeHandle) = IO\pipe_nd();
8282
$response = (new Response($writeHandle))
8383
->withStatus(StatusCode::ACCEPTED)
8484
->withAddedHeader('Location', vec['http://api.my-service.com/12345678'])
8585
->withAddedHeader('Content-Type', vec['text/plain']);
8686
$sapiEmmiter->emit($readHandle, $response);
87-
$expectedStack = vec[
88-
tuple('Location: http://api.my-service.com/12345678', true, 202),
89-
tuple('Content-Type: text/plain', true, 202),
90-
];
9187
expect($sapiEmmiter->getPutHeaders())
9288
->toBeSame(vec[
9389
tuple('Location: http://api.my-service.com/12345678', true, 202),
@@ -103,7 +99,7 @@ final class EmitterStackTest extends HackTest {
10399
$sapiEmmiter = new SapiEmitter();
104100
$this->stack?->push($sapiEmmiter);
105101
$this->stack?->push($sapiEmmiter);
106-
list($readHandle, $writeHandle) = IO\pipe_non_disposable();
102+
list($readHandle, $writeHandle) = IO\pipe_nd();
107103
await $writeHandle->writeAsync('content');
108104
await $writeHandle->closeAsync();
109105
ob_start();

tests/MockAsyncRequestHandler.hack

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ final class MockAsyncRequestHandler implements AsyncRequestHandlerInterface {
1414
ServerRequestInterface $_request
1515
): Awaitable<ResponseInterface> {
1616
await $handle->writeAsync(json_encode(dict[]));
17-
await $handle->closeAsync();
17+
if($handle is IO\NonDisposableHandle) {
18+
await $handle->closeAsync();
19+
}
1820
return new Response($handle, StatusCode::OK);
1921
}
2022
}

tests/RequestHandleExecutorTest.hack

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ final class RequestHandleExecutorTest extends HackTest {
1313
public function testShouldReturnNullStackEmitter(): void {
1414
$stack = new EmitterStack();
1515
$stack->push(new OverrideSapiEmitter());
16-
list($readHandle, $writeHandle) = IO\pipe_non_disposable();
16+
list($readHandle, $writeHandle) = IO\pipe_nd();
1717
$executor = new RequestHandleExecutor(
1818
$readHandle,
1919
$writeHandle,
@@ -28,7 +28,7 @@ final class RequestHandleExecutorTest extends HackTest {
2828
}
2929

3030
public function testShouldReturnNullSapiEmitter(): void {
31-
list($readHandle, $writeHandle) = IO\pipe_non_disposable();
31+
list($readHandle, $writeHandle) = IO\pipe_nd();
3232
$executor = new RequestHandleExecutor(
3333
$readHandle,
3434
$writeHandle,

tests/SapiEmitterTest.hack

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ final class SapiEmitterTest extends HackTest {
1111

1212
public async function testShouldAsync(): Awaitable<void> {
1313
$sapi = new SapiEmitter();
14-
list($readHandle, $writeHandle) = IO\pipe_non_disposable();
14+
list($readHandle, $writeHandle) = IO\pipe_nd();
1515
await $writeHandle->writeAsync('async content');
1616
await $writeHandle->closeAsync();
1717
ob_start();

0 commit comments

Comments
 (0)