Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:125951 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 6EF931A00BD for ; Wed, 13 Nov 2024 14:57:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1731509986; bh=XtklRcDYlu7dyGUXQjmqYdFoX7ZohUHmHJ3YFtj5zGg=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=ibVXJNXfpPENLfEsAvyGT4izal55589P9x+4gYPr/PxVi/8T8gAuk3ya8mDk3OltY SDR7jpflZ2G6J6m/EAUGnGZ3dcT1zPvYKMbTxXbJt5X1wlaS3o6+M+Ajtls4UE1S3f rr2oHo3xCUwvRKO8+lF9XnHweoJk4IjXtVtrKbVooA541W+vKk+Ppqj92mhWUkd7bN /OjN+nZeycHdlORzOsxYF51jd+4YCyw4y2vetmjNOQl4KjeoHiFG/DGlguBw+pUTyg dez75phOgkqWycmkI0jIqfU2ZTB5carCjfpHyUoEKUdGtbjPk1a2FC10YO/u2aYOgF GMr8P71n1+2MQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 73E60180068 for ; Wed, 13 Nov 2024 14:59:44 +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,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,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 mail-4323.proton.ch (mail-4323.proton.ch [185.70.43.23]) (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 ; Wed, 13 Nov 2024 14:59:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail2; t=1731509825; x=1731769025; bh=XtklRcDYlu7dyGUXQjmqYdFoX7ZohUHmHJ3YFtj5zGg=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=Tzl/xgUdgVPGbafQx5mC5/rw4/RiJwV61Gr+663tv1MNTWriEXnQc41m6fBrV1NLJ WA4vNk4ivYrfl6PIBx4Rzvuolj4oTNSdH7PuKM15B0I4WE0ZehsHR5muvDwW1SRWyC LsDKR1NI3qCcDNhkYtl4UCiYBEfT0QNZ4lfNL8qjCYU7oZm4+hShWBVInotao+Cyr7 dRkZI3fPbQorinqtZw4HzANamhCXHNjdEwRY6VsDSwmkKdXh6KHFyLSv7dcamzKMjO rU+9sHRjOBIY4yOMEPYM2ESfgoR/HgJg8D8E5l2pSv3J6bUce2dc5n+pzXy+mYbune VwHnxSMVDrH4w== Date: Wed, 13 Nov 2024 14:57:02 +0000 To: Levi Morrison Cc: Claude Pache , PHP internals Subject: Re: [PHP-DEV] Make Closure covariant to callable Message-ID: In-Reply-To: References: <461FD462-72A8-42D4-B6A2-CA10AC5CA395@gmail.com> Feedback-ID: 96993444:user:proton X-Pm-Message-ID: ad471a001cfc0f9871bbb846e32be72f9a441047 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Wednesday, 13 November 2024 at 00:46, Levi Morrison wrote: > There are some weird cases with `callable` which is why they aren't > allowed as a property type. I don't remember all the edges, but if we > are sure that we cannot hit those with simple co-/contra-variance, > then I don't think this needs an RFC and we can just merge the PR. The reason that callable is not allowed as a property type is due to scope/= method visibility issues. See the discussion section of Nikita's Deprecate partially supported callab= les RFC: https://wiki.php.net/rfc/deprecate_partially_supported_callables#d= iscussion The callable type is allowed as a parameter and return type, and Closure is= "better" defined than just callable. Best regards, Gina P. Banyard