>
> 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] <
[email protected]>:

> On 24 November 2025 01:18:13 GMT, Deleu <[email protected]> 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]
>

Reply via email to