Skip to content

Conversation

@VincentLanglet
Copy link
Contributor

Hi,

I'm not familiar with php codebase but I feel like there is an error in definition of getPartsIterator

Also, I dunno if I have to update this code too

ZEND_ARG_TYPE_INFO_WITH_DEFAULT_VALUE(0, type, IS_STRING, 0, "IntlPartsIterator::KEY_SEQUENTIAL")

See the inconsistency in the doc
https://www.php.net/manual/en/class.intlpartsiterator.php
https://www.php.net/manual/en/intlbreakiterator.getpartsiterator.php

@devnexen
Copy link
Member

Yes the actual method takes a zend_long so in the stub it should be an int argument indeed. @kocsismate wdyt ?

@iluuu1994
Copy link
Member

Same applies here, this is LSP breaking, so I don't think this should target 8.4, but master.

@VincentLanglet
Copy link
Contributor Author

Same applies here, this is LSP breaking, so I don't think this should target 8.4, but master.

But in this case, if someone was extending this method, wouldn't already he have an issue with the default value ?
https://onlinephp.io/c/9e9ca8

@iluuu1994
Copy link
Member

Not if they don't use strict_types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants