Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129451 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id A9C851A00BC for ; Tue, 25 Nov 2025 11:04:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1764068647; bh=nnUTgV3UhI4byR+D9KqqnPlcypz5Fcme/AgSvH23GBg=; h=References:In-Reply-To:From:Date:Subject:To:From; b=fsHeE/1EqfxcvjGuSkf8Zh3m48/MUJQ2JiYLYpDUCJsojR4C2Fph/ysDjAlmAU4K2 FGU8qiyBoLshRgEvZmciKz1wVpwJsQDWeIUEvb6TDcvFY2ZDJpDtJlgDo28WJ2RBm1 sR1zd6xBxD5MAbuk2zPaaBY3Dvq44TPRRJCtN4Obp1j0nC/HDovgc/jXgXGAdxp0yS kNaleWy3fef31LDaRaWDtb/sxfIxG1lIGy3tz6OcK+esSP7OThZTQ8jxE3IHjEUSyc kcJ9MuaZmBag3ZpFQ0FPxuI602hcDQ84eJ7CFaWFN0Rbp0NWIN3e0Aal+R7UyW+PZf F78yiN8T6dj2Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 72F48180079 for ; Tue, 25 Nov 2025 11:04:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 25 Nov 2025 11:04:06 +0000 (UTC) Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-340c39ee02dso4589950a91.1 for ; Tue, 25 Nov 2025 03:04:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=croquemonsieur-be.20230601.gappssmtp.com; s=20230601; t=1764068640; x=1764673440; darn=lists.php.net; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nnUTgV3UhI4byR+D9KqqnPlcypz5Fcme/AgSvH23GBg=; b=Bjz448TsPbf83UG9UpAsaj5Qci4XQSS/XHM2F1NywlRe1Hhdc2ljFtjefxxQwg1TtF zZi3IyZ+y9msDxuwvHdUJnF+eYe7UaVVJcqpwe80lx4RUeHvlOWKo2pMcKqNpuN+zYga zPupdTzDEu7UVVmUpTJpXCy3T15ikak2Tmd/x48BIc5urawfj4LNLi8JZ/mSyeZ4WlSN DPsjbN5eSRKEueVXL6o5wkLwdbQrtYQGFYAu89QnOtSPKmKEgWcAlPaK1bv2eoZ3nCTR MNv5JPkY2HPgEAvX6CY3sH75xx8q2B+l/2qjIjoWRYZtUYtu7obwLYR397dZ1FGOlUoO zWMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764068640; x=1764673440; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=nnUTgV3UhI4byR+D9KqqnPlcypz5Fcme/AgSvH23GBg=; b=wHbL9fY0jFVtxxxa+I/uMEhSZPReB9q6QWOzOa75a1tDJQq81IQiXyPNnLzBmpW7Ks P7nqlfru3SD+olnmZ9cRMYBPVhbfUiiWbhEsXIjdtXaq1itWFPmIWilWNbvuLeCrP5l1 wrlHjA0maG0KByMxvXoaryKbaqshpOShho6GKp5eY8+m2OGkz2zju8/A/S9cUdBBucy8 vOsKV6/niGKBeRMTk4fsSDxNhFXngcGpCezCOuzUSDqWsmVNtP0y4wwjFaaT3L28boL1 mh9Aq5zqyzs46EIgLtefrqVArqETUCao+41XVlv7i2q7EPbcihKZBY7zSkF8GnUCDBi4 b73Q== X-Gm-Message-State: AOJu0YyDWaZbMuOuABqHiQ2po50BSuuU2y+MKwN+lT9kxgZ8+gEkUlkJ PQOWpHMv+G6LdkcGK5scv64lKFaRlpIr3eJVuEIX+jdKquwAzqZvi4yp/y50lXS61vO1A22w4kP YiXvoLtV0WfBx7McPkoD/B0nSHiXAJFOSa2e2hesulOm5DFAt+lMA3n0= X-Gm-Gg: ASbGncvTcibkl2DIGUijzxRRjGXs49FKMrIWSCIF1ritn9A3MHuK4JXR4Bi3rKuoJh9 P1ecrlUE4T0MJWg7bEqlPh3o8avwYGKWVk4wKTyswUBa3b9E2beOLZPi3B0019tYiKE4tXezTuq VNdq93AQpb7psJzhNe8pzNnwmR2CzeNUL4akP4h7tQ2yy1+SLk5iivfEYwHx7ltwN0ifSdiKiBA rbmIRORSn+NrDMZVT9Iw7GVKxke03l0JQmIgWx0/MSAytPPK/4xopawFECCpRUiIQECUhEIgjkI 214WtEwrhRJPa2xNbrG7lKvlBPmn X-Google-Smtp-Source: AGHT+IEPEXLTxrwQB4Mcdq7WWU/5XOsvlejYJ9VsUNIcb5rdywBnLLhbsaCz+fygfLeWQof8sI/DQIsGmvyRyhDwubU= X-Received: by 2002:a17:90b:4d0f:b0:339:d1f0:c740 with SMTP id 98e67ed59e1d1-34733e45877mr13080048a91.1.1764068639835; Tue, 25 Nov 2025 03:03:59 -0800 (PST) Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: <92865666.4510.1763818506332@email.ionos.de> <329450798.8037.1763822426377@email.ionos.de> <9287c46c-bc63-4dd0-9792-0f9421959589@rwec.co.uk> <65869feb-d518-4de3-8c10-115e3ba7dce7@rwec.co.uk> <55149f3e-7ec7-4479-bd6d-2e7fe1b8edef@rwec.co.uk> <19693420-c091-49b7-b557-e09717239d9b@rwec.co.uk> In-Reply-To: Date: Tue, 25 Nov 2025 12:03:48 +0100 X-Gm-Features: AWmQ_bnAboAIVAnYFauH36zzgetWfQEbgD9rOpEvaYgf8YGL0ysbEkj7YfGG_5o Message-ID: Subject: Re: [PHP-DEV] [VOTE] True Async RFC 1.6 To: internals@lists.php.net Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable From: bart+php@croquemonsieur.be (Bart Vanhoutte) Op di 25 nov 2025 om 11:36 schreef Rob Landers : > > > If we're going to have to recreate some of the most basic interfaces to g= et async to work ... does it make sense to seriously consider coloured func= tions? As annoying as it would be to refactor so much code, I think we coul= d realistically provide ourselves escape hatches by not requiring every fun= ction calling `await` to be async? > I have worked with coloured functions in PHP when Fibers were not around and the developer experience is very bad. Before PHP 8.1; every function I wrote would be coloured by either accepting or returning a Promise (which is made worse by the fact there's no generics). Since PHP 8.1; I can use Fibers and implement a widely spread Interface in an async way. Currently, if I want to use an SDK client, the first thing that I check is `composer.json` to find out what HTTP client it uses. If it accepts a PSR-18 ClientInterface I use a small wrapper around ReactPHP's Browser that awaits a Promise and I'm set. We've been talking about shared state and possible breaks in backwards compatibility, but I must say that in reality it's not something that I find being in the way very often. Like I've made it seem before, if there's any serious breaks in backward compatibility (not the order of log lines that might be different from the sync implementation) I would at that point just document the change and release a new major version of a library. That is a lot less painful imo than working with coloured functions. Best Regards, Bart