Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117659 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 73694 invoked from network); 2 May 2022 11:06:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 May 2022 11:06:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 4277A18005B for ; Mon, 2 May 2022 05:43:11 -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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A, 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-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 ; Mon, 2 May 2022 05:43:10 -0700 (PDT) Received: by mail-wm1-f52.google.com with SMTP id n126-20020a1c2784000000b0038e8af3e788so8390474wmn.1 for ; Mon, 02 May 2022 05:43:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=E+Z3oy5BsCN3tVmNLM2jXGprr3/FbhkarXEQdp06zv0=; b=HL1iQ1vsogSZJUI+96SYVkndzxKN5RwzCtbStFHpfDAwYEAl9BHY0Qdx95MaIzDt5N NNd5kUW4bi516yIm9BEfzZfgL0Yzpx1ACF+mjchsIN+QF7WKVj7CJfYzpPeqmCLM5VLG UfdcJqAh8gVmQUjuBjkkn+Ywteqp7rxeMfdzjXSyufMOtzCGXNHmM/1rkb424EvtlUSD qwziAJGsNIzZjfEN8FaKm8vi4RQZuIhSjWJdgAWrafJdbKWqYrEAdQ/+2X/lfhJDEpQN 2Qm/Zz5zLh+KVG2ZQrZD9xEHhgufKNSC2foH7JzfcF8WaG1MLNcG9P8+TNptjzD0vFOI X9mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=E+Z3oy5BsCN3tVmNLM2jXGprr3/FbhkarXEQdp06zv0=; b=ruLKDszV1zkHq8QAulQBSFwC5YBXkhhsgu7UY0mGmshJLMiAhwr2WS5k5oxIirftFC fJjNwypgtGzGn6rhZyzkFiYTQZZbGQ5InXZ2loAQdXiAEtDGIXwwJaj2U6bH2rFs3B3g sVdpEpbUBqv4b0733CTi5irSuOHZe1klrnYXzD2Sc82DmeOt7tuNjrRzEfGDM2EtkU1x 9DFm+V+pY5i2ckExoy2XsN7LLaM4E8kEj65gjRwJm2+nTiNga7eA5mTu7b78ZuQ7RLaV 2VDL1LQ8LXFQP7fUqi/svSKBSK8bnRA4MAZyRJm1ltTb6MQAXVO0qWdyxLFfkrEfYgPh Z4Ng== X-Gm-Message-State: AOAM530rYp7ljPecRqsp8ctGuePXPQgxnkaxnPf5PRI8D7BhLJrmBzDd LHVY6lbrvYoonEQ6fnsu2qhl2d7IKds= X-Google-Smtp-Source: ABdhPJw4um0cdXmKgLxfN7GGUMLT/7R0uQnmDSRKWMUYVrWO9HCnYnnluKYi4XiZmNIcAGlID1lxLA== X-Received: by 2002:a05:600c:4e90:b0:394:1f75:bbbc with SMTP id f16-20020a05600c4e9000b003941f75bbbcmr14424398wmq.172.1651495389627; Mon, 02 May 2022 05:43:09 -0700 (PDT) Received: from [192.168.0.22] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37]) by smtp.googlemail.com with ESMTPSA id t11-20020adfa2cb000000b0020c5253d8d2sm6666709wra.30.2022.05.02.05.43.08 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 May 2022 05:43:08 -0700 (PDT) Message-ID: <44517fe1-21da-41ce-0c9d-d69c2b4bf6f9@gmail.com> Date: Mon, 2 May 2022 13:43:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Content-Language: en-GB To: internals@lists.php.net References: <62317B01.90907@adviesenzo.nl> <3F016525-CCDE-4229-9260-7C76A6FF42E1@cschneid.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [PHP-DEV] Deprecated partially supported callables: should is_callable() throw a deprecation notice ? From: rowan.collins@gmail.com (Rowan Tommins) On 02/05/2022 12:56, Alexandru Pătrănescu wrote: > The point is that this is not an usual deprecation, something that will > change to an error in the future. > In the end, it's just a change in behavior with no error before or after. > It does not fit the "deprecation". That was my instinct too, but Juliette's analysis elsewhere on the thread has convinced me that it is very likely that anyone seeing this deprecation would want to change their code, rather than allowing it to change behaviour in 9.0. Perhaps a reasonable comparison is the change in precedence of the concatenation operator [https://wiki.php.net/rfc/concatenation_precedence]. The expression ("sum: " . $a + $b) is valid in PHP 7 and PHP 8, but has different results; PHP 7.4 included a deprecation notice because users would almost certainly want to choose which behaviour they wanted. The difference in this case is that the code change probably won't happen in the same place as the is_callable() function call, but somewhere further up the stack. For instance, a framework function might accept arbitrary values and test them with is_callable; an application using that framework might pass "parent::foo", which will change behaviour in 9.0. It is the application's author who will benefit from the deprecation notice, so they can pass a different value whose behaviour isn't going to change. Regards, -- Rowan Tommins [IMSoP]