Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119004 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 30475 invoked from network); 14 Nov 2022 12:00:37 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Nov 2022 12:00:37 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id B99F01804BA for ; Mon, 14 Nov 2022 04:00:36 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 ; Mon, 14 Nov 2022 04:00:36 -0800 (PST) Received: by mail-pg1-f171.google.com with SMTP id h193so10036984pgc.10 for ; Mon, 14 Nov 2022 04:00:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=hooH73elpkzOaXMqVRQk15jkfdR2PpkaothXa4OlPIg=; b=LIqcKNBDAE2KPzrDbegiV1QkV98n8u5J6mqHPptVYnNaXK4iRMdqbu6XG4uLou+JMu /bMzG/0hExbq0tYe+4UV54k9NVI0x2jOnEWab3z1zRP05M9/qmJ92d47UfxATEdlkXgi ZKx17XKv8ysJXv/NIz0GlsyExETlmcxp4fWjZf9rhNky9W+nU6DUADOw6rC8BhWuvcTg xhbjbLtJVhUisejbze/SM25uGJsMCg26wpIB/rDrOjt+tdipYZMoD/Vx8eD7vttvW450 JHPCoKuY9BSIkfrTOED8ZT381hSqFCxNTxuNT8AIKUlCgLtSOtkIAxJR+0VAEGgxnIUO i80Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hooH73elpkzOaXMqVRQk15jkfdR2PpkaothXa4OlPIg=; b=xAfeetpD5Ep1ldZq44+WEl3D5eRn1oVPtnVpcI60Ugex+XF0ichOnuAW+sK1ADIPYE 9TzVU5LMghf4Nu9UuBXeh+7J5Yq1AxiHKNpIKFnstD0HPpQuEYaDmRJxWPpwEe/qVhty P9D1D9Ioh0HTI5fxjHgVwOubGhI3BK/gPygSUhIAmcAribxILLQou7BZR0TIp5oLP8Hn vv6sAw3Wi+1BVWpWl/XitTHhO3lFj+rP1moJlT6IRxF4TwC2fE6Dg3hHmSN+2Jfor1nt oupGn1iybUJzKgf3CQWI0ZTBgryYe76HDIC5lpCUDno/MMwxm3WblksmhqC10aSMHSkk uX1A== X-Gm-Message-State: ANoB5pkn4OD75uFr7VhUKUM1xADQj0hY9+6GmrxQyENB8vJRrVK4pnlI CVmKSRPSj5OfwXNCX30PXU4A7nMnnjIR2VqWx2QWlrpWqSw= X-Google-Smtp-Source: AA0mqf5Ms/saFzguBwjvxiAsTZxqy8rsrm7syZ2TiObiRO4lEEZC2AQ5MiijiSZfiEsEhoWxYD7amKYovz1kqih4WWU= X-Received: by 2002:a05:6a00:1814:b0:56b:b5f4:7c63 with SMTP id y20-20020a056a00181400b0056bb5f47c63mr13706478pfa.11.1668427234700; Mon, 14 Nov 2022 04:00:34 -0800 (PST) MIME-Version: 1.0 References: <0854b030-c51c-4c1b-a7dd-22835a1e5da9@app.fastmail.com> In-Reply-To: Date: Mon, 14 Nov 2022 13:00:23 +0100 Message-ID: To: php internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, with readonly From: tovilo.ilija@gmail.com (Ilija Tovilo) Hi Derick > > As I understand it, you=E2=80=99re suggesting that a property declared = as > > `public protected(set)` would never trigger __set(). > > I would think that that would be against our current practice, which is > easy enough to explain as "if the property isn't visible set, > then use __set()". I would argue that "protected(set)" marks a property > as invisible from a non-inherited class/method, and hence __set should > be called. What you're describing does not match the readonly behavior. https://3v4l.org/X76pV Readonly properties only call __set once they are explicitly unset. The same applies to __unset. I changed this in the asymmetric visibility implementation recently to match this behavior but the RFC has not been adjusted to reflect this yet. AFAIK this behavior is there to allow calls to __set for certain edge cases. While not very intuitive it makes sense to stay consistent. If this behavior is undesirable we should change it in both places. Ilija