1
0
mirror of https://github.com/danog/amp.git synced 2024-12-04 18:38:17 +01:00
Commit Graph

103 Commits

Author SHA1 Message Date
Niklas Keller
8b38da2f9c
Support 32-bit platforms 2019-05-31 12:59:23 -05:00
Aaron Piotrowski
5316e741b7
Different approach for 32-bit support
Prior version made time run backwards… oops.
2019-05-31 12:48:03 -05:00
Aaron Piotrowski
a4fd818e13
Swap sign of returned time on 32-bit systems 2019-05-31 11:40:56 -05:00
Niklas Keller
944a2dd29d Move Coroutine::__destruct to Placeholder 2019-05-31 11:38:02 -05:00
Niklas Keller
c12828081f Fix exceptions bubbling from Coroutine::__destruct
This has been an edge case potentially hiding some exceptions. The tests have been refactored to error if the loop has watchers leaking from one test to another test.
2019-05-31 11:38:02 -05:00
Niklas Keller
5622edba37 Implement monotonic timer using PHP 7.3's hrtime() 2018-12-10 20:07:11 +01:00
Niklas Keller
fa3fe1d20b Apply PSR-2 2018-06-18 20:00:01 +02:00
Niklas Keller
5dac863f37 Don't record stack traces in case of AMP_DEBUG not being set (#218)
Fixes #217.
2018-04-26 00:32:31 +02:00
Aaron Piotrowski
992d6e9b39 Return named classes
Better for var_dump and stack traces.
2018-01-27 19:47:46 +01:00
Niklas Keller
0cb033084a Fix formatStacktrace notice 2017-12-07 18:23:19 +01:00
Aaron Piotrowski
4ef9af6dff
Check against "false" 2017-12-02 11:15:06 -06:00
Aaron Piotrowski
e3b0b9a0c7
Update backtrace formatting 2017-12-02 11:14:49 -06:00
Aaron Piotrowski
745a95ba67
Define AMP_DEBUG through environment 2017-12-02 10:23:12 -06:00
Markus Staab
34bf671f13 Automatically add \ for buitins (#186)
Fixes #185.
2017-11-29 13:36:50 +01:00
Aaron Piotrowski
7a05fe1316 Use static function for rethrow 2017-06-05 00:21:45 -05:00
Aaron Piotrowski
02eb0340f1 Use anonymous classes in Deferred and Emitter 2017-06-04 23:59:23 -05:00
Niklas Keller
783fe8c4f4 Add asyncCoroutine and ReactPromise tests 2017-05-02 18:59:52 +02:00
Aaron Piotrowski
835e617054 More stream → iterator
Hopefully that's all of them…
2017-05-02 07:07:43 +02:00
Aaron Piotrowski
91c8da9fec Replace more occurrences of stream 2017-05-02 07:07:43 +02:00
Aaron Piotrowski
f78328822c Allow for debugging of double iterator completion 2017-05-02 07:07:43 +02:00
Aaron Piotrowski
38d53304ae Stream → Iterator 2017-05-02 07:07:20 +02:00
Aaron Piotrowski
4935dddc84 Refactor Streams
Dropped original Stream interface in favor of the Iterator interface. Eliminates subscriber timing issues and simplifies Stream usage.
2017-05-02 07:04:10 +02:00
Niklas Keller
79ab41e5bf Update php-cs-fixer to version 2 and upgrade rules
This also fixes the code style according to the new rules.
2017-04-24 16:22:02 +02:00
Niklas Keller
65a37484a2 Replace UnionTypeError with factory function + minor doc changes 2017-04-24 15:27:04 +02:00
Niklas Keller
70e63a3748 Fix code style according to new rules 2017-04-24 15:27:04 +02:00
Aaron Piotrowski
89570e8f6d Move Watcher to Loop namespace 2017-04-18 09:38:16 -05:00
Niklas Keller
3a42254300 Make Watcher implement Struct 2017-04-13 18:05:59 +02:00
Niklas Keller
8caae2253f Allow recording stacktraces to debug double resolution 2017-03-29 17:25:44 +02:00
Aaron Piotrowski
2f7e9a0746 Run returned generator as coroutine from onResolve and onEmit callbacks 2017-03-27 18:37:55 -05:00
Niklas Keller
2aa91a6c25 Rename Stream::listen to Stream::onEmit 2017-03-21 18:29:51 +01:00
Niklas Keller
ce269fa516 Rename Promise::when to Promise::onResolve, resolves #77 2017-03-21 17:23:37 +01:00
Aaron Piotrowski
a927b3cb06 Separate functions into Promise and Stream namespaces 2017-03-15 19:02:04 -05:00
Niklas Keller
77bd05b807 Fix tests and Producer React adaption 2017-03-12 22:09:19 +01:00
Aaron Piotrowski
2cc4cf9d0b Fix use statement order 2017-03-12 12:23:48 -05:00
Aaron Piotrowski
cd4328ab48 Merge branch 'react-compatibility' 2017-03-12 11:38:48 -05:00
Pieter Hordijk
2db7bed1b6 Fixed typos an promise -> a promise 2017-03-12 17:36:07 +01:00
Aaron Piotrowski
7ad10f5d7d Add support for React promises 2017-03-11 09:17:43 -06:00
Aaron Piotrowski
754a29e86c Remove promise error handler
Exceptions thrown from when callbacks are now forwarded directly to the loop error handler.
2017-03-10 15:32:58 -06:00
Niklas Keller
0be9ae9ade Switch from AsyncInterop\Promise to Amp\Promise 2017-03-10 21:58:46 +01:00
Niklas Keller
e64bbfb9f5 Add Loop::set, auto-wrapping, fixup things 2017-03-10 21:31:57 +01:00
Niklas Keller
f4f9008ca0 Merge amphp/amp repository into amphp/amp 2017-03-10 18:26:17 +01:00
Aaron Piotrowski
9073f6c999 Docblock cleanup 2017-02-16 22:36:32 -06:00
Aaron Piotrowski
cf5ebb1408 Better error message when emitting after resolve 2017-01-07 12:25:04 -06:00
Aaron Piotrowski
cba57dd81e Simplify PrivatePromise and PrivateStream 2017-01-07 12:24:40 -06:00
Niklas Keller
ae69e92266 Update to promise 0.4.0 and event-loop 0.5.0, add humbug config 2017-01-07 13:47:45 +01:00
Aaron Piotrowski
210b6ff258 Observable → Stream 2017-01-03 19:10:27 -06:00
Aaron Piotrowski
5651240615 Update to promise spec v0.3
Dropped strict-types due to spec requiring weak types in callbacks.
2016-12-29 16:29:27 -06:00
Niklas Keller
2a65c0735b Fix docblock for Placeholder::when 2016-12-23 23:48:24 +01:00
Aaron Piotrowski
11f1c7e7c4 Amp\lazy() → Amp\Lazy
Plus some tests!
2016-12-15 18:50:33 -06:00
Aaron Piotrowski
93ad513ab1 Remove dead code
Deferred and Postponed will never throw from the functions they define.
2016-12-15 17:34:30 -06:00