guzzle / promises

Promises/A+ library for PHP with synchronous support
MIT License
7.61k stars 116 forks source link

Extracted functions to static methods #113

Closed GrahamCampbell closed 4 years ago

GrahamCampbell commented 4 years ago

This PR pairs with https://github.com/guzzle/guzzle/pull/2712. After this is merged, we can tag 1.4.0.

TODO:

Mappings:

Original Function Replacement Method
queue Utils::queue
task Utils::task
promise_for Create::promiseFor
rejection_for Create::rejectionFor
exception_for Create::exceptionFor
iter_for Create::iterFor
inspect Utils::inspect
inspect_all Utils::inspectAll
unwrap Utils::unwrap
all Utils::all
some Utils::some
any Utils::any
settle Utils::settle
each Each::of
each_limit Each::ofLimit
each_limit_all Each::ofLimitAll
!is_fulfilled Is::pending
is_fulfilled Is::fulfilled
is_rejected Is::rejected
is_settled Is::settled
coroutine Coroutine::of

NB The overall idea of these changes was approved by the original author, Michael: https://github.com/guzzle/promises/pull/108.

GrahamCampbell commented 4 years ago

Friendly ping @Tobion and @Nyholm. It'd be good to have this merged so I can focus on PHP 8.0 support next, without conflicts.