guzzle / promises

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

Allow all promise collection wrappers to dynamically add promises via $recursive option #155

Open geek-merlin opened 1 year ago

geek-merlin commented 1 year ago

(Proposed in #46, implemented in #63) Utils::all() has the $recursive option that makes the collection promise pick up new promises that have been dynamically added to the collection. The other collection methods (settle, any, some, ...) lack that $recursive option. They should also have it.

My background

I have a use case (recursive redirect resolver) where i rather use Utils::settle() (to not have a fail stop the other requests). Taking the existing code from ::all(), i could implement this in userland, so no urgency to me.