Re: ***SPAM*** Re: [PHP-DEV] Deprecated partially supported callables: should is_callable() throwa deprecation notice ?
| From: | Juliette Reinders Folmer | Date: | Fri, 29 Apr 2022 02:04:58 +0000 |
| Subject: | Re: ***SPAM*** Re: [PHP-DEV] Deprecated partially supported callables: should is_callable() throwa deprecation notice ? | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-117646@lists.php.net to get a copy of this message | ||
On 28-4-2022 21:42, Rowan Tommins wrote:
On 28/04/2022 15:09, Juliette Reinders Folmer wrote:And that's basically exactly what I already did which led me to discover the patterns I posted about as they looked concerning (though I didn't use Nikic's tool, but the WIP PHPCompatibility sniff)... I scanned a significant number of widely-used codebases and their dependencies and used the PHPCSAh! So you're basically asking for the impossible. Search for a code pattern where a deprecation would not be useful, while noone has been able to come up with one.Not at all. I'm saying look at how different people use the function, and then see how the deprecation would affect them, without searching for any particular code pattern. That's exactly what I did with my recent RFC, and I found it a very useful exercise in understanding the impact: https://wiki.php.net/rfc/remove_utf8_decode_and_utf8_encode#usage I would never have thought of some of the examples you showed in your earlier e-mail, so I'm genuinely curious what other patterns it's used for.
--report=code view to see the code being flagged in context.
- Some of the things flagged were/are false positives (WIP sniff, still fine-tuning), which I could dismiss out of hand.
- Some of the things flagged is code which will start throwing deprecation notices (all good).
- Some code pattern flagged peaked my curiousity as they wouldn't throw a deprecation notice, but would lead to reversed behaviour... which is when I posted about this in the channel with the typical pattern I identified as dangerous without deprecation notice.
Smile,
Juliette