Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123840 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 A06FA1A009C for ; Tue, 25 Jun 2024 20:01:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719345745; bh=f2bIV7ML86LQ0ucdFeR+rEUpyI8WjI9FrVR9mdEJLCE=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=EsupiIix8UluxcnE8jccCUMs4tZ9zuI6D67FsUqrP0M73jdF4BHujmXHHL+gFuFTa 2CFbcfSp5IOfRVGqMMo2PhBoB/mDcDAZjAQzghzAk0b/v9fdVfqYXeLBxjdaNOOwlT o6QQB0kkj7lylvYyL5L2F9a4VPMOAmbHaINr3SXUxYljBMSbI5qe0kNgafOJBRH1iL oF7QeJpymxMwG5Z4PqxLgamE/ZB9zoLVACKiLhKRyqiwhSGLSI0J4wsVc0dOHnjCnn pdZIB0i6ajOMHt+zduYbfYVFR1wF7lTmxLdNPNuOfXWkNrG9/0jnhOXm0kcamGj6gQ GVK5SQJyohBPw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 005A91801EE for ; Tue, 25 Jun 2024 20:02:21 +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.8 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DMARC_MISSING,HTML_MESSAGE,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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 mail-ua1-f53.google.com (mail-ua1-f53.google.com [209.85.222.53]) (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, 25 Jun 2024 20:02:20 +0000 (UTC) Received: by mail-ua1-f53.google.com with SMTP id a1e0cc1a2514c-80f4fc0f0aeso1408957241.0 for ; Tue, 25 Jun 2024 13:01:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20230601.gappssmtp.com; s=20230601; t=1719345662; x=1719950462; 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=MtYg+5zEMPFrkPror93nb2uwLJgU4oQ4whPw9RuIc8c=; b=EVF6xjWgqNnMU5Tf7xDfdiXSpq7PAs256JECBCy5EYUcGB4QRKwJVZHamtkkcoIye9 9oIb94ahuMStW4ZxlV17Uu3HYQMzFs03kSVrbl+6RXzkRbSrNVFBvUfeW/2/kvNQp6Vq 5k7vt8P0jM+8TMY4XCMKG8zfmTM1wcWBtV94vk/gRVyGCBvVMI1PCduqzpWgtZ+2CrZo e/V5Z+QRxNeJLv8HVGg5HTI2mFe5kzRd/1Vs2iInee8pC6Ezjm0L/CGsyUNSsOyIjfOq GxBs25zsQ0URHEzW0RrCQvaCk/QgCYbfZDJUHNdtri0bXcmtqQ3x+HJTieuBFl+PXMRq FPpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719345662; x=1719950462; 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=MtYg+5zEMPFrkPror93nb2uwLJgU4oQ4whPw9RuIc8c=; b=Mvra3gQJUkkpUynuLpd7s39cjrRsKyCxytZ2oCs2xMDmqN03cmy+boCLhjbRMk6VmB ftlL6ypyVqdNHwX9CMm/djYvFmenOrLrNEZNLnYoiFoxHBdwgVK04UjqsEl5+TWgjTqe 0p8TalA4uXVnkep+Zuhbb3BmgQGJ95kv5rhm6v7tFkSqLriiVWZh61eqt45LvNKmnWu7 Q98wt20P+uBybue1mXKKrr31AMZC09CuPwLI0yBJ83e2upSMJ0pViYKjJpQJ5uWvaMtH 8n01yr16nXb+jysMHjtPmmZQe143RLvcylkX7CskueqC+LqZoGt0n4iF0n6gOJ7wtI0V jXCg== X-Gm-Message-State: AOJu0YzTQhqqDxQic7e/fZaASQf86fJ43szwZuYmWGRGpiY2lTy6cDAL XEfPAlZzYrQAbx4rSe0oVa7g5ik9Yy8itUAhslVUXroHIIDaVdhMCvlGW/4tnYXdTFJ0+kha2xp R762j5/qwlo1G2xRTTqrnZGm0r74bBJDmEYbtXA== X-Google-Smtp-Source: AGHT+IGkFbYoxTzUhpeSM8HG3HAqIdicPEBOqYLDXAYSbyM9XdK9auj8H8J9mqbgI2yQp8qch9VPkufFIMTFx/rWyYw= X-Received: by 2002:a67:bb17:0:b0:48f:461c:ab86 with SMTP id ada2fe7eead31-48f52a89cd2mr7699443137.12.1719345662573; Tue, 25 Jun 2024 13:01:02 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 25 Jun 2024 22:00:50 +0200 Message-ID: Subject: Re: [PHP-DEV] Re: [RFC] [Vote] #[\Deprecated] attribute To: Nicolas Grekas Cc: PHP Internals Content-Type: multipart/alternative; boundary="00000000000076d8be061bbc5b24" From: kontakt@beberlei.de (=?UTF-8?Q?Benjamin_Au=C3=9Fenhofer?=) --00000000000076d8be061bbc5b24 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jun 24, 2024 at 5:07=E2=80=AFPM Nicolas Grekas wrote: > > > Le mer. 5 juin 2024 =C3=A0 10:18, Benjamin Au=C3=9Fenhofer a > =C3=A9crit : > >> >> >> On Wed, May 22, 2024 at 9:22=E2=80=AFAM Benjamin Au=C3=9Fenhofer >> wrote: >> >>> The vote for the RFC #[\Deprecated] attribute is now open: >>> >>> https://wiki.php.net/rfc/deprecated_attribute >>> >>> Voting will close on Wednesday 5th June, 08:00 GMT. >>> >> >> The #[\Deprecated] attribute has been accepted with 23 (Yes) to 6 (No) >> votes, 79%. >> >> >> The secondary vote to include Deprecated::$since has also been accepted >> with 22 (Yes) to 1 (No) votes, 96%. >> >> >> Thank you to everyone for voting! >> >> >> Tim will finalize the implementation PR now and work on its merge in the >> upcoming days. >> > > Hi Benjamin, > > The vote for the RFC #[\Deprecated] attribute is now open: >>> >>> https://wiki.php.net/rfc/deprecated_attribute >>> >>> Voting will close on Wednesday 5th June, 08:00 GMT. >>> >> >> The #[\Deprecated] attribute has been accepted with 23 (Yes) to 6 (No) >> votes, 79%. >> >> >> The secondary vote to include Deprecated::$since has also been accepted >> with 22 (Yes) to 1 (No) votes, 96%. >> >> >> Thank you to everyone for voting! >> >> >> Tim will finalize the implementation PR now and work on its merge in the >> upcoming days. >> > > Since the vote passed, we're discussing how we might use the attribute in > Symfony. > 2 things on the topic: > > 1/ We're wondering about using it at the class level despite the missing > Attribute::TARGET_CLASS. ReflectionAttribute does allow reading > attributes without checking these flags and we might leverage this > capability to make our DebugClassLoader able to inspect those at the clas= s > level. > > Would you consider adding Attribute::TARGET_CLASS in 8.4 already? It > would just make sense to me. We don't need the engine to do anything abou= t > deprecated classes ever since all we need in userland is a class-loader > that checks for the attribute. Keeping the engine simpler and empowering > userland with maximum flexiblity FTW. I'm up for a quick RFC if the > consensus is this needs one. > We have started loosly thinking about the behavior of Attribute::TARGET_CLASS for a next PHP RFC already, and allowing this before the behavior is introduced seems like a bad precedent to me, so I agree with Tim that we probably shouldn't do that. > 2/ About the "since" parameter, we're going to standardize around a > package+version string, e.g. > #[Deprecated(since: "symfony/yaml v7.2"] > > I'm sharing this hoping this can spread outside of Symfony's boundary > because I think this would be a very useful practice that'd allow buildin= g > nice reporting tools. > > Nicolas > > --00000000000076d8be061bbc5b24 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jun 24, 2024 at 5:07=E2=80=AF= PM Nicolas Grekas <nicolas.grekas+php@gmail.com> wrote:


Le=C2=A0mer. 5 juin 2024 = =C3=A0=C2=A010:18, Benjamin Au=C3=9Fenhofer <kontakt@beberlei.de> a =C3=A9crit=C2= =A0:

=
On Wed= , May 22, 2024 at 9:22=E2=80=AFAM Benjamin Au=C3=9Fenhofer <kontakt@beberlei.de> wr= ote:
The vote for the RFC #[\Dep= recated] attribute=C2=A0is now open:

https://wiki.php.net/rfc/depre= cated_attribute

Voting will close on Wednesday 5th June, 08:00 G= MT.

The #[\Deprecated] attribute has been accepte= d with 23 (Yes) to 6 (No) votes, 79%.


The secondary vote to include Deprecated:= :$since has also been accepted with 22 (Yes) to 1 (No) votes, 96%.

<= p style=3D"margin:0px;font-stretch:normal;font-size:14px;line-height:normal= ;font-family:Helvetica;font-size-adjust:none;font-kerning:auto;font-variant= -alternates:normal;font-variant-ligatures:normal;font-variant-numeric:norma= l;font-variant-east-asian:normal;font-feature-settings:normal">

Thank you to ev= eryone for voting!


Tim will finalize the implementation PR now and work on its merge i= n the upcoming days.


H= i Benjamin,

The vote for the RFC #[\Deprecated= ] attribute=C2=A0is now open:

https://wiki.php.net/rfc/deprecated_a= ttribute

Voting will close on Wednesday 5th June, 08:00 GMT.
=

The #[\Deprecated] attribute has been accepted with = 23 (Yes) to 6 (No) votes, 79%.


The secondary vote to include Deprecated::$since= has also been accepted with 22 (Yes) to 1 (No) votes, 96%.


Thank you to everyone = for voting!


Tim will finalize the implementation PR now and work on its merge in the u= pcoming days.


Since the vot= e passed, we're discussing how we might use the attribute in Symfony.
2 things on the topic:

1/ We're w= ondering about using it at the class level despite the missing = Attribute::TARGET_CLASS.=C2=A0ReflectionAttribute does allow reading attributes without checking these flags and we might leverage this capability to make our DebugClassLoader able to inspect=20 those at the class level.
=
Would you consider ad= ding Attribute::= TARGET_CLASS in 8.4 already? It would just make sense to me. We don't need the=20 engine to do anything about deprecated classes ever since all we need in userland is a class-loader that checks for the attribute. Keeping the=20 engine simpler and empowering userland with maximum flexiblity FTW. I'm= =20 up for a quick RFC if the consensus is this needs one.

We have = started loosly thinking about the behavior of Attribute::TARGET_CLASS for a= next PHP RFC already, and allowing this before the behavior is introduced = seems like a bad precedent to me, so I agree with Tim that we probably shou= ldn't do that.=C2=A0

<= span>

2/ About=C2=A0 the "since"= ; parameter, we're going to standardize around a package+version string= , e.g.
#[Deprecated(since:= "symfony/yaml v7.2"]
=
I'm sharing this hoping this can spread outside of Symfony's boundary=20 because I think this would be a very useful practice that'd allow=20 building nice reporting tools.
<= span>
Nicolas
=C2=A0
--00000000000076d8be061bbc5b24--