Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117723 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 13875 invoked from network); 12 May 2022 19:51:15 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 12 May 2022 19:51:15 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 2681D180382 for ; Thu, 12 May 2022 14:30:33 -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=-0.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f42.google.com (mail-ed1-f42.google.com [209.85.208.42]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 12 May 2022 14:30:32 -0700 (PDT) Received: by mail-ed1-f42.google.com with SMTP id d6so7777691ede.8 for ; Thu, 12 May 2022 14:30:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=pyl2UJ0EfsmXbOcPn2I0/MER6QHjvutZUiAUVPiMu98=; b=WZr0J+ALWPdTO6pSseg7uVZ51lDnzhoSZPHExg04hsV3jdnaLpogyjM58092wgJm4T 044Sg7CGQegi176TaiF/mrD1gEmeij4tQkSfNOB8wHO7BkZz45ronlskxd6qqMKLU3Ez jiEymLV31wWUCj1R6TfxMuQUzw//n4IKp7mk0ouN4tnKuVHq5mImaY3FLpLIQRK2aHRA j/LBp0t4edo65gaVSf95qygkoW+hgQBrPthzHjgLwBNiRs+CC8J0WlcdPInLKA6NQLgK BmhzkiJyokIwAhfAz3/KJIy8Dkz/kBvKKJKcRJ80L54eJ7gpH4GMmB0pHOCWs8hdDU/z +5Pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=pyl2UJ0EfsmXbOcPn2I0/MER6QHjvutZUiAUVPiMu98=; b=vG4EZR6kOafh9mH4OQG2QTKWjRVruW2koxRe0W0l5MZO2gqJzo1fRPWKquYy1xxGzl MdsLnZd+x6rzpUaeuZDZvI9eqThDzHlHCGVPpnH9DXzTzLxXMYvJ+2nnB1aiGzLWxHje ohU2K0IMPQ/yZm/sB4saZxWJ8n/wHQXtwGmP+82XJ1LI2p9HUn7bFsBsvbcq8hp0sAcr aEHHt2mt86p99HkRRmLh39Jb/ehJeUBagdth8A3BnNsMW7sPpYn+mmJWWbLRWCmt3fjC +dWjgCRt+5uJO7NfhIY9yH+dsdtoNkmJOW8n4bP/J7pD1pcP3gYny9xckQddIZ0iUrzc WMBQ== X-Gm-Message-State: AOAM5320ZfFvgT1E+MNNEvDxYonG04dLyj6kJyZjQqmAAofl7d1JjjLO 6NcBGJZE0fpO0Fjg7G+ZhkFXHrsHL70= X-Google-Smtp-Source: ABdhPJwx6Uc3p4WbcyBJER2cmCsgIH2KT3H6YEHu9XuCuj+2I0zTPGfdF0hfjtYB2cspvwOAwggsOA== X-Received: by 2002:a05:6402:84a:b0:423:fe99:8c53 with SMTP id b10-20020a056402084a00b00423fe998c53mr36764883edz.195.1652391031223; Thu, 12 May 2022 14:30:31 -0700 (PDT) Received: from [172.20.10.2] (101.235.197.178.dynamic.wless.lssmb00p-cgnat.res.cust.swisscom.ch. [178.197.235.101]) by smtp.gmail.com with ESMTPSA id c18-20020aa7c992000000b0042617ba63d2sm86364edt.92.2022.05.12.14.30.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 May 2022 14:30:30 -0700 (PDT) Message-ID: <5E4825B2-1F01-4783-B95F-3ECC6C40C3C2@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_9241014C-19ED-4C93-B7A3-EB4E3CCA5716" Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Date: Thu, 12 May 2022 23:30:26 +0200 In-Reply-To: <0d42a208-fc73-4277-a975-6f91c24648c1@www.fastmail.com> Cc: php internals To: Larry Garfield References: <627D3BCF.7020903@adviesenzo.nl> <0d42a208-fc73-4277-a975-6f91c24648c1@www.fastmail.com> X-Mailer: Apple Mail (2.3608.120.23.2.7) Subject: Re: [PHP-DEV] [Discussion] Expand deprecation notice scope for partially supported callables From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_9241014C-19ED-4C93-B7A3-EB4E3CCA5716 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 12 mai 2022 =C3=A0 23:11, Larry Garfield a = =C3=A9crit : >=20 > 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[] =3D $onerror; } ``` (Of course, this argument also holds for `is_callable()`.) =E2=80=94Claude= --Apple-Mail=_9241014C-19ED-4C93-B7A3-EB4E3CCA5716--