-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Deprecate many ArrayIterator methods that are aliases to ArrayObject ones #7345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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.