Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112601 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 15219 invoked from network); 22 Dec 2020 19:02:24 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 22 Dec 2020 19:02:24 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2C3881804D1 for ; Tue, 22 Dec 2020 10:35:09 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 22 Dec 2020 10:35:08 -0800 (PST) Received: by mail-ej1-f49.google.com with SMTP id d17so19514037ejy.9 for ; Tue, 22 Dec 2020 10:35:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nwDMiX67VL6BZyD19ozsgl3UStMC8onzFfFfmZnCwuE=; b=gO93rb2jCFFe1vz8kY9kqrCEmKiKgHL1UPdH3Mc6vq2b5eZ7tNTyY3/AiKBGTwVB7/ 5D8kkwZftm2yTdXvlibbUsd4gREUT6O9eujIL+qTfDLmhDS/BdxE0U/qYh2S41FuKcZF T8QfrudVxkzFm78s0X2Z3hUyA/boTAZyWHVwy1KiyeFgmgcfFXuThWzUq/8bAhpVEkk+ CQViGbJ/P3Vi/+nfKVUY0FrtR38nMOK0UuWNk+FQOS4HdJt22dZCnw7iI5ax98HZ8Xwl /Rzh1F0j/aXz3MjDj3Ns/nDDzp0fkR0uQtLAjLzfbzPDTMgPX/2aSdjDLtx5SmqTLqRw LlVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nwDMiX67VL6BZyD19ozsgl3UStMC8onzFfFfmZnCwuE=; b=m3Tcjir0d8/SxL7Oe5b34PL1u7Gwc6hYvSHYWlGqSBMNhTq5fgo0PcZq8JSF3VYIUP c/OCQJXIDrPeB1MmJrxF7qg9ncg8cHJ5ga1NWGH1wZvyj29X4vrvFKh252lRz+8NOTfl QJ1ZZD+jRsIe5TBXwbtnUsa2IKtb8PwVcYiqd7gbE5BSAmbWCyq9NpQnAxmX7lcvRQNH C/Bxps5JcdD+i+pO/zLeU69lT5Dk3frdJNVAkZteipfE/QEod7f3rbqmbPXDAJ0/Q48w j9TaXzOWKk7ggvPtwEw8scnzZUwOK86nf9k1dnkqp3WHkWpIHSJJLTlY5MjikEVte31u B2yQ== X-Gm-Message-State: AOAM533NdLMBjQ4B2emmb/nNUrcqX6vS9XosWP5oNWgbLEVXTXpmWijG D0RQM018+6xbd7OQibwOVMNMLPMaYUuTuzgMGVq4+uKCKyM= X-Google-Smtp-Source: ABdhPJymBd6Glm5csaBzhlF2dv8jk0wadefR/Q8I/d5kRaYzAlEQiv72kUAYyyyOIpICi0NtQDOpPCl63pmWbyYKsek= X-Received: by 2002:a17:906:4e52:: with SMTP id g18mr21607132ejw.385.1608662106569; Tue, 22 Dec 2020 10:35:06 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Tue, 22 Dec 2020 19:34:53 +0100 Message-ID: To: Benjamin Eberlei Cc: PHP Internals Content-Type: multipart/alternative; boundary="0000000000006d027705b711d58f" Subject: Re: [PHP-DEV] #[Deprecated] Attribute From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --0000000000006d027705b711d58f Content-Type: text/plain; charset="UTF-8" Hi Benjamin, I have updated the RFC for a #[Deprecated] attribute that wasn't completed > for PHP 8.0 due to time constraints and I am able to restart the discussion > now. > > https://wiki.php.net/rfc/deprecated_attribute > > The following updates have been made: > > - focus on only method and function deprecations for now, removed > class/property/constant deprecations. > - a section on explaining the runtime effects of deprecations in PHP, and a > note that this RFC is about completing deprecation support within the > existing model, while changes to deprecations in general are out of scope / > a disjunct concern for a different RFC. > > Sara proposed a much improved implementation over my initial patch, by > using the already existing ZEND_ACC_DEPRECATED constant on userland > functions. The resulting implementation is therefore much simpler and > really just extending existing function deprecation support from internal > to userland functions. You can find the PR here: > > https://github.com/php/php-src/pull/6521 > Thanks for the RFC. It would be great to allow adding this attribute on classes. What about allowing it right now and not bind it to any runtime side-effect? That would allow static analyzers to do their job. Same for consts and properties by the way. Also, it would be very useful to add named parameters to the attribute, namely: "package" (the name of the package that declares the deprecation) and "version" (the version of that package that introduced the deprecation), next to the message. This is critical info when building reports of deprecations. Thanks for considering, Nicolas --0000000000006d027705b711d58f--