1
0
mirror of https://github.com/danog/amp.git synced 2024-12-02 17:37:50 +01:00
Commit Graph

78 Commits

Author SHA1 Message Date
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
Aaron Piotrowski
f95412770b Lazy promise bugfix 2016-11-14 14:10:44 -06:00
Aaron Piotrowski
9927ad5b4f Awaitable → Promise 2016-11-14 13:59:21 -06:00
Aaron Piotrowski
759af93112 Missed static; remove unused import 2016-09-07 12:24:49 -05:00
Aaron Piotrowski
6e1c1db5a6 Drop special behavior when emitting an observable 2016-08-23 13:17:59 -05:00
Aaron Piotrowski
96e1178b89 Code, docblock, and comment cleanup 2016-08-17 22:25:54 -05:00
Aaron Piotrowski
d4e83490c2 Drop unsubscribing from Observable 2016-08-17 21:11:03 -05:00
Aaron Piotrowski
2317a3aa37 Unsubscribe from emitted observable if failed 2016-08-16 16:31:09 -05:00
Aaron Piotrowski
84c2572e0a Prevent fail call after resolution 2016-08-16 13:30:32 -05:00
Aaron Piotrowski
bdc26e1e8b Combine use statements 2016-08-16 13:07:51 -05:00
Aaron Piotrowski
dae4eb90da Better Emitter fix; fail observable if emitted awaitable fails 2016-08-16 13:07:38 -05:00
Aaron Piotrowski
a8a5a1b3a5 Fix Emitter 2016-08-16 02:28:47 -05:00
Aaron Piotrowski
888229d667 Use strict types 2016-08-15 23:46:26 -05:00
Bob Weinand
dcf17e3f98 Optimize Producer & remove wait until first subscribe
Also delay first emit in Emitter until next tick
2016-08-14 16:57:17 +02:00
Aaron Piotrowski
2ff32c2d6b Remove unnecessary default parameter values 2016-08-12 16:38:36 -05:00
Aaron Piotrowski
69ec812bc0 Require PHP 7 2016-08-11 14:52:40 -05:00
Aaron Piotrowski
658edf33f7 Use Closure::fromCallable() in 7.1 2016-08-11 13:33:51 -05:00
Aaron Piotrowski
24142496d8 Rethrow subscriber callback exceptions from loop 2016-07-19 15:13:56 -05:00
Aaron Piotrowski
bec838b693 Remove leftover exception class
No longer needed as Subscriber is not an awaitable.
2016-07-19 13:30:28 -05:00
Aaron Piotrowski
70123b9a44 Update Producer::resolve(); fix emitting observable 2016-07-19 13:19:44 -05:00
Aaron Piotrowski
9839343bbb Remove default value from emit 2016-07-19 13:10:15 -05:00
Aaron Piotrowski
13a6fc59c4 Producer::init() -> private 2016-07-19 12:42:58 -05:00
Aaron Piotrowski
32b4721c5e Subscriber no longer implements Awaitable 2016-07-19 12:40:16 -05:00
Aaron Piotrowski
90d744537e protected -> private in internal traits 2016-07-19 12:32:43 -05:00
Aaron Piotrowski
dad93a6da0 Merge branch 'observable' into v2 2016-07-18 23:29:19 -05:00
Aaron Piotrowski
4ed8e65468 Cleaner resolution 2016-06-16 23:27:14 -05:00