Re: [VOTE] True Async RFC 1.6
| From: | Bart Vanhoutte | Date: | Mon, 24 Nov 2025 12:15:05 +0000 |
| Subject: | Re: [VOTE] True Async RFC 1.6 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-129430@lists.php.net to get a copy of this message | ||
>
> Will Legacy Les see a side effect when he upgrades to SDK Susie's new
> async library?
For clarity, Susie's code has turned from something sync like:
```
function getFoo(): Foo
{
$resultOne = sendHttpRequest('one');
$resultTwo = sendHttpRequest('two');
return new Foo($resultOne, $resultTwo);
}
```
into something async like:
```
function getFoo(): Foo
{
$results = await Async\all([
spawn sendHttpRequest('one'),
spawn sendHttpRequest('two')
]);
return new Foo($results[0], $results[1]);
}
```
Is that correct Rowan?
Op ma 24 nov 2025 om 12:56 schreef Rowan Tommins [IMSoP] <
imsop.php@rwec.co.uk>:
> On 24 November 2025 01:18:13 GMT, Deleu <deleugyn@gmail.com> wrote:
>
> >If I could summarize months of discussion on this RFC, the primary topic
> >would be the consensus that we do not want to have a split in the
> >community. If every PHP package needs an adapter to be async compatible
> >that essentially means the efforts to not break the community in half has
> >failed.
>
> Yes, this was precisely the point of my "SDK Susie" user story: Susie is
> not interested in maintaining multiple libraries for different parts of the
> community, she just wants her API to be usable by as many PHP developers as
> possible.
>
> If she can't use async I/O without breaking Legacy Les's application, she
> will simply not use it. Async Alice might write her own code for the API
> calls she needs, but won't want to maintain a fork of the entire library.
> Beginner Bob will use the official library and not get any async benefits.
>
> This is basically the situation we already have, with Async Alice using
> Swoole or ReactPHP.
>
>
>
> Rowan Tommins
> [IMSoP]
>