Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126878 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 B14D11A00BC for ; Thu, 20 Mar 2025 20:04:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1742500916; bh=0K0OZCJxn85UAisRnXTMsyl4HEcIgcNGwR7Bzo4qfWg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gm92ceYl1aMzhUiuDRNPktR9rLl/YATNjpdU4ktNGBvLAkuxQgsSnTBk5QxcxoBUa 1ltG2Xrhq1bTR2+DzGJnVIv+x1yMa4+bfJQSOD4+wirQA7g7GgIxfPC43a0M8LcYIm 72oHTlZLnNQ+Uhak5emyErIvjKMF1MS8BqEIkYK1OrqxtXzouagoJJ5J/HzzvLOfsD MY5r/2JbFGCf2igXp5KeBwm0S08maFR5U6bVKbXpBAnluK2jWUB5XA+8sPvpDKTZOM kxK70j2kcr++QyLgCCJBoPD/ul5cHHOagzm6l1anNsrvIhjIYOXcSa8YeyKQqhmX5c DDhrCqPBBa4rQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 720431801DF for ; Thu, 20 Mar 2025 20:01:55 +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=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_PDS_PRO_TLD autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from hedgehog.birch.relay.mailchannels.net (hedgehog.birch.relay.mailchannels.net [23.83.209.81]) (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 ; Thu, 20 Mar 2025 20:01:55 +0000 (UTC) X-Sender-Id: yszpovajlk|x-authuser|juris@glaive.pro Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 824A5220C6; Thu, 20 Mar 2025 20:04:23 +0000 (UTC) Received: from server42.areait.lv (trex-2.trex.outbound.svc.cluster.local [100.114.55.81]) (Authenticated sender: yszpovajlk) by relay.mailchannels.net (Postfix) with ESMTPA id 7127223267; Thu, 20 Mar 2025 20:04:18 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1742501058; a=rsa-sha256; cv=none; b=Y0OCMAhsub3B/WW3muGGck1pXk6ix8HW+tuzYfnbvx3QUeHkKHBgCbw6ZPlRAfZjjwr5wV iSQhN9tKm4wXSR3CD0ru/or+lHPTPkc23wv0QIDuxW6YuuEqYGivQCrWFjbfThhyDsblz8 3iBRM2Tgb2RmUWnuSh/UfagvTBngl5Q/t+ceqSkqZ7/L6XxCbAH/j5XGm7cWOG7YQwQIMN BECEdqB7LHxhUSJh4GewK48ShoEzFTrRoyXLdfaHtrwyO/w0e6zbXCS6GOfZuFBca1/7sg 2QSr6v9gq+TupZQ6GlQewdT7mycyrggsYjjz4ScJi/fGXnj7iKRDLVed0emn3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1742501058; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=lPmxKB0xh+odmNcZMllHUmZm/BpioadqZ2PJMHy3Ra4=; b=eyXQ3xbg4C8k43PFPjf1krt/GLX2US9xHa51/S5OWZIyd1ul1bMLBeur93z5oV/tH0p5ht XaoqyINquw0czg3H4j/AR3o4wPqaR5S4T9Uag07xW19tC+cA0108Nrg9ekqEplHKiTuB05 9o+4WznnrSFCm9XIhTo9ASWd9lXDE2HSnssrCDKxnGxdsTgoXqp0eBdOVC3IRP228yENwk L64nfqAAfZI1XePEP4TTVajWIkNYqsA9xcyao+4wSuEYsC1tkhzFwTFib0Le+IT+bHXkoE BF6lDO3P10ctZZ2chBnDhpGiv38fR++xTCSdT1/OCgnlFwbHCrOWW5uzzhk2ow== ARC-Authentication-Results: i=1; rspamd-588454d544-pv6vg; auth=pass smtp.auth=yszpovajlk smtp.mailfrom=juris@glaive.pro X-Sender-Id: yszpovajlk|x-authuser|juris@glaive.pro X-MC-Relay: Neutral X-MailChannels-SenderId: yszpovajlk|x-authuser|juris@glaive.pro X-MailChannels-Auth-Id: yszpovajlk X-Eyes-Well-Made: 09037cbb14ee6146_1742501063126_4216165348 X-MC-Loop-Signature: 1742501063126:4278507930 X-MC-Ingress-Time: 1742501063126 Received: from server42.areait.lv (server42.areait.lv [212.7.207.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.114.55.81 (trex/7.0.2); Thu, 20 Mar 2025 20:04:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=glaive.pro; s=default; h=Content-Type:Message-ID:References:In-Reply-To:Subject:Cc:To: From:Date:MIME-Version:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=lPmxKB0xh+odmNcZMllHUmZm/BpioadqZ2PJMHy3Ra4=; b=Le7GFB5K0A2DGg0gXR/bKIm8x3 iD2ep+W1LHrEvJSkBW/SDNeClFEDAOffZqhDXulo84CidhirIMkHV0SkB89Df1XGB+9aCWEUHbsMJ Yk1kqt6GvyfrYHbqPGP35XZ5vWpBHQp9XSRRGU0lQkof0u/xHmQPTSbY13197G2GG2NOF5PWAOfuy U4BH9XYQvFYjcpz0h2IilZHYfNZ441Ijpl5v0zNs/0KjDDMUlHnnTiIyTa2cIXwpBNFShsP1DPFkW zGFXLZnjHzWCBzy2/jIb6fyoKMaZFipe4tFU01WpmuK/yh9f51W5DY+eMRrOzm61SgSIdiFvpFE1n vCX2faUg==; Received: from [::1] (port=33752 helo=glaive.pro) by server42.areait.lv with esmtpa (Exim 4.96.2) (envelope-from ) id 1tvM7k-003xME-0H; Thu, 20 Mar 2025 22:04:16 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Thu, 20 Mar 2025 22:04:15 +0200 To: Daniel Scherzer Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] [Discussion] Never parameters In-Reply-To: References: User-Agent: Roundcube Webmail/1.4.8 Message-ID: <17f97184100adbe822868f23251659a4@glaive.pro> X-Sender: juris@glaive.pro Organization: SIA "Glaive.pro" Content-Type: multipart/alternative; boundary="=_485f3082c8467a81250020af3629707a" X-AuthUser: juris@glaive.pro From: juris@glaive.pro (Juris Evertovskis) --=_485f3082c8467a81250020af3629707a Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed On 2025-03-20 18:50, Daniel Scherzer wrote: > The original inspiration which I discussed in the RFC is fixing the > signature of the BackedEnum methods, which currently use the second > option. > >> Hey, I'm not opposed to having a bottom type, but the `try`/`tryFrom` issue feels caused by another shortcoming. In my view`from` and `tryFrom` are factory methods that construct an instance by being called on the class itself. As such they should not be subject to LSP at all, just like __construct is not. BR, Juris --=_485f3082c8467a81250020af3629707a Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=UTF-8

On 2025-03-20 18:50, Daniel Scherzer wrote:

 
The original inspiration which I discussed in the RFC is fixing the si= gnature of the BackedEnum methods, which currently use the second option.
 
 

Hey,

I'm not opposed to having a bottom type, but the `try`/`tryFrom` issue f= eels caused by another shortcoming.

In my view`from` and `tryFrom` are factory methods that construct an ins= tance by being called on the class itself. As such they should not be = subject to LSP at all, just like __construct is not.

BR,
Juris

--=_485f3082c8467a81250020af3629707a--