File tree Expand file tree Collapse file tree 5 files changed +17
-9
lines changed Expand file tree Collapse file tree 5 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 1
1
# Change Log
2
2
3
3
4
+ ## Unreleased
5
+
6
+ ### Added
7
+
8
+ - Autoregistration of stream filters using Composer autoload
9
+
10
+
4
11
## 0.1.2 - 2015-12-26
5
12
6
13
### Added
Original file line number Diff line number Diff line change 31
31
"autoload" : {
32
32
"psr-4" : {
33
33
"Http\\ Message\\ " : " src/"
34
- }
34
+ },
35
+ "files" : [
36
+ " src/filters.php"
37
+ ]
35
38
},
36
39
"autoload-dev" : {
37
40
"psr-4" : {
Original file line number Diff line number Diff line change @@ -14,10 +14,6 @@ class ChunkStream extends FilteredStream
14
14
*/
15
15
public function getReadFilter ()
16
16
{
17
- if (!array_key_exists ('chunk ' , stream_get_filters ())) {
18
- stream_filter_register ('chunk ' , 'Http\Message\Encoding\Filter\Chunk ' );
19
- }
20
-
21
17
return 'chunk ' ;
22
18
}
23
19
Original file line number Diff line number Diff line change @@ -24,10 +24,6 @@ public function getReadFilter()
24
24
*/
25
25
public function getWriteFilter ()
26
26
{
27
- if (!array_key_exists ('chunk ' , stream_get_filters ())) {
28
- stream_filter_register ('chunk ' , 'Http\Message\Encoding\Filter\Chunk ' );
29
- }
30
-
31
27
return 'chunk ' ;
32
28
}
33
29
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ // Register chunk filter if not found
4
+ if (!array_key_exists ('chunk ' , stream_get_filters ())) {
5
+ stream_filter_register ('chunk ' , 'Http\Message\Encoding\Filter\Chunk ' );
6
+ }
You can’t perform that action at this time.
0 commit comments