Re: [VOTE] True Async RFC 1.6

From: Date: Fri, 21 Nov 2025 17:56:41 +0000
Subject: Re: [VOTE] True Async RFC 1.6
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.internals 
Request: Send a blank email to internals+get-129376@lists.php.net to get a copy of this message
On 21 November 2025 13:06:30 GMT, Deleu <deleugyn@gmail.com> wrote:
>Here is a very simple hypothetical:
>Suppose I run a website and I have very little understanding of PHP, but I
>know the basics. Every Monday I run composer update, do a little testing
>and deploy the website. Suppose next Monday when I run composer update
>one of my dependencies (Package A) starts to pull in AMPHP as its nested
>dependency. When I try to open my website locally it will either have
>everything broken or it will just work regularly and nothing will be
>running async. There is no other option.
>Now suppose the same example but with PHP 9 + TrueAsync. I do `composer
>update` one day and test my home page and it works. But deeply nested
>somewhere there is a feature that will use Package A which then spawns a
>coroutine and leads to my global state code behaving weirdly. It's not a
>fatal error. It's not very clear at all to me that something changed, but
>now my array indexes are triggering DB updates out of order.


This is basically the exact scenario I had in mind.

For me, having a cast-iron way to avoid this problem is a hard requirement for releasing a version
of PHP with True Async included. Whether that's an ini setting, an annotation that protects
particular parts of the code, etc, is detail we can work out later, but it must be a design
requirement that protecting legacy code in some way is possible.

Debugging tools would be a useful addition, but wouldn't replace the off switch. I know for a
fact that there are applications I will want to run on PHP 9 which will never be worth the
investment to make async-ready. Other applications, I might well run in sync mode initially, then
test and enable async.

And this again highlights why we need a project structure, where we can agree selected details of
the design, with known outstanding issues. I want to be able to say "I approve of the design so
far, with the understanding that X, Y and Z will be addressed before final release".

Regards,

Rowan Tommins
[IMSoP]


Thread (106 messages)

« previous php.internals (#129376) next »