Re: [VOTE] True Async RFC 1.6
| From: | Jakub Zelenka | Date: | Fri, 21 Nov 2025 19:42:40 +0000 |
| Subject: | Re: [VOTE] True Async RFC 1.6 | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-129378@lists.php.net to get a copy of this message | ||
On Fri, Nov 21, 2025 at 3:22 PM Edmond Dantes <edmond.ht@gmail.com> wrote:
> Hello
>
> > how do I keep my project always-sync without risking one of my composer
> packages suddenly calling spawn() and causing bugs I have no idea how to
> even begin to understand?
>
> This idea was mentioned a bit earlier in the discussion. You can use a
> special setting to disable asynchrony. There are many different
> possibilities here. For example, you can tell Composer not to use
> async packages. And so on. You can come up with your own protection
> mechanisms. There is no technical problem here in terms of
> implementation.
> Why not enable asynchronous mode in PHP explicitly through php.ini?
>
I'm not sure if INI is going to be successful. I would bet that it is going
to get rejected as PHP has been moving against introducing INI for language
/ extension behavior changes.
It reminds to some extend the scalar type hints with strict / non strict
discussion that ended up using declare keyword. So maybe async could use it
too and it could be enabled per file in a similar way as strict types. I
haven't thought if it would always make sense for async but for projects
that want to be fully async, it would need to be declared in each file.
Cheers
Jakub