Aaron Piotrowski
11da27c603
Only throw if resource closed or at eof
2018-02-09 00:47:09 -06:00
Niklas Keller
561c364128
Upgrade documentation dependencies
...
This fixes the GitHub security warning.
2018-02-07 13:52:39 +01:00
Niklas Keller
2cb8005742
Throw correct exception in ResourceOutputStream after close
...
Fixes #35 .
2018-02-07 13:49:07 +01:00
Niklas Keller
1b0b8daed4
Polyfill STDOUT and STDERR on SAPIs not being CLI
...
STDERR is used by amphp/parallel for error forwarding from children. STDERR gets written to the error log in case of Apache and similar locations for other SAPIs.
This also ensures STDOUT / STDERR can always be used and only a single stream ID exists for STDOUT / STDERR, which might otherwise error for libuv if people open 'php://stderr' multiple times.
Fixes amphp/parallel-functions#6 .
Fixes amphp/parallel#34 .
2018-01-12 20:43:00 +01:00
Niklas Keller
0b6d99b2c3
Remove outdated note about closing ResourceInputStreams
2017-12-27 20:13:24 +01:00
Niklas Keller
5dffe33692
Throw correct PendingReadError for IteratorStream
2017-12-22 09:31:37 +01:00
Niklas Keller
926fa6d24d
Update shared documentation files
...
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools .
2017-12-14 19:16:44 +01:00
Niklas Keller
0c059ba0e6
Suppress errors also for stream_socket_shutdown, relates to #32
2017-12-10 17:40:58 +01:00
Niklas Keller
c5e31aa7b7
Fix #32 : Suppress errors for feof, because pthreads
2017-12-10 17:36:05 +01:00
Niklas Keller
cd4ef8553e
Update shared documentation files
...
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools .
2017-12-06 12:50:30 +01:00
Niklas Keller
3c24903849
Use fread() for STDIO instead of stream_get_contents()
...
Turns out this fixes the issues with amphp/parallel on Windows.
2017-12-05 19:57:30 +01:00
Aaron Piotrowski
a1bd230eca
Define target platform in composer.json and fix .travis.yml
2017-12-02 20:32:00 -06:00
Niklas Keller
e103ca8c52
Update shared documentation files
...
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools .
2017-10-20 19:13:58 +02:00
Niklas Keller
e6c169a61a
Update shared documentation files
...
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools .
2017-10-20 18:33:43 +02:00
Sébastien Nikolaou
e00c6d4926
Simplify OutputBuffer tests
2017-10-17 21:24:21 +02:00
Sébastien Nikolaou
48bb2ebf78
Extract OutputBuffer class
2017-10-17 21:24:21 +02:00
Sébastien Nikolaou
a4a132c056
Remove error suppressions for deflate_add
2017-10-17 21:24:21 +02:00
Sébastien Nikolaou
8af72be249
Fix code standards
2017-10-17 21:24:21 +02:00
Sébastien Nikolaou
4e0e9a6b66
Increase test coverage
2017-10-17 21:24:21 +02:00
Niklas Keller
f63b98990e
Optimize memory consumption of Amp\ByteStream\pipe
2017-10-17 09:22:17 +02:00
Bob Weinand
0f501deb7c
Fix #29 - do not release resource on __destruct()
...
This ensures getResource() still returning a valid resource during cyclic garbage collection
2017-10-17 03:50:40 +02:00
Niklas Keller
d60ba033c4
Use stream_get_contents instead of fread for ResourceInputStream
...
This fixes an issue with TLS streams: https://github.com/amphp/artax/issues/138 .
We still use for UDP, because stream_get_contents might read multiple packages there if I'm not mistaken.
2017-10-08 12:38:01 +02:00
Niklas Keller
00643414ac
Fix editorconfig, add 7.2 to Travis, update shared
2017-10-07 10:32:29 +02:00
Niklas Keller
af613a0a77
Fix Message::read() if stream fails with a pending read
2017-10-07 10:28:45 +02:00
Fabien Villepinte
0dff1fe859
Anonymous function has an unused use $resource
2017-10-01 12:04:51 +02:00
Niklas Keller
f68b424ab4
Update shared documentation files
...
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools .
2017-09-27 15:07:51 +02:00
Niklas Keller
ef7063f9d1
Provide description and keywords for docs
2017-09-27 14:08:08 +02:00
Niklas Keller
d5a705ea9b
Update to new shared docs repo
2017-09-27 13:56:06 +02:00
Niklas Keller
341a035318
Update shared documentation files
...
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools .
2017-09-21 18:14:37 +02:00
Niklas Keller
f3f5ccabbc
Update shared documentation files
...
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools .
2017-09-20 21:48:46 +02:00
Niklas Keller
f93296ed2d
Update shared documentation files
...
This is an automated commit. Please report any issues to https://github.com/amphp/website-tools .
2017-09-16 19:34:22 +02:00
Aaron Piotrowski
fdcf400f19
Check writable flag rather than for null resource
...
Also null resource when writing in watcher callback fails. Fixes #20 .
2017-09-15 00:17:42 -05:00
Niklas Keller
8047db9b9c
Add banner to readme
2017-09-07 11:03:21 +02:00
Niklas Keller
ec1ca87903
Unbreak logo text
2017-07-15 23:21:23 +02:00
Niklas Keller
5e06f3acd4
Use new logo \o/
2017-07-15 23:15:05 +02:00
Bob Weinand
a70a650793
Also \assert() against fclose() instead of silently returning null
2017-07-15 10:38:47 +02:00
Bob Weinand
6b9074fbf2
Prevent SIGPIPE test aborts with phpdbg
2017-07-15 10:11:27 +02:00
Bob Weinand
666ece18a4
Fix invalid StreamException upon full write buffer
...
And add a few tests with chunk size writes
2017-07-15 10:06:12 +02:00
Niklas Keller
4777508637
Fail streaming messages correctly on read failures
...
Fixes #18 .
2017-06-28 11:35:12 +02:00
Niklas Keller
704adf70cf
Add reference and unreference methods to ResourceInputStream
2017-06-23 16:33:13 +02:00
Niklas Keller
b67358ad91
Suppress errors on close for resource streams
...
A resource might still be non-null, but already closed.
2017-06-19 08:43:07 +02:00
Aaron Piotrowski
48c4e122d8
Tweak closing
...
Resource is not nulled in watcher callback if reading/writing fails so close() will still call shutdown/fclose.
2017-06-18 23:14:59 -05:00
Niklas Keller
8d74c85048
Apply same closing mechanism to RIS
2017-06-18 23:25:22 +02:00
Niklas Keller
798723e942
Use \fclose for unidirectional resources to cover pipes
2017-06-18 22:57:19 +02:00
Niklas Keller
93540890fd
Remove unnecessary isset check for stream modes
2017-06-18 22:55:44 +02:00
Niklas Keller
161c73471d
stream_socket_shutdown resources in ROS on close
2017-06-18 20:16:05 +02:00
Niklas Keller
cc42b43fe4
Add test for large writes
2017-06-18 19:58:35 +02:00
Aaron Piotrowski
816307c665
Fix writing in watcher callback if $chunkSize is null
2017-06-18 11:47:58 -05:00
Niklas Keller
8b20bf90b8
Fix feof check
2017-06-17 17:46:18 +02:00
Niklas Keller
0071609904
Fix minor phpdoc issue
2017-06-17 17:10:23 +02:00