Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:118678 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 77470 invoked from network); 21 Sep 2022 09:29:56 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 21 Sep 2022 09:29:56 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E18381804AB for ; Wed, 21 Sep 2022 02:29:55 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 21 Sep 2022 02:29:55 -0700 (PDT) Received: by mail-yb1-f173.google.com with SMTP id c9so7189176ybf.5 for ; Wed, 21 Sep 2022 02:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=64sBCaVweic01XgXY1ubwhRkrbIfXLrCCbkICbbxLkw=; b=J6FJLHJA4iNbkmX2YlFbsGyzj7PLUJT1LoxmFttFSk3zBi3EH5drwC2z1f/IRn8lpd sBOS0/alxsaGLw7JUJYwwQe6SQc78FJ1pFiXnkqFiJVHQkOQNKmI9Y0AO9CGhtGx9b3J NJ/Z9HDvGJ8PgpFlUsFskji2GHd/i9KnJln0VsL11woJUNrqlBaUCKfx//0r0bYkcJ0l FtXoTHBd0u0BjNH+qJKk8tYJog2ACvZFeS/+DbbCloC9ib3rmowmLpRo30+M3YQPfHlt ZI/LE2zsZJ2msl+VS+rutB3HGwFUhKn79iFoeMTiC3Lqy1D2vl5Gn33HlVZl0ihnHQLK zt6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=64sBCaVweic01XgXY1ubwhRkrbIfXLrCCbkICbbxLkw=; b=lZLLFQiVYRjUvEIzeewVjDrKtbJ/5NnZDEktM9NtAGq9e8CGngI16tp8JCsm/7QiFl S8n5TRc5vgHNNbvX/JKufeOfyxqw5lh0C1tbSm9HbDgFBT2vZ4nDUXYpZdpoiLu62/gb CEJwtMqEs77sKMfy/atpwz48F3idgHag4JvNIVeDhR03vKqIOKwxvF8ULj8TIlEgmtOx 8nRFIh+tOrT+3FD+pegEJXcJYvOJxi30Ao4jP3DJXSchnPV/LuqropZOXZq7P0szd/7c DaBaID1tZFaAQrybe1rkKQ5sZaxj1REkXtAAyLN0yXqB5z9zqkzAflEfF3sFmGGEG8hA Xn5A== X-Gm-Message-State: ACrzQf1cNxaS/cUsYylyts5P9V1FRp871hJ4UYKqggSF3kE6AA1p1yCc pkFaNkiC8wVyWGZkQDBnYmmdswk1lpR+iZL8Ud0aJluF X-Google-Smtp-Source: AMsMyM7aYRHoVXTRgBdsvwX0vR+0w+4wsnCcLOsIJce8ecAafFY4vHHNzNDGNQtyvSCcy4gEgQoDiwNOTHebpLVZoBs= X-Received: by 2002:a25:9885:0:b0:6b3:e9a7:4952 with SMTP id l5-20020a259885000000b006b3e9a74952mr14483612ybo.294.1663752594827; Wed, 21 Sep 2022 02:29:54 -0700 (PDT) MIME-Version: 1.0 References: <7930779c-1782-4ecd-8e3d-42ba9e199bdc@www.fastmail.com> In-Reply-To: Date: Wed, 21 Sep 2022 11:29:43 +0200 Message-ID: To: =?UTF-8?B?TcOhdMOpIEtvY3Npcw==?= Cc: Larry Garfield , php internals Content-Type: multipart/alternative; boundary="00000000000068af6205e92c9693" Subject: Re: [PHP-DEV] Re: Issues with readonly classes From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --00000000000068af6205e92c9693 Content-Type: text/plain; charset="UTF-8" Hi all, > When I was working on the readonly class RFC, I realized that the readonly > keyword very naturally fits services besides value objects. So my > expectation has been that until we can fix the issue with cloning, people > would mainly apply readonly to services. Not that it is very useful, but I > would also feel some kind of weird fulfillment by doing so. > > Regarding cloning: I created a WIP PR not long ago to fix the > aforementioned cloning issue, and I'll pursue a readonly amendment RFC in > the coming weeks (or month) containing the long awaited improvements for > cloning (hopefully together with the "clone with" construct) and possibly > with this inheritance-related change Nicolas proposed, unless someone can > come up with an ultimate counter-argument. > What's your take about 8.2? As I demonstrated, readonly classes are broken because of this propagation to child classes. Does that mean we should remove this constraint from 8.2? What about reverting the feature and considering it again for 8.3, after fixing it? I'm looking forward to your work on cloning! Note that "clone-with" or similar is a separate issue from the current inability to clone readonly properties within the __clone method. It might be easier to tackle them independently, from a discussion pov. Cheers, Nicolas --00000000000068af6205e92c9693--