Next steps for PromiseStream with ReactPHP v3
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
Research direction
Start by reading the linked ReactPHP v3 roadmap and the PromiseStream discussion at orgs/reactphp/discussions/475. Compare the proposed options—moving the component, reusing its logic elsewhere, or deprecating it—and use that discussion to decide the component's future; the issue names no files or tests and does not define an implementation-ready outcome.
Written by the indexing model from the issue text.
Description
We're currently moving forward with working on ReactPHP v3 and releasing the roadmap tickets for all our components (see https://github.com/reactphp/event-loop/issues/271 and others). We still have some components that we haven't finalized plans for, especially with the next major version approaching. It's important to address how we can make sure these components are aligned with the upcoming ReactPHP v3.
We already opened a discussion for PromiseStream in https://github.com/orgs/reactphp/discussions/475 2 years ago, and with ReactPHP v3 around the corner, it's time to decide what to do here. To quote @clue from said ticket:
The way I see it, the project is only used for its buffer() function for the most part (in fact, this is also why this package was born: https://github.com/reactphp/stream/pull/45). If you take a look at the installation stats, you'll see that close to 100% of all installations come from reactphp/http. To make matters worse, the HTTP component has to work around some of the edge cases of buffering closed streams, so it might as well just implement 10 lines of code without an additional dependency.
I will argue that installing an entire project for a single function only is a bit overkill (for the PHP ecosystem at least). Likewise, maintaining an entire project requires a non-trivial amount of work – which I'd rather redirect towards our main components.
To add insult to injury, the package also features poorly-named first() and all() functions. This interferes with IDE autocompletion, as our Promise component also offers a prominent all() function from a different namespace. Better names might perhaps be something along the lines of bufferString() and bufferArray(). But renaming would incur a BC break, so we'd either have to wait for vNEXT or spend even more effort and add additional functions and deprecate the existing ones.
There was a discussion about moving the ReactPHP PromiseStream component to Friends of ReactPHP, or if we simply reuse the logic elsewhere and deprecate the component afterwards together with the EOL of ReactPHP v1.
Happy about input on this, so let's discuss possible options and decide on what makes the most sense 🚀
- Dominant language
- PHP
- Stars
- 115
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
phpstan/phpstan-doctrine#794 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Automattic/static-site-importer#1767 ·