Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123480 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 A5E891A009C for ; Fri, 31 May 2024 21:00:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1717189278; bh=ADhoNJUbU1WbUKCGDwEWA9X4WFG3MN5wwu+eHoouQ90=; h=In-Reply-To:References:Date:From:To:Subject:From; b=MHOyaKOMfCea50k/WYU+u6ruX7NC2xNa5lFKDrHdoScRUHsA+g/t86v2B6u4hckrh EDYiAn7N9b224+l7+w9wytGdJVtGYjmwx85gM28he3mCS15t3zn2nK8Tg+p61CxrDL 6aIIroTy43Ej4j1UAngFg9nxpyoTPb4cmPfGDW6+AhikbgafeiaOnPdS84eSUVe/YZ YbtkeirRGYTqs9CfkFe43nQUz0LGllmSN5jOHTg23ScLEWvczR/iAuGvt2EF2B0Riw AaZzTsQAJxgyOi/qp6KxSc01bWbnz6XnSXNVjln6gApdcOPzVESQexkX54n3kE/U68 9zU9L8YgJwdMQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2DCFA18006D for ; Fri, 31 May 2024 21:01:17 +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,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from fhigh1-smtp.messagingengine.com (fhigh1-smtp.messagingengine.com [103.168.172.152]) (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 ; Fri, 31 May 2024 21:01:16 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 56BDD1140157 for ; Fri, 31 May 2024 17:00:14 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Fri, 31 May 2024 17:00:14 -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=fm1; t=1717189214; x=1717275614; bh=YvsVwyg0nwwf5TWVz/GVh 5cArQsGYTlC2Tu4WDs6ovw=; b=KKY1OKHzCEJLswVHedyWWa6Cs7+8KpN53X+xj +z1sAsodxQXtu+zW9GO7FABDjJ4uyJOr4t6jpkw4jlprw6xumybHQ0SOUFsGjrhG Q/ve7e9yVcGcaT914MTQUJfcaZTq0Gxi+LL2ni47JBlanyeU4hbqlkq5ozHLijgK OtAW3jfLu1Rwf/2JziiDApC4WeYVRkOw9h1l6i1sDLqmm3bYCoZRBtK9ZxVC/JiT nGkTr8cUjx5m35HswBAaWvqDF7i4zjEKH+D8rLovBX/gjz3pR4qaQs/qRIu5oTR6 iRJGER0KDPs6KVOmXjG1e0eKP2HqknWHEQrYyOZstIoDndb0A== 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=fm1; t=1717189214; x= 1717275614; bh=YvsVwyg0nwwf5TWVz/GVh5cArQsGYTlC2Tu4WDs6ovw=; b=P cDshpFADHxFbExu2R+qJrH1WvP06P5/pQ2/FkB+vO2emf4uK5e27pM1Syyby75Sa pozSfXSKRcZc5qWXspSTpa2XyfmjXwp9BOR8aKeTY8UZ3a8T6QQNaLcUefT0A1v1 1PoVeH43lti7gV1MCb+ySH1TFAyLPZ1fhLlRsyql2mh8uuTlKHaHGdfuntyt+S1w T7MoEBjgBV1/uzvuQNdrSHdrewp0BfqUGwChAJdR/I2RL9FPK7XXUB5fNr8RMaVI lpwD+CpqBTtJA1yo+m6/tq8UPfsY6vWBI9bygS5wQXRMsZ1rC2k8pCPeBohoAA3H mLTRkiq6Yv0lNRiR2H0Ow== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdekiedgudehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvufgtgfesthhqredtreerjeenucfhrhhomhepfdfn rghrrhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrhhfihgvlhguthgvtghhrd gtohhmqeenucggtffrrghtthgvrhhnpeffffffjeffudfggeevvdeitdetvdfgjefffeff jeelfeejteevheeghffhvdfgleenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 0CD3C1700093; Fri, 31 May 2024 17:00:14 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-491-g033e30d24-fm-20240520.001-g033e30d2 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: <89b695d7-661f-4c1b-ac4c-4480ad158e83@app.fastmail.com> In-Reply-To: References: <0a6a61cd-f203-4dea-a7f8-97e6b885c52d@app.fastmail.com> <734bb8e8-2fdf-4e50-9039-e53c99ee4930@app.fastmail.com> Date: Fri, 31 May 2024 20:59:51 +0000 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 Fri, May 31, 2024, at 5:45 PM, Claude Pache wrote: >> Le 31 mai 2024 =C3=A0 18:08, Larry Garfield = a =C3=A9crit : >>=20 >> However, this also brings up another interesting issue: readonly prop= erties (in 8.3) DO allow redeclaration, essentially adjusting the proper= ty scope (the class that declares it) to make the visibility check pass.= That is, the definition of the class it is private to changes, which is= different from how inheritance works elsewhere. When the parent writes= to the same property, a special check is needed to verify the two prope= rties are related. All that special casing effectively means that reado= nly in 8.4 wouldn't really be "write once + private(set)", but "write on= ce + private(set) - final", which is... just kinda screwy. That means o= ur options are: >>=20 >> * A BC break on readonly (not allowing it to be overridden) >> * Make readonly an exception to the implicit final. >> * Just don't allow readonly with aviz after all. > > Another possible option is: > > * Make readonly be `protected(set)` by default. > > That would weaken the originally intended semantics of readonly, but i= n=20 > a compatible and acceptable way? > > =E2=80=94Claude Only sort of compatible. It would allow readonly props to be redefined,= and wouldn't break any existing code, I think... but it would mean any = time you use readonly, suddenly a child class can come along and mess wi= th it out from under you. In practice that's likely not a common concern, but it is a behavior cha= nge. I think it's possible (I need to confirm with Ilija), if we want t= hat slight BC break, but I don't know if we do. --Larry Garfield