Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123401 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 B2ACA1A009C for ; Wed, 22 May 2024 08:13:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1716365671; bh=XSOPlP0DtVobvgUJNoE6DfZXAy5TdQUoY281P794lXc=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NyFuuNopQny8zgtfEvVPIMCal/3q/Ngfmluj2JtO/odZSSHwZ5uu37mKjOt6SZDGK l0lx8Bg9fVi2Gz6W5mD4pCWdI5q131DzAc6tTUuo8u4Mu9W8WKeIGKPkpQ6Ev3/nFr 89x5gRrl/fwQT9EDQ1Dy07xlN5Td+4mRE7GpKFkYgaSIgz81WPQF0rdoRr7BZojiq2 ZBSYuyG+aJKraDpXaSplLFADf4KN0/xJA1NBZHwHacMI1R7vwej3BhEI5iDiQ8Cilg abpySvtPjtIe1JJ5kxWudUWq1sPAm/tL2aRCOg0DypfkPIN5hvap+nMMQzA7985R+I gJ+L7qFKNnOAQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AE7B61804CF for ; Wed, 22 May 2024 08:14:29 +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-vs1-f44.google.com (mail-vs1-f44.google.com [209.85.217.44]) (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 ; Wed, 22 May 2024 08:14:29 +0000 (UTC) Received: by mail-vs1-f44.google.com with SMTP id ada2fe7eead31-481e9c27378so194762137.3 for ; Wed, 22 May 2024 01:13:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20230601.gappssmtp.com; s=20230601; t=1716365612; x=1716970412; 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=XSOPlP0DtVobvgUJNoE6DfZXAy5TdQUoY281P794lXc=; b=iMA9DjzTlSmvCwE71K98sTcKXa4356jmMN4VeATZ0j/LsLHyPFMuEXw+257wMHqMsI dcroFoCfplzGC7F4ExRVeX2XdDbzbLUsj7jF8Pz0UT+IFRaB6OcoWZyCZJ8yrjA/PRw1 zC863WTofQlhjHWxJBaN0kYGkEj1v1TA91GcILYUAIh6cZiLh04EVU6dgQcSHgAqaWRf KD7VsjaHhNtA1W0PB9TQwYXyVLW0pn9/yhwWKHq/69LKohHGObj8qhlcu34Q3rMCVW2o cRR3JfeklIW95IZ29YtnO0IM/ZzBiacOUMcVhB5K+Is0DBAypeMkJJcrONlPBNfjoQks YcHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716365612; x=1716970412; 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=XSOPlP0DtVobvgUJNoE6DfZXAy5TdQUoY281P794lXc=; b=AbA7fPWhFcl5BZjChF1H2UdXhSIYTROMB+fLA6Wyum1bfcFBxG85vULouoLsZ7dDCr uUgLkHm7CmfgYHZgSwXNB2oEevL4zrUczIJH85RSZMyYc24XaKR7Q3b5zMq230VvQ2V2 P+MgBp1jzcZaK7iZ5z/Vkg0AQba6N4pDQNnd7qk/5iVxfJMO9yU0cDD/4SlhVLwuGCo7 Od1VDdvSMZ8XTU60hEw88W8OkbDBcZib3nQ4tUUZT6z5iVbRilqqdfPU/s0ItLmTzwpi dmX3Wmp0LoOy7vLaf4jHNx1qWJ7KCJgClcXqtKBUM6EBAMa6VjM9G7uCjee92dlWFvIN L3jQ== X-Gm-Message-State: AOJu0YySjXvOhRCwOqTVSCYKvtrLMpQkRQV61rvpbvnV7BlGbNt2YTwn X/55sGKkkFNdatGESv3f5zlIKJDY8PG4Y9Z6hk5EY66iO56kM/H3yehC3iq7r3lTB2dYpnD6i7d Gvy56qSg0lE1+Kcv84RsZ+1twiPQonE2T341lgA== X-Google-Smtp-Source: AGHT+IE2jcmW/o7Zb7ZjpWMuVwd9zuOrsEZDF/hD65kBg6EiE0UqqMupuf8M4dzZBOqvm2eFH9Q4OVnhrvv/meyJDl4= X-Received: by 2002:a05:6102:3a0d:b0:47c:3878:8c69 with SMTP id ada2fe7eead31-48903973618mr1351801137.13.1716365612190; Wed, 22 May 2024 01:13:32 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 22 May 2024 10:13:20 +0200 Message-ID: Subject: Re: [PHP-DEV] [RFC] [Vote] #[\Deprecated] attribute To: Nicolas Grekas Cc: PHP Internals Content-Type: multipart/alternative; boundary="0000000000009eafe80619068257" From: kontakt@beberlei.de (=?UTF-8?Q?Benjamin_Au=C3=9Fenhofer?=) --0000000000009eafe80619068257 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, May 22, 2024 at 9:33=E2=80=AFAM Nicolas Grekas wrote: > 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. >> > > I voted "no" because I think this is better addressed in userland, as thi= s > gives more flexibility. > I would better have an attribute that is made only for static analysis > with no runtime side effects at all. > Being forced to make the attribute final because the implementation in th= e > engine requires is an example of why the engine is not the correct place = to > send this notice. Another example is not being able to add the attribute = on > classes because [engine reasons]. > This is a misrepresentation of what this RFC is. There are no engine reasons for not being able to set it on classes. It just has not been implemented yet. Allowing deprecations on classes is something that needs to be figured out in a separate RFC in how these semantics work. Then adding Deprecated attribute would just be a trivial matter. You could argue about the order of things, we could have first made an RFC for deprecated classes, but we should avoid a waterfall process of dependencies in things to do in the language. > > trigger_error() is better fitted for the runtime side-effect when it's > desired. > In my opinion, #[Deprecated] should be only for static analysers / > reflection (although this would need another discussion - I'm not sure th= is > would benefit being in the engine vs in a userland package. > This is the same as above, changing how deprecations work in the engine is orthogonal to this attribute. These attributes are concerned with tagging code elements with flags that the engine already provides, already makes available for internal code elements. > > Thanks for the RFC anyway. > > Nicolas > --0000000000009eafe80619068257 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Wed, May 22, 2024 at 9:33=E2=80=AF= AM Nicolas Grekas <nic= olas.grekas+php@gmail.com> wrote:
Hi Benjamin,

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

https://wiki.php.net/rfc/deprecated_attr= ibute

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

I voted "no" because I think = this is better addressed in userland, as this gives more flexibility.
=
I would better have an attribute that is made only for static analysis= with no runtime side effects at all.
Being forced to make the at= tribute final because the implementation in the engine requires is an examp= le of why the engine is not the correct place to send this notice. Another = example is not being able to add the attribute on classes because [engine r= easons].

This is a mi= srepresentation of what this RFC is. There are no engine reasons for not be= ing able to set it on classes. It just has not been implemented yet.
<= div>
Allowing deprecations on classes is something that needs= to be figured out in a separate RFC in how these semantics work. Then addi= ng Deprecated attribute would just be a trivial matter.

You could argue about the order of things, we could have first made a= n RFC for deprecated classes, but we should avoid a waterfall process of de= pendencies in things to do in the language.
=C2=A0

trigger_error() is better fitted for the runtime side-effect when i= t's desired.
In my opinion, #[Deprecated] should be only for = static analysers / reflection (although this would need another discussion = - I'm not sure this would benefit being in the engine vs in a userland = package.

This is the same= as above, changing how deprecations work in the engine is orthogonal to th= is attribute. These attributes are concerned with tagging code elements wit= h flags that the engine already provides, already makes available for inter= nal code elements.=C2=A0
=C2=A0

Thanks for the RFC any= way.

Nicolas
--0000000000009eafe80619068257--