Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117725 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 28841 invoked from network); 12 May 2022 20:37:53 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 May 2022 20:37:53 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id C3F581804D7 for ; Thu, 12 May 2022 15:17:12 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HTML_MESSAGE, HTML_OBFUSCATE_05_10,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_SOFTFAIL,STOX_BOUND_090909_B,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS36483 23.83.208.0/21 X-Spam-Virus: No X-Envelope-From: Received: from olivedrab.birch.relay.mailchannels.net (olivedrab.birch.relay.mailchannels.net [23.83.209.135]) (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 ; Thu, 12 May 2022 15:17:11 -0700 (PDT) X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id D876421810 for ; Thu, 12 May 2022 22:17:09 +0000 (UTC) Received: from nlss2.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id EB2AD21AF4 for ; Thu, 12 May 2022 22:17:06 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1652393828; a=rsa-sha256; cv=none; b=k9DJq4xdpOZE1atWJ29NaRfvW2SnsFqayCXRsqZ0EnU/68JrS/4iUt8AeOQ2wwyJdntiFo stUCRecRifg7pbk9QTA/hp0RoVieK2iYB7xJT2FyDHVcmLqBNDXbwGVXkU1qSDQfzOnbGE DbytUimkE3WlN8atA9UeZi4TWH7JCgdG0JMHKcmIfpEhIT/FYZuENBrOvf5HbgplI/LC5X wMgCPtcdwLA1UPcSsmeAE9wjvClSI4ida3EL4XxGJmoz+bGBq1eSOGZ/EDcoBK4r2VPxqs iDq9f4Zpo6daE2Ap82SsLI1tYmIloimTk7JCzGXW4J8b7ZENzetus1At95NDvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1652393828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=pOqgiLpHAHJbDeNQ644ECfjP8GPw/9mDG04ayG2kY+4=; b=LzGFfVildhzhZhyowoVN+2P/hi9QroCH/9n9o/lsvYE3FXgIepEbov5Juymh3mafJhWfs5 pS7ekoe+8bn/d2JgkNo+2yK9gzv5vsBhrYrM2O3u7MR2LiPqfwGyIbXn9io8UtidthaCOi QjIxfUSaa38N5sjeWu9voNN7zbUzqooXQd1r7e/Ej2GAugm04aneHONMqtk4DHLnbe7AJu RYMMo1cECrf/gk0zK3e5UbG5QiuSyFRo3yTb572R3NMnQj+6eQCekAEcFHk4BzBTwB4QeB L/Wm5q9uB9xO5vCJubQjEQ515VT3agz5qvr7ZYNNymTHILoKszwwQS/upDx7Ag== ARC-Authentication-Results: i=1; rspamd-6fcfc4d76-6ftpk; auth=pass smtp.auth=a2hosting smtp.mailfrom=php-internals_nospam@adviesenzo.nl X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|juliette@adviesenzo.nl X-MailChannels-Auth-Id: a2hosting X-Spot-Versed: 799e9d392bbbd4b2_1652393829127_756438512 X-MC-Loop-Signature: 1652393829127:205501067 X-MC-Ingress-Time: 1652393829127 Received: from nlss2.a2hosting.com (nlss2.a2hosting.com [209.124.66.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.112.55.199 (trex/6.7.1); Thu, 12 May 2022 22:17:09 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=adviesenzo.nl; s=default; h=Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: 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=pOqgiLpHAHJbDeNQ644ECfjP8GPw/9mDG04ayG2kY+4=; b=pdc2nfWGDWUsub77KPAdL4nrhL gAxLhWDmEt0VxdEL3ibNuw5zzs/cIoChvQB/mVVCU8hyaPLv4lMycuyqC8s24pTsuJ/5v8inuZeku DCorCdw8bRAo7cGm46lwmrIg3k/KLbtVbHqjEChz/244vOfSD0C7sMTXeqC9nW8aqeMM=; Received: from 86-154-178-143.ftth.glasoperator.nl ([143.178.154.86]:63194 helo=[192.168.1.104]) by nlss2.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1npH7I-001Wes-I3 for internals@lists.php.net; Fri, 13 May 2022 00:17:04 +0200 To: internals@lists.php.net References: <627D3BCF.7020903@adviesenzo.nl> <0d42a208-fc73-4277-a975-6f91c24648c1@www.fastmail.com> <5E4825B2-1F01-4783-B95F-3ECC6C40C3C2@gmail.com> Message-ID: <627D8760.6080202@adviesenzo.nl> Date: Fri, 13 May 2022 00:17:04 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 MIME-Version: 1.0 In-Reply-To: <5E4825B2-1F01-4783-B95F-3ECC6C40C3C2@gmail.com> Content-Type: multipart/alternative; boundary="------------010004080709040109000002" X-AuthUser: juliette@adviesenzo.nl Subject: Re: [PHP-DEV] [Discussion] Expand deprecation notice scope for partially supported callables From: php-internals_nospam@adviesenzo.nl (Juliette Reinders Folmer) --------------010004080709040109000002 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 12-5-2022 23:30, Claude Pache wrote: > >> Le 12 mai 2022 à 23:11, Larry Garfield a écrit : >> >> For the `callable` type declaration, I'm not opposed but is it redundant with the existing deprecation? When would you pass a callable to something and not end up calling it anyway, which would trigger the existing deprecation? (Meaning in practice you'd always get 2 deprecations, which are not necessarily better than one.) > Although such a callable is probably intended to be called at some point, it is not necessarily called immediately, and it may be easier to track the source of it when you trigger the deprecation earlier. Example: > > ```php > public function registerErrorHandler(callable $onerror) { > $this->onError[] = $onerror; > } > ``` > > (Of course, this argument also holds for `is_callable()`.) > > —Claude Exactly as Claude says and to quote the RFC: > While it will be common to use the partially supported callable in a callback function call within the function with the type declaration, this may not always be the case, especially in frameworks where callbacks can be registered to be executed later in a limited set of circumstances and those circumstances may not be met by default. > Without a deprecation notice, those “/limited circumstances callbacks/” may not be discovered as needing updating in time for PHP 9.0. Ref: https://wiki.php.net/rfc/partially-supported-callables-expand-deprecation-notices#adding_a_deprecation_notice_for_callable Smile, Juliette --------------010004080709040109000002--