Conversation
odolbeau
commented
Feb 21, 2024
|
Hi, thanks for your contribution. This is a very minimal pull request with insufficient context. What exactly is claimed to be deprecated? Looking at the proposed change, it seems:
Remembering that clarity is more important than cleverness. At a minimum, could you please outline how to reproduce the issue? php version, any non-default settings, small example code, etc. FWIW here's my test. This executes fine with no errors using a default configuration. |
|
Hi, thanks for your response. I only copy / pasted the deprecation notice provided by PHP because I thought the deprecation message was clear enough : what's deprecated is calling
This is your opinion (which I respect) but you're criticising the code of this PR without providing any hint to write it your way. Not very useful.
Congrats for the unwrap and the very good interpretation. You're (almost perfectly) right : as the deprecation message says, this is now deprecated to run string functions on null inputs (this is not disallowed yet but soon or later, it will). Here is a very simple reproducer and the PHP RFC introducing those deprecations in 8.1. |
|
Ahh OK, so apparently my local default config doesn't care. Yours does. I will implement a simpler fix like the below and credit you. Thanks again for bringing this to my attention, I rarely write php these days. |