Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123784 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 9D6BE1A009C for ; Mon, 24 Jun 2024 16:33:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719246901; bh=BZ0AcL6fqAEj6A5tG9XWJoQ4b9ExUb7jMtNBm+1Qmjc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NV/re/EhxRwqgu/ZcpXBsVDlhCqd7yenHOIcvAXLTBKVWSpyNgR4rcf0QNhsl/E6/ QsfoYvC6/cpSGN7wJytYUzWc/a9qfLGehKzjwAo1zTRQq76k3W9ovj/Gbai2vAQTkH QHaEpUSdWW1b0M5T20UI74Op+GEAabZSSSZ/pKz8WeG+zOZ4UP6TMh133jX5SzHTCQ R28qP2HXm9g+Whc91tGJAGYox/assnr7AbCD/fvozn7TkXsy7oTd4zCBiXrrWqPbHy hAcDfyXr6J1Xq8KxeAd3Y9lAcXEb/L+q1iaQAFLJhrl3MlmCgHlNr6Qea49tpMa02k 7xV8qd2vCi+mQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C322B180003 for ; Mon, 24 Jun 2024 16:35:00 +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=1.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, FREEMAIL_REPLY,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: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from mail-oi1-f181.google.com (mail-oi1-f181.google.com [209.85.167.181]) (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 ; Mon, 24 Jun 2024 16:35:00 +0000 (UTC) Received: by mail-oi1-f181.google.com with SMTP id 5614622812f47-3d229826727so2695680b6e.1 for ; Mon, 24 Jun 2024 09:33:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719246823; x=1719851623; 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=qeSu6Mp8j5D04JXElGFc/u8c9MMWhcY+VqkkaGFJXU4=; b=gpDIgF4hsyDskCU2oScjTEXHuwL65W+Znzfh9qSZsXitPR+VPmu2Y+4G53j+AXq4++ mz2+2v4g5Tcgmbbs2cU8Xrn46EaagogPb8Njpvo13G5YJg33EWPpWqCRUDOkLqFzUJ9c FMKE8vd65zW2AtkDs+ZY+N70q2z5ATg3nFRkMvu+c8LeD4l5tpGlD0b/J5Ze7vTjIQlz feKXVYGSuCbLMfBMz9o26QkFZCMBjTO+E2KHwhBALCoabei6zISUiS3ytp7H+DF3aP5u Bk/gY9IcjHeMbqOIINsBw1bl9raLXqMRMAnDYa9uy+gMqXomQ3ParisLn6cSLMbzKYTt w0Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719246823; x=1719851623; 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=qeSu6Mp8j5D04JXElGFc/u8c9MMWhcY+VqkkaGFJXU4=; b=Lze0FbYjXuewjQQ4w3pS3H7CfTYL+OWOvhx+/SeBP4++wCPg+c1TdKN37JRL8vnQzl hR4uAlxn1wMFIrXRsDa9n+gIDzRsaeYjn9u2LSJoNY3PoD7xjV3x9hh26WX0CFpwSm9s 3lwtvNBEoSEduqAHLgoqj8zqFuuD8OAsu/FvSmc91xq8LpLNFqBu2uSWswxYTuUoEDcj K4k8oR5W5TzuTBo+dSGSarYeF61DAJe6DqwesHreruTDfH0TfTbjO5LGl5ymdlEuwHgV gY9XA6OXRNrirECpXFlG4n1HmsjhCYztuuoKd+C5p0bajSPdUozlRCy3ixBE795OfY+v ETtA== X-Forwarded-Encrypted: i=1; AJvYcCXBbHpa6sDUQ38byKpMUOwQuh3TQ2/WBAP94dzgGbVqqw0iweMvRIW/+CfOcMCZBvsMHdTXwYpFfUovXhUim5U1vd3BbJAmGw== X-Gm-Message-State: AOJu0YwUEiBl1pvHrNY6ezGMYeJLRad3TRnZIjqiOMLpyPR9u/GASJk2 1IAJMW+RAJv7mYBvUkysUQWDI3JzLES/M5kRK5yIqNPmkGHNPNQQl9THxD/PuTiwv4/8LN8UjuN 1qKLV1b7eRsyLb5EaKkx9aK0BBiU= X-Google-Smtp-Source: AGHT+IEqS8gj1CT9/Ev/NxIzTgkO1Mq1PqKAyXSSAdR6MWOlV1NLDWCi9qFVPFO5CH66xTgcgWrxa88fKbVlzeoaoxs= X-Received: by 2002:a05:6808:3085:b0:3d2:2efd:123a with SMTP id 5614622812f47-3d543acaf2bmr7110940b6e.2.1719246823187; Mon, 24 Jun 2024 09:33:43 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 24 Jun 2024 11:33:31 -0500 Message-ID: Subject: Re: [PHP-DEV] Re: [RFC] [Vote] #[\Deprecated] attribute To: Nicolas Grekas Cc: =?UTF-8?Q?Benjamin_Au=C3=9Fenhofer?= , PHP Internals Content-Type: multipart/alternative; boundary="0000000000002d6ce3061ba55861" From: mweierophinney@gmail.com ("Matthew Weier O'Phinney") --0000000000002d6ce3061ba55861 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jun 24, 2024 at 10:08=E2=80=AFAM Nicolas Grekas < nicolas.grekas+php@gmail.com> 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. > > 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. > > Personally, I'd prefer the "since" format to mimic the notation that Composer uses on the CLI when specifying a package with a constraint: "symfony/yaml:7.2.0". This can be parsed easily, and won't suffer from having arbitrary spacing and version naming prefixes. (Still would prefer a "scheduledRemoval" field, as knowing when it was deprecated is far less interesting than knowing when it will be removed. Yes, I can assume the next major version, but what if it's major version + 1? What if a project allows removals during minor releases? Knowing what version it will be removed in makes it far easier to understand what will happen when I upgrade next.) --=20 Matthew Weier O'Phinney mweierophinney@gmail.com https://mwop.net/ he/him --0000000000002d6ce3061ba55861 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Mon, Jun 24, 2024 at 10:08=E2=80= =AFAM Nicolas Grekas <= nicolas.grekas+php@gmail.com> wrote:

Le=C2=A0m= er. 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> wrote:
The vote for the RFC #= [\Deprecated] attribute=C2=A0is now open:

https://wiki.php.net/rfc/= deprecated_attribute

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

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


The secondary vote to include Depr= ecated::$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 #[\Deprecat= ed] attribute=C2=A0is 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 wi= th 23 (Yes) to 6 (No) votes, 79%.


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


Thank you to eve= ryone 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 Sy= mfony.
2 things on the topic:

1/ We&= #39;re wondering 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.

= 2/ About=C2=A0 the "since" parameter, we're going= to standardize around a package+version string, e.g.<= /div>
#[Deprecated(since: "symfony/yaml v7.2&quo= t;]

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.


Personally, I'd p= refer the "since" format to mimic the notation that Composer uses= on the CLI when specifying a package with a constraint: "symfony/yaml= :7.2.0". This can be parsed easily, and won't suffer from having a= rbitrary spacing and version naming prefixes.=C2=A0

(Still would prefer a "scheduledRemoval" field, as knowing when= it was deprecated is far less interesting than knowing when it will be rem= oved. Yes, I can assume the next major version, but what if it's major = version + 1? What if a project allows removals during minor releases? Knowi= ng what version it will be removed in makes it far easier to understand wha= t will happen when I upgrade next.)

--
--0000000000002d6ce3061ba55861--