Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:129449 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 B967C1A00BC for ; Tue, 25 Nov 2025 10:22:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1764066181; bh=PITqVLKAXPQqY6ay6r+nusFzr6NPbGePAoG12A6yvbU=; h=References:In-Reply-To:From:Date:Subject:To:From; b=A/gLKrItJ3V4Hkr4KXDTf/kmUcOev0/0IslCBs0iXnsi5ZbYq4ALPG0hGslOJBmIz tfhDk/v3ibOkC1cXRXblO23ybZlFWpAVZdR1o+81VzQbAj30sg8DYrsFF9/yaD7YPK rHlgrzhDZHViQ+2YyyF6/tb43OOvuOjmKhGKz1BKCGPTVblHhQdGDKd/8XNMWShC0T 8Av4zDEZEYtqJLpW1yJ5VCepAll+qVha+eQsOOWjrBmnAfd8KMAymhCIituEnHS8Wl IH41RUDmLFGL2PGht+Apx8fV7w4iAJnQQF8P+watXk/fxd+dMoG0sjMhhTU+lZcFNr VwvpH5IaCDqvA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 09C2D180084 for ; Tue, 25 Nov 2025 10:23:00 +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,HTML_MESSAGE,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-pl1-f169.google.com (mail-pl1-f169.google.com [209.85.214.169]) (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 10:22:59 +0000 (UTC) Received: by mail-pl1-f169.google.com with SMTP id d9443c01a7336-297e264528aso57039085ad.2 for ; Tue, 25 Nov 2025 02:22:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=croquemonsieur-be.20230601.gappssmtp.com; s=20230601; t=1764066173; x=1764670973; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=PITqVLKAXPQqY6ay6r+nusFzr6NPbGePAoG12A6yvbU=; b=rCE5P+A3LcC2dsMaztir2WjccPa/sXeMF5hdpNF2rvRf9LkwRkq3mCJ//pC+iDHphn WR3Rm5oIsyMSmBTUKreK8ty3tdqVlb1xj3De3dnr/vQuK96QAOWzYs3iV/H7MXK+dGRX QeUep2Li20RCTVIAjrSsmQn4wK5I+K7nnh8a+jwX7MO+hYsWeO+ZOwGjOsnfF3aFcIIp YNEvgRJrDRlYXOX0MI+DRzvx9gP6n1rngmfBC1uOqcuBjPD8fL1kKyHK1m2QygxkENCg 0kdzh8auPxsiXjLgVOBvxPrsf5OYVVIPqNg2QPYWDGV8uRcE0CfNSmmJgZiPYL9C9Xwv xkpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764066173; x=1764670973; h=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=PITqVLKAXPQqY6ay6r+nusFzr6NPbGePAoG12A6yvbU=; b=SoSpcehVzc6lO2xq+W0kRoT9QHk43BE1sVUDlhyWfK2D7/BThgvVeU+aoB8RITvbIP hD7v9HKxIcruQsDf5YJMJ40g+0eWxGl5+In9hPJ0w7iiD+GNPZXSiLOrB4hYWC/fnmRI 8Y+XMohOI2l1n73miEhx191OSRVJ6kJGRMdC/uwA8RazIsQ7ZBqlXBZofplDAhGFLtaw rUCdf23/xzXACbz7pE+9q1jXUf+Ai122NdyqdBVqhYA/WbJSutP7lkmvw4utU99i6nAe wRzpQkQLtDqqaIjTs/3Gn54RXpHHoJ5e7jgSEVlKbbuBVHgAeBfXnzX7+BfeNbP0sqXn 2CjQ== X-Gm-Message-State: AOJu0YwXpa7iJ6rVM2z8MJZM3FiNIZoxqOxNM25aV3VZEB2Tde1k1gTE GHKs+3/vi0tIucmkLs4maXpqNactcyzJvKw90HWy8vSnmtLxlrucaB7i0gubEdt6I4f1JwuJK/W PFddnHZz+Wj1dCAu0FmWE/w988AbZ0DRykaXQPQcK7W91FzePpB0MfLg= X-Gm-Gg: ASbGnct+M27x1m5E4ZXNhV9i4s+kyzTsfjjiZk2fNGWL5o3vmd5Mpdin4/poD/FF1YB uidy/Sy40RXIoZWbqGgdlXTeEsHhRieKvfUR2XCDXp427/FpaBdjAwgPrTizymwo65L9tOrS7Su G27aJMNMKzNRzrNTZJSuwtFSbYthaHajDLm2WF8PYcYVjW7q+XyTt3bLhjvGTktEKaoamiuvo0x T709ZSge/Xq5oonKtXVymZaLquohCQTGmknmuvv/+d2Rh+RJ2BDDD246oTLGuhLD/aaZkLYoEB/ CCSzXib6rzKkEodcbj8ab2zQ/Liw X-Google-Smtp-Source: AGHT+IGU+7/gnqRfwEOW8y6Xn7qxNObo9SsX+kNAwOK4bBOPg8T5TLDMYPig+2yUy9DiW1d7dX6ZVaCSv59TT8iZvYY= X-Received: by 2002:a17:90b:1cc4:b0:341:8ad7:5f7a with SMTP id 98e67ed59e1d1-3475ed514ccmr2275026a91.18.1764066173311; Tue, 25 Nov 2025 02:22:53 -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 11:22:41 +0100 X-Gm-Features: AWmQ_bnqVLLuywYxOe3d1Zq5N5G3EdSe5HUII5XPwqXUAgkudREYTqBikBLXtco Message-ID: Subject: Re: [PHP-DEV] [VOTE] True Async RFC 1.6 To: internals@lists.php.net Content-Type: multipart/alternative; boundary="0000000000009ee9c6064468a9dd" From: bart+php@croquemonsieur.be (Bart Vanhoutte) --0000000000009ee9c6064468a9dd Content-Type: text/plain; charset="UTF-8" Op di 25 nov 2025 om 10:43 schreef Edmond Dantes : > Hello > > > Susie doesn't know anything about the implementation, other than what is > defined in the interface. That is literally the purpose of accepting an > interface. > > So it sounds like her only safe option is to restrict her usage of async > coroutines to small self-contained pieces of code, and only use injected > dependencies and callbacks in the "main" coroutine where they were passed > in. > > Exactly. This means that for asynchronous logging, a separate > interface must be introduced in order to guarantee correct behavior. > In my opinion that depends on what Susie thinks of as correct behavior, but LoggerInterface might not be the best example to discuss shared state. There's plenty of other examples to think of though that would not guarantee backwards compatibility (order of lines in a file written with file_put_contents etc). Anyway, it seems like we're coming to the conclusion that mixing sync and async behavior is going to cause quite some problems and is something that would not pass a vote if I had to guess. Even if you know what you're doing YMMV. Am I reading the room correctly if I say that we're converging at the sync/async toggle (ini settings, function call, whatever, ...)? Best Regards, Bart Vanhoutte --0000000000009ee9c6064468a9dd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Op di 25 nov 2025 om 10:43 schreef Edmond= Dantes <edmond.ht@gmail.com&= gt;:
Hello

> Susie doesn't know anything about the implementation, other than w= hat is defined in the interface. That is literally the purpose of accepting= an interface.
> So it sounds like her only safe option is to restrict her usage of asy= nc coroutines to small self-contained pieces of code, and only use injected= dependencies and callbacks in the "main" coroutine where they we= re passed in.

Exactly. This means that for asynchronous logging, a separate
interface must be introduced in order to guarantee correct behavior.

In my opinion that depends on what Susie thin= ks of as correct behavior, but LoggerInterface might not be the best exampl= e to discuss shared state. There's plenty of other examples to think of= though that would not guarantee=C2=A0backwards compatibility (order of lin= es in a file written with file_put_contents etc).

= Anyway, it seems like we're coming to the conclusion that mixing sync a= nd async behavior is going to cause quite some problems and is something th= at would not pass a vote if I had to guess. Even if you know what you'r= e doing YMMV.

Am I reading the room correctly if I= say that we're converging at the sync/async toggle (ini settings, func= tion call, whatever, ...)?

Best Regards,
Bart Vanhoutte
--0000000000009ee9c6064468a9dd--