Skip to content

Commit 2a4a7c9

Browse files
committed
2015-04-01: Let's support PHP 5.3, again..
1 parent 6542395 commit 2a4a7c9

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: php
22

33
php:
4+
- 5.3
45
- 5.4
56
- 5.5
67
- 5.6

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
"keywords": ["stream", "pipe"],
55
"license": "MIT",
66
"require": {
7-
"php": ">=5.4.0",
8-
"evenement/evenement": "^2.0"
7+
"php": ">=5.3.8",
8+
"evenement/evenement": "^2.0|^1.0"
99
},
1010
"require-dev": {
11-
"react/event-loop": "^0.4",
12-
"react/promise": "^2.0"
11+
"react/event-loop": "^0.4|^0.3",
12+
"react/promise": "^2.0|^1.0"
1313
},
1414
"suggest": {
1515
"react/event-loop": "^0.4",

src/Buffer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function close()
7272
$this->listening = false;
7373
$this->data = '';
7474

75-
$this->emit('close', [$this]);
75+
$this->emit('close', array($this));
7676
}
7777

7878
public function handleWrite()
@@ -112,7 +112,7 @@ public function handleWrite()
112112

113113
$len = strlen($this->data);
114114
if ($len >= $this->softLimit && $len - $sent < $this->softLimit) {
115-
$this->emit('drain', [$this]);
115+
$this->emit('drain', array($this));
116116
}
117117

118118
$this->data = (string) substr($this->data, $sent);
@@ -121,7 +121,7 @@ public function handleWrite()
121121
$this->loop->removeWriteStream($this->stream);
122122
$this->listening = false;
123123

124-
$this->emit('full-drain', [$this]);
124+
$this->emit('full-drain', array($this));
125125
}
126126
}
127127

tests/StreamIntegrationTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ class StreamIntegrationTest extends TestCase
99
{
1010
public function loopProvider()
1111
{
12-
return [
13-
[function() { return true; }, function() { return new rel\StreamSelectLoop; }],
14-
[function() { return function_exists('event_base_new'); }, function() { return new rel\LibEventLoop; }],
15-
[function() { return class_exists('libev\EventLoop'); }, function() { return new rel\LibEvLoop; }],
16-
[function() { return class_exists('EventBase'); }, function() { return new rel\ExtEventLoop; }]
17-
];
12+
return array(
13+
array(function() { return true; }, function() { return new rel\StreamSelectLoop; }),
14+
array(function() { return function_exists('event_base_new'); }, function() { return new rel\LibEventLoop; }),
15+
array(function() { return class_exists('libev\EventLoop'); }, function() { return new rel\LibEvLoop; }),
16+
array(function() { return class_exists('EventBase'); }, function() { return new rel\ExtEventLoop; })
17+
);
1818
}
1919

2020
/**

0 commit comments

Comments
 (0)