Deprecate many ArrayIterator methods that are aliases to ArrayObject ones - #7345
Deprecate many ArrayIterator methods that are aliases to ArrayObject ones#7345morrisonlevi wants to merge 1 commit into
Conversation
| @@ -7,10 +7,10 @@ var_dump($ao->getFlags()); | |||
|
|
|||
| $ao2 = new ArrayObject($ao); | |||
| var_dump($ao2->getFlags()); | |||
| var_dump($ao2->getIterator()->getFlags()); | |||
There was a problem hiding this comment.
I'd prefer to just switch off E-DEPRECATED in ini settings instead of using error_reporting(0). Is there a problem in fixing the test cases to avoid the deprecation warning or just silencing E_DEPRECATED?
There was a problem hiding this comment.
Ignoring E_DEPRECATED is fine with me.
…Object ones These are needless, and cause problems (see some of the bugs lol). Generally if you want these methods, use an ArrayObject directly. I intend to _remove_ these and possibly more in PHP 9.0 so that ArrayIterator can be made efficient.
2b37860 to
55ab025
Compare
|
I'm going to clean this up and prepare it for discussion. @nikic, since you are the one who probably knows the most about |
|
I think it should be similar to what happens with the Serializable interface by itself: then issue a notice DEPRECATED. If you add then you issue no notice DEPRECATED even if the Serializable interface is present. |
|
@morrisonlevi do you want to rebase this or not? |
|
Handled in #23074 |
This will need an RFC, I think.
These are needless, and cause problems (see some of the bugs lol).
Generally if you want these methods, use an ArrayObject directly.
I intend to remove these and possibly more in PHP 9.0 so that
ArrayIterator can be made efficient.
Of the deprecations included, the only ones I'm not sure about are
the serialize/unserialize ones with the Serializable interface. We
want those to go away eventually, but not sure if we're ready to
add a deprecation notice on this particular usage.