On 2-5-2022 14:43, Rowan Tommins wrote:
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.


I was going to mention the same example as the precedent ;-)

Either way, how will this get picked up now ? What are the next steps to put this thing in motion ?

(Note: please don't suggest for me to create a PR - I'm a PHP dev, not a C-dev)


Reply via email to