Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125783 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 160BD1A00BD for ; Fri, 11 Oct 2024 08:32:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1728635679; bh=BYhyQ3j3e4yn8s/RI52JIJ87wHMnfGWa82OoJDvtV3M=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From; b=c+d0iSN7FB4iAfC9rnXvGtVekwjhKCpyIuxZUwTL+lAO5/C7qtKflCOaz6QTAAJrd g9LP+AKFiNfXssfwdyiT24aetFau65cpdedzlDACOG7MLJ9/QkQNxnGt3hlIKpnaDE 52zc8j6/64uwuoOeoEICH9+yaxJVoyo5Q6VnOC6zL5mf0QZUscR7VrxU33h3jQ49pN 2qFJuXCBzcouAJcZ8LchhtiAKIIkmPNMqB5odJkuzgfe5Eu25rkGamff6ly4LXZlqH iplZaJZXbix7gJdtm+JN+KbRkeYLFtNCP5v/qrqlbOtlT+ce19YDQXuaMI9jAesLMG RCEZyFdHtwv9A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 35F4F1801D6 for ; Fri, 11 Oct 2024 08:34:38 +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,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a1-smtp.messagingengine.com (fhigh-a1-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, 11 Oct 2024 08:34:37 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id E66141140102; Fri, 11 Oct 2024 04:32:18 -0400 (EDT) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-01.internal (MEProxy); Fri, 11 Oct 2024 04:32:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:cc: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=1728635538; x= 1728721938; bh=BYhyQ3j3e4yn8s/RI52JIJ87wHMnfGWa82OoJDvtV3M=; b=s U0lp4n8SF5h8eQdW+K5Hs/Buq8xm6wUKym13OzfFahDEGNLqHt1kQ4ekE2V/HGZx J5AeonhtTm+LYpfMjuX+fyghIfcQPylj8ilYEzT+R5aAtFM9R8skmkZ3fvHeMKas Dx+tUmW9LieBIAF/QMRa/qbF6XS9KxapIRCqKHc1dMO1KqucnPsEavZbnRWu9Svr Npr1c3wImebsZ1dpgjaMKHojOFXQNRYOkcAnKNZNPGKhmokZdCF3TRqQgrNHNdiX xrbow7Icxdpcoh9WXp3jafXjSi163Te1HFF7J8PFW5dPrW2KYTbgbapXAY192yw6 UMDRRktguFkZhtfpynOPg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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= fm2; t=1728635538; x=1728721938; bh=BYhyQ3j3e4yn8s/RI52JIJ87wHMn fGWa82OoJDvtV3M=; b=YZb1+8blvJJfMBGwSztYAcSaDdzgrb6jR+mjEEC+lLHw IxgyIHAZyWT4MRVKeIVZGL9CdAmtIHC+sFheM5+rKNNdpheoONORdrlbhHHsHtV5 VqDkUtayOpL/AKVzwKb6VH+4ENJgPP4FvbHP05J168Wwg2dEZ3Eb4ne3GCdMzk+c bfR5xwnyqB/47gBEIn6wL1p8gp8bQVRGv5Eo+8hqfouQR0Hg1/SnVEd7t+BmlBAy U/LUNLAPgo8qrGbvYOQ4ocDUJ6gijdjjJwnJMDed+YOvGHyHR/HYdfULfl8lZCHQ x34ij8NA3uJgn1OiK9eIhXZxyiTvDmWs34cS/LJi+A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdefkedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgesrgdtreerredtjeen ucfhrhhomhepfdftohgsucfnrghnuggvrhhsfdcuoehrohgssegsohhtthhlvggurdgtoh guvghsqeenucggtffrrghtthgvrhhnpeetieeigeejffffhefgiedtjeffgfefuddugfef ffelhfekhfegvdfgudejffdutdenucffohhmrghinhepghhithhhuhgsrdgtohhmnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprhhosgessgho thhtlhgvugdrtghouggvshdpnhgspghrtghpthhtohepfedpmhhouggvpehsmhhtphhouh htpdhrtghpthhtoheptghlrghuuggvrdhprggthhgvsehgmhgrihhlrdgtohhmpdhrtghp thhtohepuhgurghlthhsohhvrdhvrghlvghnthhinhesghhmrghilhdrtghomhdprhgtph htthhopehinhhtvghrnhgrlhhssehlihhsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 7E995780068; Fri, 11 Oct 2024 04:32:18 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Fri, 11 Oct 2024 10:31:51 +0200 To: "Valentin Udaltsov" , "Claude Pache" Cc: "php internals" Message-ID: In-Reply-To: References: <2A7CF24F-3AE3-4125-965F-C65431C42DFB@gmail.com> Subject: Re: [PHP-DEV] Asymmetric visibility is a BC break Content-Type: multipart/alternative; boundary=470986bcfd4347f5a5bb119929185864 From: rob@bottled.codes ("Rob Landers") --470986bcfd4347f5a5bb119929185864 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thu, Oct 10, 2024, at 15:32, Valentin Udaltsov wrote: > On 09.102024=E2=80=AFat 19:20 Claude Pache wr= ote: > > There is no BC break, in the sense that code that worked under PHP 8= .3 (and therefore use PHP 8.3 features only) will not break when run und= er PHP 8.4. > > > > Of course, code that makes assumptions that are true when using PHP = 8.3 features only, will need to be adapted as soon as PHP 8.4 features a= re used. This is unsurprising and expected. >=20 > Hi, Claude! >=20 > Thank you for the explanation. I now get why aviz does not break BC :) > Until now, I was worried that we were missing something important. >=20 > > That said, https://github.com/php/php-src/pull/16209 is interesting = to have, but not mandatory. The current `ReflectionProperty::isPropertyS= et()` and `ReflectionProperty::isPrivateSet()` might be somewhat confusi= ng at first, but they are sufficient in order to obtain the needed infor= mation. >=20 > Yes, they are sufficient, but very difficult to work with. Just to > check that property is writable from global scope, you have to do > `isPublic() && !isReadonly() && !isPrivateSet() && !isProtectedSet() > && (!isVirtual() || hasHook(PropertyHookType::Set))`. > See our discussion with Ilija: > https://github.com/php/php-src/issues/16175#issuecomment-2389966021 >=20 > -- > Valentin >=20 Hello all, I am still struggling to understand how this isn't a BC break when it mo= st obviously is. Sure, code that worked on 8.3 will continue to work on = 8.4. In that case, we could have argued that my function autoloading RFC= didn't have a BC break, because proper implementations wouldn't have br= oken. To me, this is along the same lines. A "proper" implementation won= 't break, but there may be subtle ways that "improper" implementations w= ill break and thus it should be considered a BC break. =E2=80=94 Rob --470986bcfd4347f5a5bb119929185864 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
On Thu, Oct 10,= 2024, at 15:32, Valentin Udaltsov wrote:
On 09.102024=E2=80=AFat 19:20 Claude Pach= e <claude.pache@gmail.com> wrote:
> Of course, code that makes assumptions that are true when using P= HP 8.3 features only, will need to be adapted as soon as PHP 8.4 feature= s are used. This is unsurprising and expected.

<= div>Hi, Claude!

Thank you for the explanati= on. I now get why aviz does not break BC :)
Until now, I w= as worried that we were missing something important.

<= /div>
> That said, https://github.com/php/php-src/pull/16209 is interestin= g to have, but not mandatory. The current `ReflectionProperty::isPropert= ySet()` and `ReflectionProperty::isPrivateSet()` might be somewhat confu= sing at first, but they are sufficient in order to obtain the needed inf= ormation.

Yes, they are sufficient, but ver= y difficult to work with. Just to
check that property is w= ritable from global scope, you have to do
`isPublic() &= ;& !isReadonly() && !isPrivateSet() && !isProtectedS= et()
&& (!isVirtual() || hasHook(PropertyHookType:= :Set))`.
See our discussion with Ilija: