Hey,

On 4.7.2025 09:01:52, Niels Dossche wrote:
Hi

First of all, that's a huge list of deprecations and I think we should tone 
down on that.
Especially if a feature still has a purpose and is not harmful or buggy, then 
we should probably consider not deprecating it.

Yeah, I agree. The list of deprecations is too big and possibly should be multiple RFCs. Let's keep it in mind for next year at least, please.

Deprecating should be a selective process, just like adding features is. I don't think we really have big RFCs which simply add a bunch of _unrelated_ stuff.

Secondly, I'm tired of having to deal with useless deprecation messages.
A lot of deprecation messages are completely useless for developers because 
they do not point to a reason or a replacement.
That leaves you needing to look up the documentation, which is also incomplete.
Seehttps://github.com/php/php-src/issues/14320
Therefore, any deprecation proposed in this RFC that does not explicitly list 
the deprecation message, I will vote no for.
Good idea. I can support that.
There are some things in the list I don't care about or I don't have a lot of 
insight of its uses in, and I will abstain for voting on them.

There are a few things I will vote no for:

* Deprecate semicolon after case in switch statement.
   People seem to use this and it doesn't seem harmful to have. Just because 
you don't like it doesn't mean we should yeet it.

* Deprecate attributes applying to multiple class properties/constants.
   On the edge, confusing yes, but it might break real code.

* Deprecate using values of type null and bool as array offsets and when 
calling array_key_exists()
   Deprecating this would make the language more inconsistent by allowing this 
on array offsets but not on the function.

* Deprecate __debugInfo() returning null
   Weird, especially as the docs say the return type is ": array", but not 
harmful.

* Deprecate ReflectionParameter::allowsNull()
   This shorthand doesn't hurt anybody, and is convenient, I don't see the 
point in deprecating it.

* Deprecate passing spl_autoload_call() to spl_autoload_unregister()
   This is very ad hoc, and as Ilija pointed out, we can't prevent workarounds 
for this. So what's the point really.
   The behaviour may be weird, but notice that people won't do this by accident.
That one is probably just getting rid of the special casing in the code, which I'd support.
* Deprecate passing null to readdir(), rewinddir(), and closedir()
   Dubious but not really harmful I think.

* Based on Derick's comments I will vote no on the ext/filter deprecations. I 
was already going to vote no on the filter_* functions though.

* Deprecate driver specific PDO constants and methods
   Too early.

Kind regards
Niels

To add to Niels list:

* Deprecate passing string which are not one byte long to ord()
  This behaviour is consistent with mb_ord() as well. If we deprecate one, we also should deprecate the other. But that makes no sense, because the latter is not fixed with. So let's just not deprecate either.

* Some INI deprecations:

** Deprecate the docref_root and docref_ext INI directives
   What's the point? Why do these need to be deprecated? If these are not set you do not get clickable links at all, unrelated to mirrors and such.

** Deprecate the error_prepend_string and error_append_string INI directives
   Why is that of questionable use? Why is "this is a development and debugging feature" considered a valid reason to get rid of something? It allows prominently displaying issues in development when they would be hidden behind other HTML otherwise.

** Deprecate the report_memleaks INI directive
   So, "I'm currently working with this code having a known memory leak and I want to suppress it" is not a valid reason? If you select that that's a very deliberate opt-in.

Bob

Reply via email to