Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112867 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 76261 invoked from network); 13 Jan 2021 12:56:03 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 13 Jan 2021 12:56:03 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A287A1804E3 for ; Wed, 13 Jan 2021 04:34:15 -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=-0.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-io1-f54.google.com (mail-io1-f54.google.com [209.85.166.54]) (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 ; Wed, 13 Jan 2021 04:34:14 -0800 (PST) Received: by mail-io1-f54.google.com with SMTP id o6so3632188iob.10 for ; Wed, 13 Jan 2021 04:34:14 -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=kTIg9X5GWrKA740Q0/4fEB0jUMh+KvPRzzg8HZVweXg=; b=Vhelyzj9KigzeAbfsStw9Cv5MpCFWGLLG3UK2d8MgisI5b/PhHVAO8YVKyc4xfNyfT ljuV5e6vXlJSL3EFMeiVHXQ4FtSVc6TRQg1A/eZEfcUGjU5iZ++B8SK4Q4Ga9oDlnjx4 Z0SmOyLNebfUzBpvxCiPPd0Kbe4M1mRDdc1f6aeJ4uHHeTlgBXfmbXr/Z4SDnhAOPftG dKcmEIKI95oBiV5EQ3+shWWMfO6apUr7xuM+hI6QLnaE6yIEJw6pRYZcRks6DwnKxxw+ PdsAYmrq862ryZHWGHJZ7/ywumeesah1cd1f9pYH7qFA45pgU0SJKtYB6938Nh+llrsh e8aw== 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=kTIg9X5GWrKA740Q0/4fEB0jUMh+KvPRzzg8HZVweXg=; b=QQpJCgvIGukxVLp4OfkQK2dZSrlEfm2GsHpdt2hu0cvzjOdPmUfNr5+uR1muQVPdMh 1YpU57j8tkXFn+z2dY9m8xKleJs9zCBjTSdPd9RjOHVODdK2HSRkj2DPx37M/MJySSN2 hjXts6R9iV4aVWtInhXeZEH/+bkku+dEv9NZ2qkfsvlEEpMl2jADCazcrUXOBoCpCDEz zl5caRpVqdUuYl7p4b5L1MZzRffVUaqVNqPwgXESkeFl7raWlEP1iRX9mdaMAhq/+OLO +LPDQjNZc6RyUJtuanHkup5Isnskj7xyqqQZAu1kDB0zKihtP+O2o8zIY2NWupsigbgZ DCZA== X-Gm-Message-State: AOAM530Dn/jwl96hQ7lh6bouVkTCNuvYTemRumUfNBt/bmHHK/wtPGS5 4MBQQr8tfWws/evnNPlcTXiCKyN7PVnFUr7WFoc= X-Google-Smtp-Source: ABdhPJzkedUpLShjCNkGSofqAoO+hYHZzKU3M04MLHmWjdL/O5Fna8QyEUoc1/xkfn5hLOQhEC5dMwVjdw1gF1rSVGw= X-Received: by 2002:a92:d1c9:: with SMTP id u9mr2141726ilg.282.1610541252478; Wed, 13 Jan 2021 04:34:12 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 13 Jan 2021 13:34:00 +0100 Message-ID: To: "G. P. B." Cc: Benjamin Eberlei , PHP Internals Content-Type: multipart/alternative; boundary="000000000000400c0605b8c75bfc" Subject: Re: [PHP-DEV] #[Deprecated] Attribute From: ocramius@gmail.com (Marco Pivetta) --000000000000400c0605b8c75bfc Content-Type: text/plain; charset="UTF-8" On Sun, Jan 10, 2021 at 2:48 AM G. P. B. wrote: > Just to clarify this raises an E_DEPRECATED right? > Could it make sense to raise E_USER_DEPRECATED instead? > I hadn't checked this before, but as per George's message, this is worrying. I've been quite loud about it in the past, but static metadata definitions should really not lead to runtime side-effects, especially if not pure (error handling system tripped here). I'd be totally for a built-in `#[Deprecated]` attribute if it did **NOT** have a runtime behavior, which is an absolute no-go from my PoV. This stuff is easily introspectible via tools like phpstan, psalm, phan, and does not need to lead to more problematic runtime issues. Marco Pivetta http://twitter.com/Ocramius http://ocramius.github.com/ --000000000000400c0605b8c75bfc--