Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:123334 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 295531A009C for ; Fri, 17 May 2024 15:50:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1715961054; bh=jfSmQYew0+NvvNlcZL1NQ8GdmgwUFhfzqWrqNx3+vtM=; h=Date:Subject:To:References:From:In-Reply-To:From; b=T/FhU868L5b3VIS7HzyD0IiMgFQCgzDWp+3+mhX9axWV/5xwzzQf7WiAZ96WGSu2c tAXggnDVr0R8Zsm2em3NWq66RN/dI8Z85CWVI5muW7zjtuZ5rpwZcBw2VFG4f8jn1M JCkHrft7zyqQ/Jn3q88jxoeeqztfS1ZTF3a1rWboY6I2wcORg+4F4XVIdtblUXUahu a6D/XmBZBjjz0Ts3BteCoOgxzVsCKRxm7rRpWfPy9cEmApcA9iu50IkMCy6OdFhmJ7 8B/tl9ekQO6rDMHhmfN2vaTkbFhuYASAR7GSrfIh29+ANcTCutLnXM1xAIU6fYqyFm TPv//HS2JmPsA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EEE41180057 for ; Fri, 17 May 2024 15:50:52 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,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 chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Fri, 17 May 2024 15:50:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1715960997; bh=hVyh6XT4WT4bzLO3Rt0mAf5ejWNoOiqBV5Xf98J/IKU=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=TCZYwSmF7LGHjIwR5qXmjoNlAXViVVGNyJdXJmWLEgpf6/R3dVSDqVQw2QPeTNmjT eIdGeiZkbNbn31c7p/Fo53GVIhJzo3MtWG1KCHBhX1Qo06TtuPTBHhTmfDqFkcgfEI AR8lFgwm7IzgtB00glI2fuK51b0ONYnyjzJuRTFNhnhJf3+zYm30zkuVS9NtocAVgB fZdBQtpfuDNR1s6P2p6EjpydT2Tf6volt8305lUVD3WVTSBFnptP9oJpxASew9rv1V klMVYespdockLK0+VJU/fGT8mfd3PytjaCHhG+pvTQq7+ga0t01LAwS9wvP4vXd6d8 Ptk7K1tVRpt/w== Message-ID: <02b00330-1c34-4f3e-a167-0c0c4cc78ac7@bastelstu.be> Date: Fri, 17 May 2024 17:49:55 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Subject: Re: [PHP-DEV] Re: [RFC] [Discussion] #[\Deprecated] attribute again v1.3 To: internals@lists.php.net References: <8432541c-ad13-4682-9034-bcfe47e142ff@app.fastmail.com> Content-Language: en-US In-Reply-To: <8432541c-ad13-4682-9034-bcfe47e142ff@app.fastmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 5/17/24 17:02, Larry Garfield wrote: > Why is the attribute not allowed on classes? I think it would make sense on every language structure, unrestricted. (Including classes, parameters, everything.) There is not pre-existing semantics of deprecating a class from the engine PoV. The only things that can be deprecated on the engine level as of now are Functions, Methods, Class Constants (incl. Enum Cases), and regular Constants (those do not support attributes). Allowing to apply the attribute on classes is therefore left to future scope (as mentioned in the “Future Scope” section of the RFC). Adjusting the attribute to also apply to classes once the semantics are decided should be straight-forward and thus be an implicit part of the process of supporting the deprecation of classes. > The user-space definition of the attribute is invalid in the example: It declares properties AND promoted constructor args. That can/should be combined. I don’t follow. Do you mean the top-most codeblock in the RFC? It does not use constructor property promotion. It’s the stub, intentionally omitting the method body. I’ve added a placeholder comment in the constructor body to make that clearer. Best regards Tim Düsterhus