Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125944 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 32EC11A00BD for ; Tue, 12 Nov 2024 14:17:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1731421215; bh=QmqpO7UwKIdkJOhKooWsKnX1bMHsNYpxfBlbRpSNYG0=; h=Date:From:To:In-Reply-To:References:Subject:From; b=cekWUMfjJzfDrPGl608+c0JoLNl8ye/ZH0hR73EaYJOgWE1bTNMWVhBr6w1esICHP CURl8ZSr0PA2EfDM8S5zyMQ5vccFZhhbaGHNEAATvHoKPhLoFcpSzq3USza/LY7V20 +qO3LDn35Q7sjes3eOK069MfbYFhzFF6SU0XexCH7Qc+T59QmRlHzdhoOiHyU3zRt1 1vSwrXj5HlzcHAYqkmnrZoejk5WLN3sLE9oLSuALWg/C49/R43eLKCFntWA5BrKv/4 DlzylH8Bi8XFNdFn8AVN+VRw+dlfrsLywTza4/Fvf2iws7q1qXlYLkTibxBvP0kcTZ Gw2buFQNtFa0Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7ADDA180068 for ; Tue, 12 Nov 2024 14:20:14 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED, SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from fhigh-a4-smtp.messagingengine.com (fhigh-a4-smtp.messagingengine.com [103.168.172.155]) (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 ; Tue, 12 Nov 2024 14:20:13 +0000 (UTC) Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.phl.internal (Postfix) with ESMTP id 3BFF111400E4 for ; Tue, 12 Nov 2024 09:17:38 -0500 (EST) Received: from phl-imap-09 ([10.202.2.99]) by phl-compute-01.internal (MEProxy); Tue, 12 Nov 2024 09:17:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bottled.codes; h=cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm1; t=1731421058; x=1731507458; bh=QmqpO7UwKI dkJOhKooWsKnX1bMHsNYpxfBlbRpSNYG0=; b=k0hxlv/XIugQz44lqMKaUuHK9E uJY6mb5O9Kom6Cd5SnkX9seMzkyQcIrarCE9QjAhZLQy2dAUP9sFIb/CUCrXEDGw iNYsbu8orpy+HCJk2Rnh5JtSDGlBDjBJX/iUu17K4U3Z12lWuK19HWWugvd1W3Kl nVNMRMqB4cCoIh+xbpc6xB2yec7Ys44SYbR4tZQuncdYdvxEqfQMPGEt/dazBfpM O7lEqtAeRda8nL4zKUS3jLPZZsTMItpePUwkh62MIVYj8E5sYSOCZRSORvUEyQtI Gs287JctsIab/Y02drk1hZL5eDB2YHlK3HDesWw8oORODXkJal4CIrZlviig== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1731421058; x=1731507458; bh=QmqpO7UwKIdkJOhKooWsKnX1bMHsNYpxfBl bRpSNYG0=; b=eKpgupxuybkdG0BHgibR68WYvBd+kN7l5Z5bkYsQudNqnZ05upk 1XCYqdOPge64vUxHbPiB9I0BdAWI9k7vB6AKtqiRm9GGgQxQxb30i96PbxbOtlTp 98ql9pOir8GcdwjsnclZVPJfHyJ8Fc29cETjpaqZmmKRR6znCqqVug5lhz+Y8Yub 5xBBmz5eq3IghxBjr6S89T1BbMNdMfao/Dx7/ck/5JRyQcEY0psviOcrgf62iP9c m1dLAHsTkn5Nu94jxMBYBgDMjcZu8tArIEs9HqRS6WWd7uo+RwmKFRdmT3ESczjT 1+DBBe6ERQXuR0E5KEnXAeQfSCBuDwikevw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrudeggdehlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecunecujfgurhepofggfffhvf fkjghfufgtsegrtderreertdejnecuhfhrohhmpedftfhosgcunfgrnhguvghrshdfuceo rhhosgessghothhtlhgvugdrtghouggvsheqnecuggftrfgrthhtvghrnhepiedthffhvd ffhfettdfgveefgfeugeegudeukeejheeigefghfeiveelfeefueefnecuffhomhgrihhn pehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehrohgssegsohhtthhlvggurdgtohguvghspdhnsggprhgtphhtthho pedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehinhhtvghrnhgrlhhssehlih hsthhsrdhphhhprdhnvght X-ME-Proxy: Feedback-ID: ifab94697:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id F3DDB780068; Tue, 12 Nov 2024 09:17:37 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Date: Tue, 12 Nov 2024 15:17:17 +0100 To: internals@lists.php.net Message-ID: In-Reply-To: References: Subject: Re: [PHP-DEV] Make Closure covariant to callable Content-Type: multipart/alternative; boundary=dafc9a6ddd7445579710b9858be5e639 From: rob@bottled.codes ("Rob Landers") --dafc9a6ddd7445579710b9858be5e639 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Tue, Nov 12, 2024, at 14:53, Gina P. Banyard wrote: > Hello internals, >=20 > Ond=C5=99ej Mirtes (author of PHPStan) remarked to me in August that C= losure is not a subtype of callable. > The implementation of this is quite straight forward and can be seen o= n GitHub. [1] > The question is if there are any concern or not and if this requires a= n RFC or can just be merged as is. >=20 > Best regards, >=20 > Gina P. Banyard >=20 > [1] https://github.com/php/php-src/pull/15492 >=20 Hey Gina, I think saying =E2=80=9CClosure should be a subtype of callable=E2=80=9D= would require an RFC. To say that =E2=80=9CClosure should satisfy the c= allable type check=E2=80=9D is just an oversight/bug. They are functiona= lly the same IMO, just different perspectives.=20 =E2=80=94 Rob --dafc9a6ddd7445579710b9858be5e639 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

=
On Tue, Nov 12, 2024, at 14:53, Gina P. Banyard wrote:
Hello interna= ls,

Ond=C5=99ej Mirtes (author of PHPStan) = remarked to me in August that Closure is not a subtype of callable.
<= /div>
The implementation of this is quite straight forward and can b= e seen on GitHub. [1]
The question is if there are any con= cern or not and if this requires an RFC or can just be merged as is.
=

Best regards,

Gin= a P. Banyard


Hey Gina,

I think saying =E2=80=9CClosure should be a s= ubtype of callable=E2=80=9D would require an RFC. To say that =E2=80=9CC= losure should satisfy the callable type check=E2=80=9D is just an oversi= ght/bug. They are functionally the same IMO, just different perspectives= . 

=E2=80=94 Rob
--dafc9a6ddd7445579710b9858be5e639--