Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122624 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 E394B1ADB07 for ; Tue, 12 Mar 2024 16:54:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1710262464; bh=PfMChUtNm92rvLCiwqw7x6BXGCAQ9P2r5wb/UoMk7J0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=mmIZOvLOdUf4fVxBLp45KoH3/HOVYfrSHJLjSdYnEY6GzDsOX9i0RwuQodzOynYk8 ArwYx/8MyMSfo1xOfh/wBnKCeIDz0iVes2gr14fhlwMvG4Qnr3NKsXbrHbDuS2qEya i9IS4Lw45PMVCXP/TAlghzaC9X1JVoNRQusdEUIyuozzeM5rxOvwr78jgAFF7cur4C bLkPt9z1sfQu+oN3YFXhJdhxwiXPzsFFQAgyCflrO1ih5JC3wmdkqwQZw7GKiQAhOa dpWFLUD+bVoVJE5ggMg9QxNFViZIUNl6GDUCY67LTDLCtJhiplaASxGnWiKYpQ1s+E SY8uWdRQBnmLg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C52E9180630 for ; Tue, 12 Mar 2024 16:54:22 +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.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,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=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com [209.85.219.171]) (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 ; Tue, 12 Mar 2024 16:54:20 +0000 (UTC) Received: by mail-yb1-f171.google.com with SMTP id 3f1490d57ef6-dcc7cdb3a98so67688276.2 for ; Tue, 12 Mar 2024 09:54:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1710262443; x=1710867243; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=jnrix0LO1IFKjhv2e8hniQnLlak10cqGP9QRGsdp238=; b=GLcVuSR9cO2mMkOHbwMsIovnS6pSCOXZzYFYz9c2jYnsZzUB2wMCjywaUBDre+Yakb fBK+w3U6lNYsBu0r7YLBNj76bj5zLv/I1JssjaL6l1vHjX88CUp+fYzuFbpYdNuyeO0+ Jmhjphj/cRKvfxKIlNyJhD5PRRY2Y/1BAaDYaHAefCp7jISGpIaSHJOVHsFoeLwSp4EU 6q2gntgd1o9I1Q9sjBU5/h4et1whA8EQFNR8VQAAkhXX2upVUDiCIk8HCTc2xOytfc1z ok+jkJTebyNUBOVwO2P+ixF/gIqYoZ8OzcOLheGT+a6NQy152ZLaR5G23tG4j3JPp3y8 zP3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710262443; x=1710867243; h=cc: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=jnrix0LO1IFKjhv2e8hniQnLlak10cqGP9QRGsdp238=; b=hOtGtU0GoRx4Hr8tOMuT0askak/xcKJFa0Vkzbvkys2InCqKwZ+K+21dtaK6VPXCMB +DcwGIB0URL4hF+osNPl+BdGKQaCFiO5NHpuRg1aN4qzjFgtkvkSoV4bZCgJ3Kq5JOfl WBTNM/Rd3G3qVC/LkiULnYhLy7PdcZzP4XONUr6S+NCuAxT7oWyA/8D0Yeqro7bt5ohq BBBY9lj9F4E5lOnOvvAK9KobfaZ5JHUqL/c0Zk2y2lgo8Be5G/OhTNUSLnDTlRL3ghR3 +vTn81jFSfvenzzNu1HNR62ENhOfWF8OeyntzVubsIDXBDyElHlvRmxy8lxad2r36D9H cSqw== X-Gm-Message-State: AOJu0YyMzEg3BK8CHmW2GtZHKpZzXEEGuet5ZgpFtgWtKK1C7yWvxSsK VwCPzNNy7jkPrdrY0+I7W9/NNOCgkel8CL7ssWoyXs97U+T8gObm8GneXW+Ns2Fy1ssd0lsm5AM XiHr66hHufDssphhovt+IHZ0sS8XDB4sypDE= X-Google-Smtp-Source: AGHT+IE3vDIlOKcu5L+zB3GaN7wq0hFcYPHeJzF6Z8YdIQYqZJWtvAqMkRwpnWYQ32ILHVbdExVzmHiINdkN8EueUME= X-Received: by 2002:a25:1655:0:b0:dc7:451b:6e33 with SMTP id 82-20020a251655000000b00dc7451b6e33mr9739ybw.46.1710262443270; Tue, 12 Mar 2024 09:54:03 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: <87171309-BD28-4292-A502-93DC720F445C@koalephant.com> In-Reply-To: Date: Tue, 12 Mar 2024 18:53:45 +0200 Message-ID: Subject: Re: [PHP-DEV] [RFC[ Property accessor hooks, take 2 To: Larry Garfield Cc: php internals Content-Type: multipart/alternative; boundary="0000000000006769b8061379812c" From: drealecs@gmail.com (=?UTF-8?Q?Alexandru_P=C4=83tr=C4=83nescu?=) --0000000000006769b8061379812c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Mar 12, 2024 at 4:36=E2=80=AFPM Larry Garfield wrote: > On Tue, Mar 12, 2024, at 8:49 AM, Stephen Reay wrote: > > > Hi Larry > > > > Thanks again for both of your work on this, I'm really hopeful this > passes. > > > > Was there ever any further discussion/resolution/decision about the use > > an explicit `virtual` keyword, and the related flag for creation of a > > backing store? I thought it was discussed by several people but I don't > > recall seeing any eventual consensus, and it looks to my eye that it > > hasn't changed from the original proposal: i.e. it's 'magic' and > > `$this->{__PROPERTY__}` won't work? > > > > Is that correct? > > We looked into `virtual`, and considered it, but determined that it > wouldn't actually work because of inheritance. Details are in a new FAQ > entry: > > https://wiki.php.net/rfc/property-hooks#why_no_explicit_virtual_flag > > > Nice that you added the details there why explicit virtual is not a good idea. So, if the parent class changes between virtual and non-virtual, while the child class is virtual, the only tiny BC break will be in the reflection as we will see a change between virtual and non-virtual? Alex --0000000000006769b8061379812c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, Mar 12, 2024 at 4:36=E2=80=AF= PM Larry Garfield <larry@garfi= eldtech.com> wrote:
On Tue, Mar 12, 2024, at 8:49 AM, Stephen Reay wrote:

> Hi Larry
>
> Thanks again for both of your work on this, I'm really hopeful thi= s passes.
>
> Was there ever any further discussion/resolution/decision about the us= e
> an explicit `virtual` keyword, and the related flag for creation of a =
> backing store? I thought it was discussed by several people but I don&= #39;t
> recall seeing any eventual consensus, and it looks to my eye that it <= br> > hasn't changed from the original proposal: i.e. it's 'magi= c' and
> `$this->{__PROPERTY__}` won't work?
>
> Is that correct?

We looked into `virtual`, and considered it, but determined that it wouldn&= #39;t actually work because of inheritance.=C2=A0 Details are in a new FAQ = entry:

https://wiki.php.net/rfc/propert= y-hooks#why_no_explicit_virtual_flag



Nice that you added the details there = why explicit virtual is not a good idea.

So, if th= e parent class=C2=A0changes between virtual and non-virtual, while the chil= d class is virtual, the only tiny BC break will be in the reflection as we = will see a change between virtual and non-virtual?

Alex=C2=A0
--0000000000006769b8061379812c--