Skip to content

Forward compatibility with react/promise 3 - #153

Merged
jsor merged 1 commit into
reactphp:masterfrom
WyriHaximus-secret-labs:promise-3
Apr 28, 2020
Merged

Forward compatibility with react/promise 3#153
jsor merged 1 commit into
reactphp:masterfrom
WyriHaximus-secret-labs:promise-3

Conversation

@WyriHaximus

Copy link
Copy Markdown
Member

No description provided.

@WyriHaximus
WyriHaximusforce-pushed the promise-3 branch 2 times, most recently from 5d6aee7 to 190500fCompareApril 26, 2020 17:09
@WyriHaximusWyriHaximus added this to the v1.3.0 milestone Apr 26, 2020
@WyriHaximusWyriHaximus changed the title [WIP] Forward compatibility with react/promise 3Forward compatibility with react/promise 3Apr 26, 2020
@WyriHaximus
WyriHaximus requested review from clue and jsorApril 26, 2020 17:09
Comment threadsrc/Query/RetryExecutor.php Outdated
{
$deferred = new Deferred(function () use (&$promise) {
if ($promise instanceof CancellablePromiseInterface) {
if ($promise instanceof CancellablePromiseInterface || (method_exists($promise, 'cancel') && $promise instanceof PromiseInterface)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might as well get rid of the instanceof or use the more explicit $promise instanceof CancellablePromiseInterface || (!interface_exists('React\Promise\CancellablePromiseInterface') && \method_exists($promise, 'cancel'). What do you think about this? (see also below) – via https://github.com/reactphp/promise-timer/pull/37/files#r415381931

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@WyriHaximus@jsor@clue