Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124525 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 qa.php.net (Postfix) with ESMTPS id 9D6821A00B7 for ; Sat, 20 Jul 2024 21:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1721512071; bh=2IdDAyOqHadOX8zV7hUnhlF2tZqQMAsHjInWpAlc/0U=; h=In-Reply-To:References:Date:From:To:Subject:From; b=GKopIrHZ+LXN8FDkjK+Z7c/ltNNrnGcMwCnWPswMVvI4kf4pJaITXBxfRTmhYIdgK FJ4eqnQsQta4dg2KUaGzRQoKWDQm7sqUupBeJp1d88PpTzE/DO9Jq4UG6IPQeqYKdw CjIn1Ao4AApg7sluWmnd1AUIET1ywE6fUSxarkWALaYQs6UFM1hZQWe070C4Kfx4iY dj3QrY7EvAkIi3DuBnffpFJ68KJWe4DLena5ZxoGKMPIXWAciVHWpi+dJb8rFvtVeB bVymtwfPBpNdDEVdChn1y7qTcr5QZ5PF9HFXK3s8e5SdXg6QJ/jldisgxFl9QcOQdA B/5Na0izitszw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 49AE618004B for ; Sat, 20 Jul 2024 21:47:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fout1-smtp.messagingengine.com (fout1-smtp.messagingengine.com [103.168.172.144]) (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 ; Sat, 20 Jul 2024 21:47:49 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 32BEF1380127 for ; Sat, 20 Jul 2024 17:46:17 -0400 (EDT) Received: from wimap23 ([10.202.2.83]) by compute5.internal (MEProxy); Sat, 20 Jul 2024 17:46:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1721511977; x=1721598377; bh=wv493MUFoO0VLxeoHEXBQ k/kqtn9I+bIf+DsP1lyDKA=; b=QOncVgJeHwFw65azXgOVGIAMAbh7io4l2OUUv knv3MoyU9BKU8xe//ZTsE21ZZfj2LK6O+hNw4GvrtK4S8PRInJP26szdNOJ0i/qY GtNthm+Zl6CvqP51GPtXKAgB751a71KajmxmhFFH8H+gNeICbxYX5wplNbLexKZc WtHgjGHqniEdS2M+g/Arhma0olvFZKGDfBB4sh/Tw+tVTswKL40x8jL5gLg0UOqd M5fScttHB1vedDTzmZ8FALyo0+hWEwBk4sgSfGebz8jkzoH2zIMhhl2zsynq7+9h e4nTGq6NHZK8E5QwkckjisHKyh+ol+CkAXQeLWH3+3+BI1blw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1721511977; x= 1721598377; bh=wv493MUFoO0VLxeoHEXBQk/kqtn9I+bIf+DsP1lyDKA=; b=f d67DVgYoXtdUOSNbOgDZ8xmhoou+PvtBjip6Pt6tk8bestLz3v56+TBU2jQAsj7S hhaJpGBoyrL1HzkPizoo4uwSJTkUq3zIZlCnpJ0UGh5IL1rcjzcQDaTZ7wDbCFWa DEmpQt8NccsEqpyvKZNWTp5UtE5IgxaHHN2fwtJpP6sL7Qo7YpuCgPI4LeMp3nLb TmY2J+950q3GSijgLbCzabNlIpt1c1sI4+zgqvrh1E2ipsus8+UN8tOGRbPl39zo s5hd6GNN1Tn/DIJD40FFCiswXamLXo9eCHUR9VaqJI3Tfl7pqqNZALILqz7VR82O BjaVK9F+fYjrl9qnB3l6A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrheeggddtudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdfnrghr rhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrdgtoh hmqeenucggtffrrghtthgvrhhnpeeggeehgfetjeehgefggefhleeugefgtdejieevvdet hfevgeeuudefleehvdetieenucffohhmrghinhepphhhphdrnhgvthenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhi vghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id B75CE2920062; Sat, 20 Jul 2024 17:46:16 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-568-g843fbadbe-fm-20240701.003-g843fbadb Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Message-ID: <72182670-f9c2-4a6b-a124-6363140c06f3@app.fastmail.com> In-Reply-To: References: <0a6a61cd-f203-4dea-a7f8-97e6b885c52d@app.fastmail.com> <284c6693-d9bf-4495-adc1-3cc8d5e54ee5@app.fastmail.com> Date: Sat, 20 Jul 2024 16:45:56 -0500 To: "php internals" Subject: Re: [PHP-DEV] [RFC] Asymmetric Visibility, v2 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Sat, Jul 20, 2024, at 10:47 AM, Ilija Tovilo wrote: > Hi Rob > > On Sat, Jul 20, 2024 at 3:47=E2=80=AFPM Rob Landers wrote: >> >> On Sat, Jul 20, 2024, at 03:14, Larry Garfield wrote: >> >> On Wed, May 29, 2024, at 2:15 PM, Larry Garfield wrote: >> > >> > https://wiki.php.net/rfc/asymmetric-visibility-v2 >> >> Hi folks. After a side quest to polish off hooks, we're nearly ready= to bring aviz to a vote. >> >> We've made one change since we last discussed it: Specifically, Ilij= a realized that __set's behavior is already inconsistent, so supporting = it for aviz properties with invisible set would make it even more incons= istent, not less. For that reason, we've changed the __set behavior suc= h that a non-readonly aviz property will not trigger __set. Further det= ails are in the RFC, but in short, all of the use cases for that behavio= r now have better alternatives, such as property types, hooks, and aviz = itself. So there's really no point to falling back to __set in edge cas= es. >> >> https://wiki.php.net/rfc/asymmetric-visibility-v2#interaction_with_se= t_and_unset >> This is a pretty massive breaking change. > > There was a miscommunication between Larry and me. The change is not > to any existing behavior. __get/__set are currently called under two > circumstances: > > * The properties _full_ visibility is not met. > * The property was explicitly unset. > > We're not changing this behavior. Instead, we decided not calling > __set for asymmetric visibility, when only the set visibility isn't > met. Before making this decision, implicitly implying protected(set) > for a readonly property would have led to __set being called (because > the scope protection now comes from asymmetric visibility, rather than > readonly itself), which would have been a change to the current > behavior. > > So, in short: If only the set visibility isn't met, we're now throwing > an error. This is consistent with readonly today, and with get-only > hooks. If somebody wants to change this in the future, they can do so > without any BC breaks, and most likely should make the behavior > consistent across all of these three cases. > > Ilija After discussing with Ilija further, I've rewritten the __set section (a= gain). As Ilija said, the long and short of it is "we change nothing", = but leave the door open to clean up __set's behavior in the future, once= we decide what cleanup is warranted. --Larry Garfield