uniter / phpruntime

Runtime library for PHP environments
Other
14 stars 1 forks source link

Add Promise-sync mode #8

Closed asmblah closed 5 years ago

asmblah commented 5 years ago

This change allows a consistent public API across async mode and (p)sync modes. Previously, the consuming application needed to deal with either a Promise (as returned in async mode) or the resulting Value object. This additional effort made it more likely that only one of the options would be supported, meaning that switching between modes (eg. to enable the experimental debugger) would involve code changes.

Also see:

PHPToJS PR: uniter/phptojs#4 PHPCore PR: uniter/phpcore#3 PHPify PR: uniter/phpify#2