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
Fix several CallMap function signatures #8217
Conversation
d7afd82
to
4b77691
Compare
dictionaries/CallMap_historical.php
Outdated
@@ -10001,7 +10001,7 @@ | |||
'copy' => ['bool', 'from'=>'string', 'to'=>'string', 'context='=>'resource'], | |||
'cos' => ['float', 'num'=>'float'], | |||
'cosh' => ['float', 'num'=>'float'], | |||
'count' => ['int', 'value'=>'Countable|array|SimpleXMLElement|ResourceBundle', 'mode='=>'int'], | |||
'count' => ['int', 'value'=>'mixed', 'mode='=>'int'], |
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 think this was intentionally more specific.
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.
SimpleXMLElement and ResourceBundle implement Countable so they aren't necessary. Should we just make it Countable|array
for all versions?
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.
Not for historical versions: https://3v4l.org/N8LQ5
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.
Though I'm fine removing SimpleXMLElement from the signature starting from 7.4. Less complexity is always good. Not sure about ResourceBundle though
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 was going to check whether it always implemented that interface too. I'll adjust it back up based on that.
Some of these are tricky to follow the implementation.
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.
According to the changelog ResourceBundle
started implementing Countable
in 7.4.
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.
Restored the historical signature and moved the change to 8.0 where the TypeError was thrown.
4b77691
to
e0ebfe1
Compare
Thanks! |
partially reverts vimeo#8217
partially reverts vimeo#8217
partially reverts vimeo#8217
partially reverts vimeo#8217
partially reverts vimeo#8217
partially reverts vimeo#8217
Fixed several standard functions.